diff --git a/.github/workflows/nocobase-test-backend.yml b/.github/workflows/nocobase-test-backend.yml index ebeea8c41f..c925ff3fb9 100644 --- a/.github/workflows/nocobase-test-backend.yml +++ b/.github/workflows/nocobase-test-backend.yml @@ -61,7 +61,9 @@ jobs: node-version: ${{ matrix.node_version }} cache: 'yarn' - name: Install project dependencies - run: yarn install + run: | + yarn install + yarn add sqlite3 --no-save -W - name: Test with Sqlite run: yarn test --server --single-thread=false env: diff --git a/.github/workflows/nocobase-test-windows.yml b/.github/workflows/nocobase-test-windows.yml index c1d378a6ba..cd20394a83 100644 --- a/.github/workflows/nocobase-test-windows.yml +++ b/.github/workflows/nocobase-test-windows.yml @@ -63,7 +63,9 @@ jobs: ${{ runner.os }}-yarn- - name: Install project dependencies - run: yarn --prefer-offline + run: | + yarn --prefer-offline + yarn add sqlite3 --no-save -W - name: Test with Sqlite run: yarn test --server --single-thread=false diff --git a/CHANGELOG.md b/CHANGELOG.md index e50400bc4a..ade234ae3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,88 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.6.24](https://github.com/nocobase/nocobase/compare/v1.6.23...v1.6.24) - 2025-04-24 + +### 🚀 Improvements + +- **[client]** Adjust upload message ([#6757](https://github.com/nocobase/nocobase/pull/6757)) by @mytharcher + +### 🐛 Bug Fixes + +- **[client]** + - only export action in view collection is support when writableView is false ([#6763](https://github.com/nocobase/nocobase/pull/6763)) by @katherinehhh + + - unexpected association data creation when displaying association field under sub-form/sub-table in create form ([#6727](https://github.com/nocobase/nocobase/pull/6727)) by @katherinehhh + + - Incorrect data retrieved for many-to-many array fields from related tables in forms ([#6744](https://github.com/nocobase/nocobase/pull/6744)) by @2013xile + +## [v1.6.23](https://github.com/nocobase/nocobase/compare/v1.6.22...v1.6.23) - 2025-04-23 + +### 🚀 Improvements + +- **[cli]** Optimize internal logic of the `nocobase upgrade` command ([#6754](https://github.com/nocobase/nocobase/pull/6754)) by @chenos + +- **[Template print]** Replaced datasource action control with client role-based access control. by @sheldon66 + +### 🐛 Bug Fixes + +- **[cli]** Auto-update package.json on upgrade ([#6747](https://github.com/nocobase/nocobase/pull/6747)) by @chenos + +- **[client]** + - missing filter for already associated data when adding association data ([#6750](https://github.com/nocobase/nocobase/pull/6750)) by @katherinehhh + + - tree table 'Add Child' button linkage rule missing 'current record' ([#6752](https://github.com/nocobase/nocobase/pull/6752)) by @katherinehhh + +- **[Action: Import records]** Fix the import and export exceptions that occur when setting field permissions. ([#6677](https://github.com/nocobase/nocobase/pull/6677)) by @aaaaaajie + +- **[Block: Gantt]** gantt chart block overlapping months in calendar header for month view ([#6753](https://github.com/nocobase/nocobase/pull/6753)) by @katherinehhh + +- **[Action: Export records Pro]** + - pro export button losing filter parameters after sorting table column by @katherinehhh + + - Fix the import and export exceptions that occur when setting field permissions. by @aaaaaajie + +- **[File storage: S3(Pro)]** Fix response data of uploaded file by @mytharcher + +- **[Workflow: Approval]** Fix preload association fields for records by @mytharcher + +## [v1.6.22](https://github.com/nocobase/nocobase/compare/v1.6.21...v1.6.22) - 2025-04-22 + +### 🚀 Improvements + +- **[create-nocobase-app]** Upgrade dependencies and remove SQLite support ([#6708](https://github.com/nocobase/nocobase/pull/6708)) by @chenos + +- **[File manager]** Expose utils API ([#6705](https://github.com/nocobase/nocobase/pull/6705)) by @mytharcher + +- **[Workflow]** Add date types to variable types set ([#6717](https://github.com/nocobase/nocobase/pull/6717)) by @mytharcher + +### 🐛 Bug Fixes + +- **[client]** + - The problem of mobile top navigation bar icons being difficult to delete ([#6734](https://github.com/nocobase/nocobase/pull/6734)) by @zhangzhonghe + + - After connecting through a foreign key, clicking to trigger filtering results in empty filter conditions ([#6634](https://github.com/nocobase/nocobase/pull/6634)) by @zhangzhonghe + + - picker switching issue in date field of filter button ([#6695](https://github.com/nocobase/nocobase/pull/6695)) by @katherinehhh + + - The issue of the collapse button in the left menu being obscured by the workflow pop-up window ([#6733](https://github.com/nocobase/nocobase/pull/6733)) by @zhangzhonghe + + - missing action option constraints when reopening linkage rules ([#6723](https://github.com/nocobase/nocobase/pull/6723)) by @katherinehhh + + - export button shown without export permission ([#6689](https://github.com/nocobase/nocobase/pull/6689)) by @katherinehhh + + - Required fields hidden by linkage rules should not affect form submission ([#6709](https://github.com/nocobase/nocobase/pull/6709)) by @zhangzhonghe + +- **[server]** appVersion incorrectly generated by create-migration ([#6740](https://github.com/nocobase/nocobase/pull/6740)) by @chenos + +- **[build]** Fix error thrown in tar command ([#6722](https://github.com/nocobase/nocobase/pull/6722)) by @mytharcher + +- **[Workflow]** Fix error thrown when execute schedule event in subflow ([#6721](https://github.com/nocobase/nocobase/pull/6721)) by @mytharcher + +- **[Workflow: Custom action event]** Support to execute in multiple records mode by @mytharcher + +- **[File storage: S3(Pro)]** Add multer make logic for server-side upload by @mytharcher + ## [v1.6.21](https://github.com/nocobase/nocobase/compare/v1.6.20...v1.6.21) - 2025-04-17 ### 🚀 Improvements diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 57ce420796..c6d88eff72 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -5,6 +5,88 @@ 格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/), 并且本项目遵循 [语义化版本](https://semver.org/spec/v2.0.0.html)。 +## [v1.6.24](https://github.com/nocobase/nocobase/compare/v1.6.23...v1.6.24) - 2025-04-24 + +### 🚀 优化 + +- **[client]** 调整上传文件的提示信息 ([#6757](https://github.com/nocobase/nocobase/pull/6757)) by @mytharcher + +### 🐛 修复 + +- **[client]** + - 视图表,无编辑权限时允许显示导出按钮 ([#6763](https://github.com/nocobase/nocobase/pull/6763)) by @katherinehhh + + - 新增表单中显示关系字段子表格/子表单时关系数据也被新增 ([#6727](https://github.com/nocobase/nocobase/pull/6727)) by @katherinehhh + + - 在表单中获取关联表中的多对多数组字段数据不正确 ([#6744](https://github.com/nocobase/nocobase/pull/6744)) by @2013xile + +## [v1.6.23](https://github.com/nocobase/nocobase/compare/v1.6.22...v1.6.23) - 2025-04-23 + +### 🚀 优化 + +- **[cli]** 优化 `nocobase upgrade` 命令的内部实现逻辑 ([#6754](https://github.com/nocobase/nocobase/pull/6754)) by @chenos + +- **[模板打印]** 用客户端角色访问控制替换了数据源操作权限控制。 by @sheldon66 + +### 🐛 修复 + +- **[cli]** 升级时自动更新项目的 package.json ([#6747](https://github.com/nocobase/nocobase/pull/6747)) by @chenos + +- **[client]** + - 添加关联表格时未过滤已关联的数据 ([#6750](https://github.com/nocobase/nocobase/pull/6750)) by @katherinehhh + + - 树表格中添加子记录按钮的联动规则缺失「当前记录」变量 ([#6752](https://github.com/nocobase/nocobase/pull/6752)) by @katherinehhh + +- **[操作:导入记录]** 修复设置字段权限时出现的导入导出异常。 ([#6677](https://github.com/nocobase/nocobase/pull/6677)) by @aaaaaajie + +- **[区块:甘特图]** 甘特图区块设置月份视图时,日历头部月份重叠 ([#6753](https://github.com/nocobase/nocobase/pull/6753)) by @katherinehhh + +- **[操作:导出记录 Pro]** + - pro导出按钮在点击表格排序后丢失过滤参数 by @katherinehhh + + - 修复设置字段权限时出现的导入导出异常。 by @aaaaaajie + +- **[文件存储:S3 (Pro)]** 修复已上传文件的响应数据 by @mytharcher + +- **[工作流:审批]** 修复预加载审批记录数据的关系字段 by @mytharcher + +## [v1.6.22](https://github.com/nocobase/nocobase/compare/v1.6.21...v1.6.22) - 2025-04-22 + +### 🚀 优化 + +- **[create-nocobase-app]** 更新依赖,移除 SQLite 支持 ([#6708](https://github.com/nocobase/nocobase/pull/6708)) by @chenos + +- **[文件管理器]** 暴露公共包 API ([#6705](https://github.com/nocobase/nocobase/pull/6705)) by @mytharcher + +- **[工作流]** 为变量的类型集合增加日期相关类型 ([#6717](https://github.com/nocobase/nocobase/pull/6717)) by @mytharcher + +### 🐛 修复 + +- **[client]** + - 移动端顶部的导航栏图标很难被删除的问题 ([#6734](https://github.com/nocobase/nocobase/pull/6734)) by @zhangzhonghe + + - 通过外键连接后,点击触发筛选,筛选条件为空 ([#6634](https://github.com/nocobase/nocobase/pull/6634)) by @zhangzhonghe + + - 筛选按钮中日期字段,切换picker 异常 ([#6695](https://github.com/nocobase/nocobase/pull/6695)) by @katherinehhh + + - 左侧菜单的收起按钮会被绑定工作流弹窗遮挡的问题 ([#6733](https://github.com/nocobase/nocobase/pull/6733)) by @zhangzhonghe + + - 重新打开联动规则时缺少操作选项约束 ([#6723](https://github.com/nocobase/nocobase/pull/6723)) by @katherinehhh + + - 未设置导出权限时仍显示导出按钮 ([#6689](https://github.com/nocobase/nocobase/pull/6689)) by @katherinehhh + + - 被联动规则隐藏的必填字段,不应该影响表单的提交 ([#6709](https://github.com/nocobase/nocobase/pull/6709)) by @zhangzhonghe + +- **[server]** create-migration 命令生成的 appVersion 不准确 ([#6740](https://github.com/nocobase/nocobase/pull/6740)) by @chenos + +- **[build]** 修复 tar 命令报错的问题 ([#6722](https://github.com/nocobase/nocobase/pull/6722)) by @mytharcher + +- **[工作流]** 修复子流程执行定时任务报错的问题 ([#6721](https://github.com/nocobase/nocobase/pull/6721)) by @mytharcher + +- **[工作流:自定义操作事件]** 支持多行记录模式的手动执行 by @mytharcher + +- **[文件存储:S3 (Pro)]** 增加 multer 逻辑用于服务端上传 by @mytharcher + ## [v1.6.21](https://github.com/nocobase/nocobase/compare/v1.6.20...v1.6.21) - 2025-04-17 ### 🚀 优化 diff --git a/docker/nocobase/Dockerfile b/docker/nocobase/Dockerfile index 3fb6bafc89..9c0a1bbfff 100644 --- a/docker/nocobase/Dockerfile +++ b/docker/nocobase/Dockerfile @@ -8,7 +8,11 @@ RUN cd /app \ && yarn config set network-timeout 600000 -g \ && npx -y create-nocobase-app@${CNA_VERSION} my-nocobase-app --skip-dev-dependencies -a -e APP_ENV=production \ && cd /app/my-nocobase-app \ - && yarn install --production + && yarn install --production \ + && rm -rf yarn.lock \ + && find node_modules -type f -name "yarn.lock" -delete \ + && find node_modules -type f -name "bower.json" -delete \ + && find node_modules -type f -name "composer.json" -delete RUN cd /app \ && rm -rf nocobase.tar.gz \ diff --git a/lerna.json b/lerna.json index 8b921fd5ee..81a56c0650 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "npmClient": "yarn", "useWorkspaces": true, "npmClientArgs": ["--ignore-engines"], diff --git a/package.json b/package.json index b530c0c628..2520b58a91 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "ghooks": "^2.0.4", "lint-staged": "^13.2.3", "patch-package": "^8.0.0", + "pm2": "^6.0.5", "pretty-format": "^24.0.0", "pretty-quick": "^3.1.0", "react": "^18.0.0", diff --git a/packages/core/acl/package.json b/packages/core/acl/package.json index 0702ee69e7..ddd07af398 100644 --- a/packages/core/acl/package.json +++ b/packages/core/acl/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/acl", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/resourcer": "1.7.0-alpha.11", - "@nocobase/utils": "1.7.0-alpha.11", + "@nocobase/resourcer": "1.7.0-alpha.12", + "@nocobase/utils": "1.7.0-alpha.12", "minimatch": "^5.1.1" }, "repository": { diff --git a/packages/core/actions/package.json b/packages/core/actions/package.json index 95d4f210e6..effe0b492a 100644 --- a/packages/core/actions/package.json +++ b/packages/core/actions/package.json @@ -1,14 +1,14 @@ { "name": "@nocobase/actions", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/cache": "1.7.0-alpha.11", - "@nocobase/database": "1.7.0-alpha.11", - "@nocobase/resourcer": "1.7.0-alpha.11" + "@nocobase/cache": "1.7.0-alpha.12", + "@nocobase/database": "1.7.0-alpha.12", + "@nocobase/resourcer": "1.7.0-alpha.12" }, "repository": { "type": "git", diff --git a/packages/core/app/package.json b/packages/core/app/package.json index b125d3f42b..38435dc942 100644 --- a/packages/core/app/package.json +++ b/packages/core/app/package.json @@ -1,17 +1,17 @@ { "name": "@nocobase/app", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/database": "1.7.0-alpha.11", - "@nocobase/preset-nocobase": "1.7.0-alpha.11", - "@nocobase/server": "1.7.0-alpha.11" + "@nocobase/database": "1.7.0-alpha.12", + "@nocobase/preset-nocobase": "1.7.0-alpha.12", + "@nocobase/server": "1.7.0-alpha.12" }, "devDependencies": { - "@nocobase/client": "1.7.0-alpha.11" + "@nocobase/client": "1.7.0-alpha.12" }, "repository": { "type": "git", diff --git a/packages/core/auth/package.json b/packages/core/auth/package.json index 70eb7e8de9..4cac9fb4dc 100644 --- a/packages/core/auth/package.json +++ b/packages/core/auth/package.json @@ -1,18 +1,18 @@ { "name": "@nocobase/auth", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/actions": "1.7.0-alpha.11", - "@nocobase/cache": "1.7.0-alpha.11", - "@nocobase/database": "1.7.0-alpha.11", - "@nocobase/resourcer": "1.7.0-alpha.11", - "@nocobase/utils": "1.7.0-alpha.11", - "@types/jsonwebtoken": "^8.5.8", - "jsonwebtoken": "^8.5.1" + "@nocobase/actions": "1.7.0-alpha.12", + "@nocobase/cache": "1.7.0-alpha.12", + "@nocobase/database": "1.7.0-alpha.12", + "@nocobase/resourcer": "1.7.0-alpha.12", + "@nocobase/utils": "1.7.0-alpha.12", + "@types/jsonwebtoken": "^9.0.9", + "jsonwebtoken": "^9.0.2" }, "repository": { "type": "git", diff --git a/packages/core/build/package.json b/packages/core/build/package.json index 917a500294..6cc1bdee91 100644 --- a/packages/core/build/package.json +++ b/packages/core/build/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/build", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "Library build tool based on rollup.", "main": "lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/core/cache/package.json b/packages/core/cache/package.json index 1721f06553..680ab4c9e7 100644 --- a/packages/core/cache/package.json +++ b/packages/core/cache/package.json @@ -1,12 +1,12 @@ { "name": "@nocobase/cache", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/lock-manager": "1.7.0-alpha.11", + "@nocobase/lock-manager": "1.7.0-alpha.12", "bloom-filters": "^3.0.1", "cache-manager": "^5.2.4", "cache-manager-redis-yet": "^4.1.2" diff --git a/packages/core/cli/package.json b/packages/core/cli/package.json index d75d5c0ac3..e68049c235 100644 --- a/packages/core/cli/package.json +++ b/packages/core/cli/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/cli", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./src/index.js", @@ -8,12 +8,13 @@ "nocobase": "./bin/index.js" }, "dependencies": { - "@nocobase/app": "1.7.0-alpha.11", + "@nocobase/app": "1.7.0-alpha.12", "@nocobase/license-kit": "^0.2.3", "@types/fs-extra": "^11.0.1", "@umijs/utils": "3.5.20", "chalk": "^4.1.1", "commander": "^9.2.0", + "deepmerge": "^4.3.1", "dotenv": "^16.0.0", "execa": "^5.1.1", "fast-glob": "^3.3.1", @@ -26,7 +27,7 @@ "tsx": "^4.19.0" }, "devDependencies": { - "@nocobase/devtools": "1.7.0-alpha.11" + "@nocobase/devtools": "1.7.0-alpha.12" }, "repository": { "type": "git", diff --git a/packages/core/cli/src/commands/dev.js b/packages/core/cli/src/commands/dev.js index c12c5df2d5..9caa52b0ff 100644 --- a/packages/core/cli/src/commands/dev.js +++ b/packages/core/cli/src/commands/dev.js @@ -8,7 +8,7 @@ */ const _ = require('lodash'); const { Command } = require('commander'); -const { generatePlugins, run, postCheck, nodeCheck, promptForTs, isPortReachable } = require('../util'); +const { generatePlugins, run, postCheck, nodeCheck, promptForTs, isPortReachable, checkDBDialect } = require('../util'); const { getPortPromise } = require('portfinder'); const chokidar = require('chokidar'); const { uid } = require('@formily/shared'); @@ -36,6 +36,7 @@ module.exports = (cli) => { .option('-i, --inspect [port]') .allowUnknownOption() .action(async (opts) => { + checkDBDialect(); let subprocess; const runDevClient = () => { console.log('starting client', 1 * clientPort); diff --git a/packages/core/cli/src/commands/e2e.js b/packages/core/cli/src/commands/e2e.js index 8daa5e6389..cf3bf6172a 100644 --- a/packages/core/cli/src/commands/e2e.js +++ b/packages/core/cli/src/commands/e2e.js @@ -8,7 +8,7 @@ */ const { Command } = require('commander'); -const { run, isPortReachable } = require('../util'); +const { run, isPortReachable, checkDBDialect } = require('../util'); const { execSync } = require('node:child_process'); const axios = require('axios'); const { pTest } = require('./p-test'); @@ -165,6 +165,7 @@ const filterArgv = () => { */ module.exports = (cli) => { const e2e = cli.command('e2e').hook('preAction', () => { + checkDBDialect(); if (process.env.APP_BASE_URL) { process.env.APP_BASE_URL = process.env.APP_BASE_URL.replace('localhost', '127.0.0.1'); console.log('APP_BASE_URL:', process.env.APP_BASE_URL); diff --git a/packages/core/cli/src/commands/global.js b/packages/core/cli/src/commands/global.js index 524ad3cd09..48bab4fb23 100644 --- a/packages/core/cli/src/commands/global.js +++ b/packages/core/cli/src/commands/global.js @@ -8,7 +8,7 @@ */ const { Command } = require('commander'); -const { run, isDev, isProd, promptForTs, downloadPro } = require('../util'); +const { run, isDev, isProd, promptForTs, downloadPro, checkDBDialect } = require('../util'); /** * @@ -21,6 +21,7 @@ module.exports = (cli) => { .option('-h, --help') .option('--ts-node-dev') .action(async (options) => { + checkDBDialect(); const cmd = process.argv.slice(2)?.[0]; if (cmd === 'install') { await downloadPro(); diff --git a/packages/core/cli/src/commands/index.js b/packages/core/cli/src/commands/index.js index b2322cf3ed..ffc86e2b4d 100644 --- a/packages/core/cli/src/commands/index.js +++ b/packages/core/cli/src/commands/index.js @@ -30,6 +30,7 @@ module.exports = (cli) => { require('./test')(cli); require('./test-coverage')(cli); require('./umi')(cli); + require('./update-deps')(cli); require('./upgrade')(cli); require('./postinstall')(cli); require('./pkg')(cli); diff --git a/packages/core/cli/src/commands/start.js b/packages/core/cli/src/commands/start.js index 968e8654b2..e0f0bc905c 100644 --- a/packages/core/cli/src/commands/start.js +++ b/packages/core/cli/src/commands/start.js @@ -8,7 +8,7 @@ */ const _ = require('lodash'); const { Command } = require('commander'); -const { run, postCheck, downloadPro, promptForTs } = require('../util'); +const { run, postCheck, downloadPro, promptForTs, checkDBDialect } = require('../util'); const { existsSync, rmSync } = require('fs'); const { resolve, isAbsolute } = require('path'); const chalk = require('chalk'); @@ -48,8 +48,10 @@ module.exports = (cli) => { .option('-i, --instances [instances]') .option('--db-sync') .option('--quickstart') + .option('--launch-mode [launchMode]') .allowUnknownOption() .action(async (opts) => { + checkDBDialect(); if (opts.quickstart) { await downloadPro(); } @@ -118,17 +120,27 @@ module.exports = (cli) => { ]); process.exit(); } else { - run( - 'pm2-runtime', - [ - 'start', - ...instancesArgs, - `${APP_PACKAGE_ROOT}/lib/index.js`, - NODE_ARGS ? `--node-args="${NODE_ARGS}"` : undefined, - '--', - ...process.argv.slice(2), - ].filter(Boolean), - ); + const launchMode = opts.launchMode || process.env.APP_LAUNCH_MODE || 'pm2'; + if (launchMode === 'pm2') { + run( + 'pm2-runtime', + [ + 'start', + ...instancesArgs, + `${APP_PACKAGE_ROOT}/lib/index.js`, + NODE_ARGS ? `--node-args="${NODE_ARGS}"` : undefined, + '--', + ...process.argv.slice(2), + ].filter(Boolean), + ); + } else { + run( + 'node', + [`${APP_PACKAGE_ROOT}/lib/index.js`, ...(NODE_ARGS || '').split(' '), ...process.argv.slice(2)].filter( + Boolean, + ), + ); + } } }); }; diff --git a/packages/core/cli/src/commands/test-coverage.js b/packages/core/cli/src/commands/test-coverage.js index ee6d50695d..8a26113203 100644 --- a/packages/core/cli/src/commands/test-coverage.js +++ b/packages/core/cli/src/commands/test-coverage.js @@ -7,7 +7,7 @@ * For more information, please refer to: https://www.nocobase.com/agreement. */ -const { run } = require('../util'); +const { run, checkDBDialect } = require('../util'); const fg = require('fast-glob'); const coreClientPackages = ['packages/core/client', 'packages/core/sdk']; @@ -30,6 +30,7 @@ const getPackagesDir = (isClient) => { module.exports = (cli) => { cli.command('test-coverage:server').action(async () => { + checkDBDialect(); const packageRoots = getPackagesDir(false); for (const dir of packageRoots) { try { @@ -41,6 +42,7 @@ module.exports = (cli) => { }); cli.command('test-coverage:client').action(async () => { + checkDBDialect(); const packageRoots = getPackagesDir(true); for (const dir of packageRoots) { try { diff --git a/packages/core/cli/src/commands/test.js b/packages/core/cli/src/commands/test.js index d97a5f1026..0ec62ac4e8 100644 --- a/packages/core/cli/src/commands/test.js +++ b/packages/core/cli/src/commands/test.js @@ -8,7 +8,7 @@ */ const { Command } = require('commander'); -const { run } = require('../util'); +const { run, checkDBDialect } = require('../util'); const path = require('path'); /** @@ -29,6 +29,7 @@ function addTestCommand(name, cli) { .arguments('[paths...]') .allowUnknownOption() .action(async (paths, opts) => { + checkDBDialect(); if (name === 'test:server') { process.env.TEST_ENV = 'server-side'; } else if (name === 'test:client') { diff --git a/packages/core/cli/src/commands/update-deps.js b/packages/core/cli/src/commands/update-deps.js new file mode 100644 index 0000000000..ed54d06721 --- /dev/null +++ b/packages/core/cli/src/commands/update-deps.js @@ -0,0 +1,71 @@ +/** + * This file is part of the NocoBase (R) project. + * Copyright (c) 2020-2024 NocoBase Co., Ltd. + * Authors: NocoBase Team. + * + * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. + * For more information, please refer to: https://www.nocobase.com/agreement. + */ + +const chalk = require('chalk'); +const { Command } = require('commander'); +const { resolve } = require('path'); +const { run, promptForTs, runAppCommand, hasCorePackages, downloadPro, hasTsNode, checkDBDialect } = require('../util'); +const { existsSync, rmSync } = require('fs'); +const { readJSON, writeJSON } = require('fs-extra'); +const deepmerge = require('deepmerge'); + +const rmAppDir = () => { + // If ts-node is not installed, do not do the following + const appDevDir = resolve(process.cwd(), './storage/.app-dev'); + if (existsSync(appDevDir)) { + rmSync(appDevDir, { recursive: true, force: true }); + } +}; + +/** + * + * @param {Command} cli + */ +module.exports = (cli) => { + cli + .command('update-deps') + .option('--force') + .allowUnknownOption() + .action(async (options) => { + if (hasCorePackages() || !hasTsNode()) { + await downloadPro(); + return; + } + const pkg = require('../../package.json'); + let distTag = 'latest'; + if (pkg.version.includes('alpha')) { + distTag = 'alpha'; + } else if (pkg.version.includes('beta')) { + distTag = 'beta'; + } + const { stdout } = await run('npm', ['info', `@nocobase/cli@${distTag}`, 'version'], { + stdio: 'pipe', + }); + if (!options.force && pkg.version === stdout) { + await downloadPro(); + rmAppDir(); + return; + } + const descPath = resolve(process.cwd(), 'package.json'); + const descJson = await readJSON(descPath, 'utf8'); + const sourcePath = resolve(__dirname, '../../templates/create-app-package.json'); + const sourceJson = await readJSON(sourcePath, 'utf8'); + if (descJson['dependencies']?.['@nocobase/cli']) { + descJson['dependencies']['@nocobase/cli'] = stdout; + } + if (descJson['devDependencies']?.['@nocobase/devtools']) { + descJson['devDependencies']['@nocobase/devtools'] = stdout; + } + const json = deepmerge(descJson, sourceJson); + await writeJSON(descPath, json, { spaces: 2, encoding: 'utf8' }); + await run('yarn', ['install']); + await downloadPro(); + rmAppDir(); + }); +}; diff --git a/packages/core/cli/src/commands/upgrade.js b/packages/core/cli/src/commands/upgrade.js index 4774564e41..c2bb0736d3 100644 --- a/packages/core/cli/src/commands/upgrade.js +++ b/packages/core/cli/src/commands/upgrade.js @@ -10,15 +10,25 @@ const chalk = require('chalk'); const { Command } = require('commander'); const { resolve } = require('path'); -const { run, promptForTs, runAppCommand, hasCorePackages, downloadPro, hasTsNode } = require('../util'); +const { run, promptForTs, runAppCommand, hasCorePackages, downloadPro, hasTsNode, checkDBDialect } = require('../util'); const { existsSync, rmSync } = require('fs'); +const { readJSON, writeJSON } = require('fs-extra'); +const deepmerge = require('deepmerge'); + +async function updatePackage() { + const sourcePath = resolve(__dirname, '../../templates/create-app-package.json'); + const descPath = resolve(process.cwd(), 'package.json'); + const sourceJson = await readJSON(sourcePath, 'utf8'); + const descJson = await readJSON(descPath, 'utf8'); + const json = deepmerge(descJson, sourceJson); + await writeJSON(descPath, json, { spaces: 2, encoding: 'utf8' }); +} /** * * @param {Command} cli */ module.exports = (cli) => { - const { APP_PACKAGE_ROOT } = process.env; cli .command('upgrade') .allowUnknownOption() @@ -26,52 +36,12 @@ module.exports = (cli) => { .option('--next') .option('-S|--skip-code-update') .action(async (options) => { - if (hasTsNode()) promptForTs(); - if (hasCorePackages()) { - // await run('yarn', ['install']); - await downloadPro(); - await runAppCommand('upgrade'); - return; - } + checkDBDialect(); if (options.skipCodeUpdate) { - await downloadPro(); await runAppCommand('upgrade'); - return; + } else { + await run('nocobase', ['update-deps']); + await run('nocobase', ['upgrade', '--skip-code-update']); } - // await runAppCommand('upgrade'); - if (!hasTsNode()) { - await downloadPro(); - await runAppCommand('upgrade'); - return; - } - const rmAppDir = () => { - // If ts-node is not installed, do not do the following - const appDevDir = resolve(process.cwd(), './storage/.app-dev'); - if (existsSync(appDevDir)) { - rmSync(appDevDir, { recursive: true, force: true }); - } - }; - const pkg = require('../../package.json'); - let distTag = 'latest'; - if (pkg.version.includes('alpha')) { - distTag = 'alpha'; - } else if (pkg.version.includes('beta')) { - distTag = 'beta'; - } - // get latest version - const { stdout } = await run('npm', ['info', `@nocobase/cli@${distTag}`, 'version'], { - stdio: 'pipe', - }); - if (pkg.version === stdout) { - await downloadPro(); - await runAppCommand('upgrade'); - await rmAppDir(); - return; - } - await run('yarn', ['add', `@nocobase/cli@${distTag}`, `@nocobase/devtools@${distTag}`, '-W']); - await run('yarn', ['install']); - await downloadPro(); - await runAppCommand('upgrade'); - await rmAppDir(); }); }; diff --git a/packages/core/cli/src/util.js b/packages/core/cli/src/util.js index 0338a30784..4e744f1463 100644 --- a/packages/core/cli/src/util.js +++ b/packages/core/cli/src/util.js @@ -362,7 +362,7 @@ exports.initEnv = function initEnv() { API_BASE_PATH: '/api/', API_CLIENT_STORAGE_PREFIX: 'NOCOBASE_', API_CLIENT_STORAGE_TYPE: 'localStorage', - DB_DIALECT: 'sqlite', + // DB_DIALECT: 'sqlite', DB_STORAGE: 'storage/db/nocobase.sqlite', // DB_TIMEZONE: '+00:00', DB_UNDERSCORED: parseEnv('DB_UNDERSCORED'), @@ -474,6 +474,12 @@ exports.initEnv = function initEnv() { } }; +exports.checkDBDialect = function () { + if (!process.env.DB_DIALECT) { + throw new Error('DB_DIALECT is required.'); + } +}; + exports.generatePlugins = function () { try { require.resolve('@nocobase/devtools/umiConfig'); diff --git a/packages/core/cli/templates/create-app-package.json b/packages/core/cli/templates/create-app-package.json new file mode 100644 index 0000000000..3caaa3882e --- /dev/null +++ b/packages/core/cli/templates/create-app-package.json @@ -0,0 +1,39 @@ +{ + "private": true, + "workspaces": ["packages/*/*", "packages/*/*/*"], + "engines": { + "node": ">=18" + }, + "scripts": { + "nocobase": "nocobase", + "pm": "nocobase pm", + "pm2": "nocobase pm2", + "dev": "nocobase dev", + "start": "nocobase start", + "clean": "nocobase clean", + "build": "nocobase build", + "test": "nocobase test", + "e2e": "nocobase e2e", + "tar": "nocobase tar", + "postinstall": "nocobase postinstall", + "lint": "eslint ." + }, + "resolutions": { + "cytoscape": "3.28.0", + "@types/react": "18.3.18", + "@types/react-dom": "^18.0.0", + "react-router-dom": "6.28.1", + "react-router": "6.28.1", + "async": "^3.2.6", + "antd": "5.12.8", + "rollup": "4.24.0", + "semver": "^7.7.1" + }, + "dependencies": { + "pm2": "^6.0.5", + "mysql2": "^3.14.0", + "mariadb": "^2.5.6", + "pg": "^8.14.1", + "pg-hstore": "^2.3.4" + } +} diff --git a/packages/core/client/package.json b/packages/core/client/package.json index d60d648700..6bc2eeda53 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/client", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "lib/index.js", "module": "es/index.mjs", @@ -27,9 +27,9 @@ "@formily/reactive-react": "^2.2.27", "@formily/shared": "^2.2.27", "@formily/validator": "^2.2.27", - "@nocobase/evaluators": "1.7.0-alpha.11", - "@nocobase/sdk": "1.7.0-alpha.11", - "@nocobase/utils": "1.7.0-alpha.11", + "@nocobase/evaluators": "1.7.0-alpha.12", + "@nocobase/sdk": "1.7.0-alpha.12", + "@nocobase/utils": "1.7.0-alpha.12", "ahooks": "^3.7.2", "antd": "5.24.2", "antd-style": "3.7.1", diff --git a/packages/core/client/src/acl/ACLProvider.tsx b/packages/core/client/src/acl/ACLProvider.tsx index 478bacb68f..482bea60d7 100644 --- a/packages/core/client/src/acl/ACLProvider.tsx +++ b/packages/core/client/src/acl/ACLProvider.tsx @@ -316,6 +316,8 @@ export const ACLActionProvider = (props) => { let actionPath = schema['x-acl-action']; // 只兼容这些数据表资源按钮 const resourceActionPath = ['create', 'update', 'destroy', 'importXlsx', 'export']; + // 视图表无编辑权限时不支持的操作 + const writableViewCollectionAction = ['create', 'update', 'destroy', 'importXlsx', 'bulkDestroy', 'bulkUpdate']; if (!actionPath && resource && schema['x-action'] && resourceActionPath.includes(schema['x-action'])) { actionPath = `${resource}:${schema['x-action']}`; @@ -339,16 +341,18 @@ export const ACLActionProvider = (props) => { if (!params) { return {props.children}; } - //视图表无编辑权限时不显示 - if (resourceActionPath.includes(actionPath) || resourceActionPath.includes(actionPath?.split(':')[1])) { + //视图表无编辑权限时不支持 writableViewCollectionAction 的按钮 + if ( + writableViewCollectionAction.includes(actionPath) || + writableViewCollectionAction.includes(actionPath?.split(':')[1]) + ) { if ((collection && collection.template !== 'view') || collection?.writableView) { return {props.children}; } - return null; + return {props.children}; } return {props.children}; }; - export const useACLFieldWhitelist = () => { const params = useContext(ACLActionParamsContext); const whitelist = useMemo(() => { diff --git a/packages/core/client/src/acl/Configuration/schemas/scopes.ts b/packages/core/client/src/acl/Configuration/schemas/scopes.ts index a202d7871d..5984e48225 100644 --- a/packages/core/client/src/acl/Configuration/schemas/scopes.ts +++ b/packages/core/client/src/acl/Configuration/schemas/scopes.ts @@ -236,7 +236,6 @@ export const scopesSchema: ISchema = { 'x-component': 'Action.Link', 'x-component-props': { openMode: 'drawer', - icon: 'EditOutlined', }, properties: { drawer: { diff --git a/packages/core/client/src/application/globalOperators.js b/packages/core/client/src/application/globalOperators.js index 57b5ae7a11..ce8f265eb1 100644 --- a/packages/core/client/src/application/globalOperators.js +++ b/packages/core/client/src/application/globalOperators.js @@ -167,7 +167,7 @@ export function getOperators() { const dateA = parseDate(a); const dateB = parseDate(b); if (!dateA || !dateB) { - throw new Error('Invalid date format'); + return false; } return dateA < dateB; }, @@ -651,10 +651,11 @@ function parseYear(dateStr) { } function parseDate(targetDateStr) { - let dateStr = Array.isArray(targetDateStr) ? targetDateStr[1] : targetDateStr; - if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(dateStr)) { - // ISO 8601 格式:YYYY-MM-DDTHH:mm:ss.sssZ - return new Date(dateStr); // 直接解析为 Date 对象 + let dateStr = Array.isArray(targetDateStr) ? targetDateStr[1] ?? targetDateStr[0] : targetDateStr; + if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(dateStr)) { + return new Date(dateStr); + } else if (/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(dateStr)) { + return new Date(dateStr.replace(' ', 'T')); } else if (/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) { // YYYY-MM-DD 格式 return parseFullDate(dateStr); @@ -668,5 +669,6 @@ function parseDate(targetDateStr) { // YYYY 格式 return parseYear(dateStr); } - return null; // Invalid format + + return null; } diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index d34a8d540e..bd2c39d05a 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -97,6 +97,30 @@ const filterValue = (value) => { return obj; }; +function getFilteredFormValues(form) { + const values = _.cloneDeep(form.values); + const allFields = []; + form.query('*').forEach((field) => { + if (field) { + allFields.push(field); + } + }); + const readonlyPaths = allFields + .filter((field) => field?.componentProps?.readOnlySubmit) + .map((field) => { + const segments = field.path?.segments || []; + if (segments.length <= 1) { + return segments.join('.'); + } + return segments.slice(0, -1).join('.'); + }); + for (const path of readonlyPaths) { + _.unset(values, path); + } + + return values; +} + export function getFormValues({ filterByTk, field, @@ -124,7 +148,7 @@ export function getFormValues({ } } - return form.values; + return getFilteredFormValues(form); } export function useCollectValuesToSubmit() { @@ -203,8 +227,8 @@ export function useCollectValuesToSubmit() { ]); } -function interpolateVariables(str: string, scope: Record): string { - return str.replace(/\{\{\s*([a-zA-Z0-9_$-.]+?)\s*\}\}/g, (_, key) => { +export function interpolateVariables(str: string, scope: Record): string { + return str.replace(/\{\{\s*([a-zA-Z0-9_$.-]+?)\s*\}\}/g, (_, key) => { return scope[key] !== undefined ? String(scope[key]) : ''; }); } diff --git a/packages/core/client/src/locale/zh-CN.json b/packages/core/client/src/locale/zh-CN.json index 63a0b5604c..bf38f24ade 100644 --- a/packages/core/client/src/locale/zh-CN.json +++ b/packages/core/client/src/locale/zh-CN.json @@ -822,7 +822,7 @@ "File size exceeds the limit": "文件大小超过限制", "File type is not allowed": "文件类型不允许", "Uploading": "上传中", - "Incomplete uploading files need to be resolved": "未完成上传的文件需要处理", + "Some files are not uploaded correctly, please check.": "部分文件未上传成功,请检查。", "Default title for each record": "用作数据的默认标题", "If collection inherits, choose inherited collections as templates": "当前表有继承关系时,可选择继承链路上的表作为模板来源", "Select an existing piece of data as the initialization data for the form": "选择一条已有的数据作为表单的初始化数据", diff --git a/packages/core/client/src/modules/actions/associate/AssociateActionProvider.tsx b/packages/core/client/src/modules/actions/associate/AssociateActionProvider.tsx index 18be2d76b9..5e2a49c7c4 100644 --- a/packages/core/client/src/modules/actions/associate/AssociateActionProvider.tsx +++ b/packages/core/client/src/modules/actions/associate/AssociateActionProvider.tsx @@ -7,7 +7,7 @@ * For more information, please refer to: https://www.nocobase.com/agreement. */ -import React, { useState, useContext } from 'react'; +import React, { useState, useContext, useEffect } from 'react'; import { RecordPickerProvider, RecordPickerContext } from '../../../schema-component/antd/record-picker'; import { SchemaComponentOptions, @@ -41,9 +41,16 @@ const useTableSelectorProps = () => { export const AssociateActionProvider = (props) => { const [selectedRows, setSelectedRows] = useState([]); const collection = useCollection(); - const { resource, service, block, __parent } = useBlockRequestContext(); + const { resource, block, __parent } = useBlockRequestContext(); const actionCtx = useActionContext(); const { isMobile } = useOpenModeContext() || {}; + const [associationData, setAssociationData] = useState([]); + useEffect(() => { + resource?.list?.().then((res) => { + setAssociationData(res.data?.data || []); + }); + }, [resource]); + const pickerProps = { size: 'small', onChange: props?.onChange, @@ -73,8 +80,8 @@ export const AssociateActionProvider = (props) => { }; const getFilter = () => { const targetKey = collection?.filterTargetKey || 'id'; - if (service.data?.data) { - const list = service.data?.data.map((option) => option[targetKey]).filter(Boolean); + if (associationData) { + const list = associationData.map((option) => option[targetKey]).filter(Boolean); const filter = list.length ? { $and: [{ [`${targetKey}.$ne`]: list }] } : {}; return filter; } diff --git a/packages/core/client/src/schema-component/antd/action/Action.tsx b/packages/core/client/src/schema-component/antd/action/Action.tsx index bacd353998..2db0123766 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.tsx @@ -175,7 +175,7 @@ export const Action: ComposedAction = withDynamicSchemaProps( className={className} type={props.type} Designer={Designer} - onClick={onClick} + onClick={handleClick} confirm={confirm} confirmTitle={confirmTitle} popover={popover} @@ -354,11 +354,7 @@ const InternalAction: React.FC = observer(function Com(prop } if (addChild) { - return wrapSSR( - - {result} - , - ) as React.ReactElement; + return wrapSSR({result}) as React.ReactElement; } return wrapSSR(result) as React.ReactElement; diff --git a/packages/core/client/src/schema-component/antd/action/hooks/useGetAfterSuccessVariablesOptions.ts b/packages/core/client/src/schema-component/antd/action/hooks/useGetAfterSuccessVariablesOptions.ts index c903752719..311c1b7be9 100644 --- a/packages/core/client/src/schema-component/antd/action/hooks/useGetAfterSuccessVariablesOptions.ts +++ b/packages/core/client/src/schema-component/antd/action/hooks/useGetAfterSuccessVariablesOptions.ts @@ -29,10 +29,9 @@ export const useAfterSuccessOptions = () => { }, [fieldsOptions, userFieldOptions]); const { settings: popupRecordSettings, shouldDisplayPopupRecord } = usePopupVariable(); const { currentRoleSettings } = useCurrentRoleVariable(); - const record = useCollectionRecordData(); return useMemo(() => { return [ - (record || form) && { + form && { value: '$record', label: t('Response record', { ns: 'client' }), children: [...fields], diff --git a/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx b/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx index ed9969a523..03c67938c8 100644 --- a/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx @@ -34,7 +34,7 @@ import useServiceOptions, { useAssociationFieldContext } from './hooks'; const removeIfKeyEmpty = (obj, filterTargetKey) => { if (!obj || typeof obj !== 'object' || !filterTargetKey || Array.isArray(obj)) return obj; - return !obj[filterTargetKey] ? null : obj; + return !obj[filterTargetKey] ? undefined : obj; }; export const AssociationFieldAddNewer = (props) => { @@ -106,8 +106,13 @@ const InternalAssociationSelect = observer( useEffect(() => { const initValue = isVariable(field.value) ? undefined : field.value; const value = Array.isArray(initValue) ? initValue.filter(Boolean) : initValue; - setInnerValue(value); - }, [field.value]); + const result = removeIfKeyEmpty(value, filterTargetKey); + setInnerValue(result); + if (!isEqual(field.value, result)) { + field.value = result; + } + }, [field.value, filterTargetKey]); + useEffect(() => { const id = uid(); form.addEffects(id, () => { diff --git a/packages/core/client/src/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.ts b/packages/core/client/src/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.ts index bd2f7e4357..4c9bba47bd 100644 --- a/packages/core/client/src/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.ts +++ b/packages/core/client/src/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.ts @@ -101,6 +101,10 @@ const useLazyLoadDisplayAssociationFieldsOfForm = () => { field.value = null; } else { field.value = result; + field.componentProps = { + ...field.componentProps, + readOnlySubmit: true, + }; // 让它不参与提交 } }); }) diff --git a/packages/core/client/src/schema-component/antd/linkageFilter/useValues.ts b/packages/core/client/src/schema-component/antd/linkageFilter/useValues.ts index 54b87eb91d..2f365fbadb 100644 --- a/packages/core/client/src/schema-component/antd/linkageFilter/useValues.ts +++ b/packages/core/client/src/schema-component/antd/linkageFilter/useValues.ts @@ -36,16 +36,15 @@ const findOption = (str, options) => { const [firstKey, ...subKeys] = match[1].split('.'); // 拆分层级 const keys = [`$${firstKey}`, ...subKeys]; // 第一层保留 `$`,后续不带 `$` - let currentOptions = options; let option = null; for (const key of keys) { - option = currentOptions.find((opt) => opt.value === key); + option = currentOptions.find((opt) => opt.value === key || opt.name === key); if (!option) return null; // 进入下一层 children 查找 if (Array.isArray(option.children) || option.isLeaf === false) { - currentOptions = option.children; + currentOptions = option.children || option.field.children; } else { return option; // 没有 children 直接返回 } diff --git a/packages/core/client/src/schema-component/antd/upload/Upload.tsx b/packages/core/client/src/schema-component/antd/upload/Upload.tsx index 6c42d7bd68..76edd26fc0 100644 --- a/packages/core/client/src/schema-component/antd/upload/Upload.tsx +++ b/packages/core/client/src/schema-component/antd/upload/Upload.tsx @@ -393,10 +393,11 @@ export function Uploader({ rules, ...props }: UploadProps) { useEffect(() => { if (pendingList.length) { + const errorFiles = pendingList.filter((item) => item.status === 'error'); field.setFeedback({ type: 'error', code: 'ValidateError', - messages: [t('Incomplete uploading files need to be resolved')], + messages: [errorFiles.length ? t('Some files are not uploaded correctly, please check.') : ' '], }); } else { field.setFeedback({}); diff --git a/packages/core/client/src/schema-component/common/utils/uitls.tsx b/packages/core/client/src/schema-component/common/utils/uitls.tsx index ec2405dda5..314a50fc42 100644 --- a/packages/core/client/src/schema-component/common/utils/uitls.tsx +++ b/packages/core/client/src/schema-component/common/utils/uitls.tsx @@ -7,7 +7,7 @@ * For more information, please refer to: https://www.nocobase.com/agreement. */ -import { dayjs, getPickerFormat, Handlebars } from '@nocobase/utils/client'; +import { dayjs, getPickerFormat, Handlebars, getFormatFromDateStr } from '@nocobase/utils/client'; import _, { every, findIndex, some } from 'lodash'; import { replaceVariableValue } from '../../../block-provider/hooks'; import { VariableOption, VariablesContextType } from '../../../variables/types'; diff --git a/packages/core/client/src/schema-settings/GeneralSchemaDesigner.tsx b/packages/core/client/src/schema-settings/GeneralSchemaDesigner.tsx index a7b9881870..365e827186 100644 --- a/packages/core/client/src/schema-settings/GeneralSchemaDesigner.tsx +++ b/packages/core/client/src/schema-settings/GeneralSchemaDesigner.tsx @@ -352,11 +352,6 @@ const InternalSchemaToolbar: FC = React.memo((props) => { } } - // const style = window.getComputedStyle(parentElement); - // if (style.position === 'static') { - // parentElement.style.position = 'relative'; - // } - el.addEventListener('mouseenter', show); el.addEventListener('mouseleave', hide); return () => { diff --git a/packages/core/client/src/schema-settings/LinkageRules/ValueDynamicComponent.tsx b/packages/core/client/src/schema-settings/LinkageRules/ValueDynamicComponent.tsx index 5b26a84eac..f38eaf5914 100644 --- a/packages/core/client/src/schema-settings/LinkageRules/ValueDynamicComponent.tsx +++ b/packages/core/client/src/schema-settings/LinkageRules/ValueDynamicComponent.tsx @@ -131,7 +131,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => { {t('Syntax references')}: - + Formula.js diff --git a/packages/core/client/src/schema-settings/SchemaSettings.tsx b/packages/core/client/src/schema-settings/SchemaSettings.tsx index c277f087b7..7a581ebc09 100644 --- a/packages/core/client/src/schema-settings/SchemaSettings.tsx +++ b/packages/core/client/src/schema-settings/SchemaSettings.tsx @@ -48,6 +48,7 @@ import { SchemaSettingsItemType, SchemaToolbarVisibleContext, VariablesContext, + getZIndex, useCollection, useCollectionManager, useZIndexContext, @@ -697,7 +698,7 @@ export const SchemaSettingsActionModalItem: FC diff --git a/packages/core/client/src/schema-settings/index.ts b/packages/core/client/src/schema-settings/index.ts index 83b37a62f0..57453abc64 100644 --- a/packages/core/client/src/schema-settings/index.ts +++ b/packages/core/client/src/schema-settings/index.ts @@ -31,3 +31,4 @@ export { default as useParseDataScopeFilter } from './hooks/useParseDataScopeFil export * from './isPatternDisabled'; export { SchemaSettingsPlugin } from './SchemaSettingsPlugin'; export * from './VariableInput'; +export { replaceVariables } from './LinkageRules/bindLinkageRulesToFiled'; diff --git a/packages/core/client/src/variables/utils/getAction.tsx b/packages/core/client/src/variables/utils/getAction.tsx index 94dfc985c8..7645fbc963 100644 --- a/packages/core/client/src/variables/utils/getAction.tsx +++ b/packages/core/client/src/variables/utils/getAction.tsx @@ -8,11 +8,11 @@ */ const TYPE_TO_ACTION = { - hasMany: 'list?pageSize=9999', + hasMany: 'list?paginate=false', belongsTo: 'get', hasOne: 'get', - belongsToMany: 'list?pageSize=9999', - belongsToArray: 'get', + belongsToMany: 'list?paginate=false', + belongsToArray: 'list?paginate=false', }; export const getAction = (type: string) => { if (process.env.NODE_ENV !== 'production' && !(type in TYPE_TO_ACTION)) { diff --git a/packages/core/create-nocobase-app/package.json b/packages/core/create-nocobase-app/package.json index 446b618c59..72760dc519 100755 --- a/packages/core/create-nocobase-app/package.json +++ b/packages/core/create-nocobase-app/package.json @@ -1,6 +1,6 @@ { "name": "create-nocobase-app", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "src/index.js", "license": "AGPL-3.0", "dependencies": { diff --git a/packages/core/create-nocobase-app/src/cli.js b/packages/core/create-nocobase-app/src/cli.js index 0fd40eb008..28496f7c6b 100644 --- a/packages/core/create-nocobase-app/src/cli.js +++ b/packages/core/create-nocobase-app/src/cli.js @@ -21,7 +21,7 @@ cli .option('--quickstart', 'quickstart app creation') .option('--skip-dev-dependencies') .option('-a, --all-db-dialect', 'install all database dialect dependencies') - .option('-d, --db-dialect ', 'database dialect, current support sqlite/mysql/postgres', 'sqlite') + .option('-d, --db-dialect [dbDialect]', 'database dialect, current support postgres, mysql, mariadb, kingbase') .option('-e, --env ', 'environment variables write into .env file', concat, []) .description('create a new application') .action(async (name, options) => { diff --git a/packages/core/create-nocobase-app/src/generator.js b/packages/core/create-nocobase-app/src/generator.js index fc7ef0179d..6b8d700825 100644 --- a/packages/core/create-nocobase-app/src/generator.js +++ b/packages/core/create-nocobase-app/src/generator.js @@ -37,21 +37,6 @@ class AppGenerator extends Generator { return items; } - checkDbEnv() { - const dialect = this.args.dbDialect; - const env = this.env; - if (dialect === 'sqlite') { - return; - } - if (!env.DB_DATABASE || !env.DB_USER || !env.DB_PASSWORD) { - console.log( - chalk.red( - `Please set DB_HOST, DB_PORT, DB_DATABASE, DB_USER, DB_PASSWORD in .env file to complete database settings`, - ), - ); - } - } - checkProjectPath() { if (existsSync(this.cwd)) { console.log(chalk.red('Project directory already exists')); @@ -59,44 +44,14 @@ class AppGenerator extends Generator { } } - checkDialect() { - const dialect = this.args.dbDialect; - const supportDialects = ['mysql', 'mariadb', 'sqlite', 'postgres']; - if (!supportDialects.includes(dialect)) { - console.log( - `dialect ${chalk.red(dialect)} is not supported, currently supported dialects are ${chalk.green( - supportDialects.join(','), - )}.`, - ); - process.exit(1); - } - } - getContext() { const env = this.env; const envs = []; const dependencies = []; - const { dbDialect, allDbDialect } = this.args; - - if (allDbDialect) { - dependencies.push(`"mysql2": "^3.11.0"`); - dependencies.push(`"mariadb": "^2.5.6"`); - dependencies.push(`"pg": "^8.7.3"`); - dependencies.push(`"pg-hstore": "^2.3.4"`); - dependencies.push(`"sqlite3": "^5.0.8"`); - } + const { dbDialect } = this.args; switch (dbDialect) { - case 'sqlite': - if (!allDbDialect) { - dependencies.push(`"sqlite3": "^5.0.8"`); - } - envs.push(`DB_STORAGE=${env.DB_STORAGE || 'storage/db/nocobase.sqlite'}`); - break; case 'mysql': - if (!allDbDialect) { - dependencies.push(`"mysql2": "^3.11.0"`); - } envs.push(`DB_HOST=${env.DB_HOST || 'localhost'}`); envs.push(`DB_PORT=${env.DB_PORT || 3306}`); envs.push(`DB_DATABASE=${env.DB_DATABASE || ''}`); @@ -104,9 +59,6 @@ class AppGenerator extends Generator { envs.push(`DB_PASSWORD=${env.DB_PASSWORD || ''}`); break; case 'mariadb': - if (!allDbDialect) { - dependencies.push(`"mariadb": "^2.5.6"`); - } envs.push(`DB_HOST=${env.DB_HOST || 'localhost'}`); envs.push(`DB_PORT=${env.DB_PORT || 3306}`); envs.push(`DB_DATABASE=${env.DB_DATABASE || ''}`); @@ -115,10 +67,6 @@ class AppGenerator extends Generator { break; case 'kingbase': case 'postgres': - if (!allDbDialect) { - dependencies.push(`"pg": "^8.7.3"`); - dependencies.push(`"pg-hstore": "^2.3.4"`); - } envs.push(`DB_HOST=${env.DB_HOST || 'localhost'}`); envs.push(`DB_PORT=${env.DB_PORT || 5432}`); envs.push(`DB_DATABASE=${env.DB_DATABASE || ''}`); @@ -177,28 +125,33 @@ class AppGenerator extends Generator { async writing() { this.checkProjectPath(); - this.checkDialect(); const { name } = this.context; console.log(`Creating a new NocoBase application at ${chalk.green(name)}`); console.log('Creating files'); + const context = this.getContext(); + this.copyDirectory({ - context: this.getContext(), + context, path: join(__dirname, '../templates/app'), target: this.cwd, }); - this.checkDbEnv(); + const json = { + name: context.name, + ...(await fs.readJSON(join(this.cwd, 'package.json'), 'utf8')), + }; - const skipDevDependencies = this.args.skipDevDependencies; - if (skipDevDependencies) { - const json = await fs.readJSON(join(this.cwd, 'package.json'), 'utf8'); - delete json['devDependencies']; - await fs.writeJSON(join(this.cwd, 'package.json'), json, { encoding: 'utf8', spaces: 2 }); + json['dependencies']['@nocobase/cli'] = context.version; + + if (!this.args.skipDevDependencies) { + json['devDependencies'] = json['devDependencies'] || {}; + json['devDependencies']['@nocobase/devtools'] = context.version; } + await fs.writeJSON(join(this.cwd, 'package.json'), json, { encoding: 'utf8', spaces: 2 }); console.log(''); console.log(chalk.green(`$ cd ${name}`)); console.log(chalk.green(`$ yarn install`)); diff --git a/packages/core/create-nocobase-app/templates/app/package.json.tpl b/packages/core/create-nocobase-app/templates/app/package.json similarity index 78% rename from packages/core/create-nocobase-app/templates/app/package.json.tpl rename to packages/core/create-nocobase-app/templates/app/package.json index 6245ac2fd6..7613d58f4e 100644 --- a/packages/core/create-nocobase-app/templates/app/package.json.tpl +++ b/packages/core/create-nocobase-app/templates/app/package.json @@ -1,5 +1,4 @@ { - "name": "{{{name}}}", "private": true, "workspaces": [ "packages/*/*", @@ -29,14 +28,15 @@ "react-router-dom": "6.28.1", "react-router": "6.28.1", "antd": "5.24.2", - "async": "3.2.6", - "rollup": "4.24.0" + "async": "^3.2.6", + "rollup": "4.24.0", + "semver": "^7.7.1" }, "dependencies": { - "@nocobase/cli": "{{{version}}}", - {{{dependencies}}} - }, - "devDependencies": { - "@nocobase/devtools": "{{{version}}}" + "pm2": "^6.0.5", + "mysql2": "^3.14.0", + "mariadb": "^2.5.6", + "pg": "^8.14.1", + "pg-hstore": "^2.3.4" } -} +} \ No newline at end of file diff --git a/packages/core/data-source-manager/package.json b/packages/core/data-source-manager/package.json index 5774d23528..8c759ca707 100644 --- a/packages/core/data-source-manager/package.json +++ b/packages/core/data-source-manager/package.json @@ -1,18 +1,18 @@ { "name": "@nocobase/data-source-manager", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/actions": "1.7.0-alpha.11", - "@nocobase/cache": "1.7.0-alpha.11", - "@nocobase/database": "1.7.0-alpha.11", - "@nocobase/resourcer": "1.7.0-alpha.11", - "@nocobase/utils": "1.7.0-alpha.11", + "@nocobase/actions": "1.7.0-alpha.12", + "@nocobase/cache": "1.7.0-alpha.12", + "@nocobase/database": "1.7.0-alpha.12", + "@nocobase/resourcer": "1.7.0-alpha.12", + "@nocobase/utils": "1.7.0-alpha.12", "@types/jsonwebtoken": "^8.5.8", - "jsonwebtoken": "^8.5.1" + "jsonwebtoken": "^9.0.2" }, "repository": { "type": "git", diff --git a/packages/core/database/package.json b/packages/core/database/package.json index 5dd1ec75a0..b958d6c654 100644 --- a/packages/core/database/package.json +++ b/packages/core/database/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/database", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "AGPL-3.0", "dependencies": { - "@nocobase/logger": "1.7.0-alpha.11", - "@nocobase/utils": "1.7.0-alpha.11", + "@nocobase/logger": "1.7.0-alpha.12", + "@nocobase/utils": "1.7.0-alpha.12", "async-mutex": "^0.3.2", "chalk": "^4.1.1", "cron-parser": "4.4.0", diff --git a/packages/core/database/src/view-collection.ts b/packages/core/database/src/view-collection.ts index 1654423f66..4901d2d9ab 100644 --- a/packages/core/database/src/view-collection.ts +++ b/packages/core/database/src/view-collection.ts @@ -26,7 +26,7 @@ export class ViewCollection extends Collection { return []; } - return ['create', 'update', 'destroy']; + return ['create', 'update', 'destroy', 'importXlsx', 'destroyMany', 'updateMany']; } protected sequelizeModelOptions(): any { diff --git a/packages/core/devtools/package.json b/packages/core/devtools/package.json index f6ed8fe856..55743aec3d 100644 --- a/packages/core/devtools/package.json +++ b/packages/core/devtools/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/devtools", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./src/index.js", "dependencies": { - "@nocobase/build": "1.7.0-alpha.11", - "@nocobase/client": "1.7.0-alpha.11", - "@nocobase/test": "1.7.0-alpha.11", + "@nocobase/build": "1.7.0-alpha.12", + "@nocobase/client": "1.7.0-alpha.12", + "@nocobase/test": "1.7.0-alpha.12", "@types/koa": "^2.15.0", "@types/koa-bodyparser": "^4.3.4", "@types/lodash": "^4.14.177", diff --git a/packages/core/evaluators/package.json b/packages/core/evaluators/package.json index 88667c5526..f8a84a6fc6 100644 --- a/packages/core/evaluators/package.json +++ b/packages/core/evaluators/package.json @@ -1,13 +1,13 @@ { "name": "@nocobase/evaluators", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "AGPL-3.0", "dependencies": { "@formulajs/formulajs": "4.4.9", - "@nocobase/utils": "1.7.0-alpha.11", + "@nocobase/utils": "1.7.0-alpha.12", "mathjs": "^10.6.0" }, "repository": { diff --git a/packages/core/lock-manager/package.json b/packages/core/lock-manager/package.json index a75559a541..0542f1ca9e 100644 --- a/packages/core/lock-manager/package.json +++ b/packages/core/lock-manager/package.json @@ -1,10 +1,10 @@ { "name": "@nocobase/lock-manager", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "lib/index.js", "license": "AGPL-3.0", "devDependencies": { - "@nocobase/utils": "1.7.0-alpha.11", + "@nocobase/utils": "1.7.0-alpha.12", "async-mutex": "^0.5.0" } } diff --git a/packages/core/logger/package.json b/packages/core/logger/package.json index dfbdd4c74f..c03f7278cc 100644 --- a/packages/core/logger/package.json +++ b/packages/core/logger/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/logger", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "nocobase logging library", "license": "AGPL-3.0", "main": "./lib/index.js", diff --git a/packages/core/resourcer/package.json b/packages/core/resourcer/package.json index d7ec61e634..58cf635c96 100644 --- a/packages/core/resourcer/package.json +++ b/packages/core/resourcer/package.json @@ -1,16 +1,16 @@ { "name": "@nocobase/resourcer", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", "license": "AGPL-3.0", "dependencies": { - "@nocobase/utils": "1.7.0-alpha.11", + "@nocobase/utils": "1.7.0-alpha.12", "deepmerge": "^4.2.2", "koa-compose": "^4.1.0", "lodash": "^4.17.21", - "path-to-regexp": "6.2.2", + "path-to-regexp": "^6.3.0", "qs": "^6.9.4" }, "repository": { diff --git a/packages/core/resourcer/src/resourcer.ts b/packages/core/resourcer/src/resourcer.ts index 6d750e4d20..53ed79a53c 100644 --- a/packages/core/resourcer/src/resourcer.ts +++ b/packages/core/resourcer/src/resourcer.ts @@ -367,7 +367,7 @@ export class ResourceManager { : params.resourceName; ctx.action.params.filterByTk = params.resourceIndex; const query = parseQuery(ctx.request.querystring); - if (pathToRegexp('/resourcer/{:associatedName.}?:resourceName{\\::actionName}').test(ctx.request.path)) { + if (pathToRegexp('/resourcer/:rest(.*)').test(ctx.request.path)) { ctx.action.mergeParams({ ...query, ...params, diff --git a/packages/core/resourcer/src/utils.ts b/packages/core/resourcer/src/utils.ts index 3ef70517e6..b8b9780e4d 100644 --- a/packages/core/resourcer/src/utils.ts +++ b/packages/core/resourcer/src/utils.ts @@ -67,17 +67,25 @@ export function parseRequest(request: ParseRequest, options: ParseOptions = {}): ...(options.accessors || {}), }; const keys = []; - const regexp = pathToRegexp('/resourcer/{:associatedName.}?:resourceName{\\::actionName}', keys); + + const regexp = pathToRegexp('/resourcer/:rest(.*)', keys); const reqPath = decodeURI(request.path); const matches = regexp.exec(reqPath); if (matches) { const params = {}; - keys.forEach((obj, index) => { - if (matches[index + 1] === undefined) { - return; + const [resource, action] = matches[1].split(':'); + const [res1, res2] = resource.split('.'); + if (res1) { + if (res2) { + params['associatedName'] = res1; + params['resourceName'] = res2; + } else { + params['resourceName'] = res1; } - params[obj.name] = matches[index + 1]; - }); + } + if (action) { + params['actionName'] = action; + } return params; } const defaults = { diff --git a/packages/core/sdk/package.json b/packages/core/sdk/package.json index d58e197f72..2e4428ff0a 100644 --- a/packages/core/sdk/package.json +++ b/packages/core/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/sdk", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/core/server/package.json b/packages/core/server/package.json index 1cf7641f8f..3c9082ba8f 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/server", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "AGPL-3.0", @@ -8,25 +8,25 @@ "@formily/json-schema": "2.x", "@hapi/topo": "^6.0.0", "@koa/cors": "^5.0.0", - "@koa/multer": "^3.0.2", - "@koa/router": "^9.4.0", - "@nocobase/acl": "1.7.0-alpha.11", - "@nocobase/actions": "1.7.0-alpha.11", - "@nocobase/auth": "1.7.0-alpha.11", - "@nocobase/cache": "1.7.0-alpha.11", - "@nocobase/data-source-manager": "1.7.0-alpha.11", - "@nocobase/database": "1.7.0-alpha.11", - "@nocobase/evaluators": "1.7.0-alpha.11", - "@nocobase/lock-manager": "1.7.0-alpha.11", - "@nocobase/logger": "1.7.0-alpha.11", - "@nocobase/resourcer": "1.7.0-alpha.11", - "@nocobase/sdk": "1.7.0-alpha.11", - "@nocobase/telemetry": "1.7.0-alpha.11", - "@nocobase/utils": "1.7.0-alpha.11", + "@koa/multer": "^3.1.0", + "@koa/router": "^13.1.0", + "@nocobase/acl": "1.7.0-alpha.12", + "@nocobase/actions": "1.7.0-alpha.12", + "@nocobase/auth": "1.7.0-alpha.12", + "@nocobase/cache": "1.7.0-alpha.12", + "@nocobase/data-source-manager": "1.7.0-alpha.12", + "@nocobase/database": "1.7.0-alpha.12", + "@nocobase/evaluators": "1.7.0-alpha.12", + "@nocobase/lock-manager": "1.7.0-alpha.12", + "@nocobase/logger": "1.7.0-alpha.12", + "@nocobase/resourcer": "1.7.0-alpha.12", + "@nocobase/sdk": "1.7.0-alpha.12", + "@nocobase/telemetry": "1.7.0-alpha.12", + "@nocobase/utils": "1.7.0-alpha.12", "@types/decompress": "4.2.7", "@types/ini": "^1.3.31", "@types/koa-send": "^4.1.3", - "@types/multer": "^1.4.5", + "@types/multer": "^1.4.12", "async-mutex": "^0.5.0", "axios": "^1.7.0", "chalk": "^4.1.1", @@ -45,7 +45,7 @@ "koa-send": "^5.0.1", "koa-static": "^5.0.0", "lodash": "^4.17.21", - "multer": "^1.4.2", + "multer": "^1.4.5-lts.2", "nanoid": "^3.3.11", "semver": "^7.7.1", "serve-handler": "^6.1.6", diff --git a/packages/core/server/src/commands/create-migration.ts b/packages/core/server/src/commands/create-migration.ts index 4b76620f63..e09a488e6f 100644 --- a/packages/core/server/src/commands/create-migration.ts +++ b/packages/core/server/src/commands/create-migration.ts @@ -29,14 +29,13 @@ export default (app: Application) => { 'migrations', `${dayjs().format('YYYYMMDDHHmmss')}-${name}.ts`, ); - const version = app.getVersion(); - // 匹配主版本号、次版本号、小版本号和后缀的正则表达式 + const version = app.getPackageVersion(); const regex = /(\d+)\.(\d+)\.(\d+)(-[\w.]+)?/; const nextVersion = version.replace(regex, (match, major, minor, patch, suffix) => { - // 将小版本号转换为整数并加1 - const newPatch = parseInt(patch) + 1; - // 返回新的版本号 - return `${major}.${minor}.${newPatch}${suffix || ''}`; + if (version.includes('beta') || version.includes('alpha')) { + return `${major}.${minor}.${patch}`; + } + return `${major}.${1 + 1 * minor}.0`; }); const from = pkg === '@nocobase/server' ? `../migration` : '@nocobase/server'; const data = `import { Migration } from '${from}'; diff --git a/packages/core/server/src/plugin-manager/deps.ts b/packages/core/server/src/plugin-manager/deps.ts index ba3365bb1b..f6565d65d6 100644 --- a/packages/core/server/src/plugin-manager/deps.ts +++ b/packages/core/server/src/plugin-manager/deps.ts @@ -15,7 +15,7 @@ const deps: Record = { '@formily': '2.x', '@formily/antd-v5': '1.x', - jsonwebtoken: '8.x', + jsonwebtoken: '9.x', 'cache-manager': '5.x', sequelize: '6.x', umzug: '3.x', @@ -26,7 +26,7 @@ const deps: Record = { 'winston-daily-rotate-file': '4.x', koa: '2.x', '@koa/cors': '5.x', - '@koa/router': '9.x', + '@koa/router': '13.x', multer: '1.x', '@koa/multer': '3.x', 'koa-bodyparser': '4.x', diff --git a/packages/core/telemetry/package.json b/packages/core/telemetry/package.json index c70ab94c78..3edd1c8510 100644 --- a/packages/core/telemetry/package.json +++ b/packages/core/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/telemetry", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "nocobase telemetry library", "license": "AGPL-3.0", "main": "./lib/index.js", @@ -11,7 +11,7 @@ "directory": "packages/telemetry" }, "dependencies": { - "@nocobase/utils": "1.7.0-alpha.11", + "@nocobase/utils": "1.7.0-alpha.12", "@opentelemetry/api": "^1.7.0", "@opentelemetry/instrumentation": "^0.46.0", "@opentelemetry/resources": "^1.19.0", diff --git a/packages/core/test/package.json b/packages/core/test/package.json index ccd4899ec7..45a3461793 100644 --- a/packages/core/test/package.json +++ b/packages/core/test/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/test", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "lib/index.js", "module": "./src/index.ts", "types": "./lib/index.d.ts", @@ -51,7 +51,7 @@ }, "dependencies": { "@faker-js/faker": "8.1.0", - "@nocobase/server": "1.7.0-alpha.11", + "@nocobase/server": "1.7.0-alpha.12", "@playwright/test": "^1.45.3", "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^14.0.0", @@ -69,7 +69,6 @@ "mysql2": "^3.11.0", "pg": "^8.7.3", "pg-hstore": "^2.3.4", - "sqlite3": "^5.0.8", "supertest": "^6.1.6", "vite": "^5.0.0", "vitest": "^1.5.0", diff --git a/packages/core/test/src/scripts/test-db-creator.ts b/packages/core/test/src/scripts/test-db-creator.ts index e496ec1857..2d9bcb0998 100644 --- a/packages/core/test/src/scripts/test-db-creator.ts +++ b/packages/core/test/src/scripts/test-db-creator.ts @@ -7,13 +7,13 @@ * For more information, please refer to: https://www.nocobase.com/agreement. */ -import http from 'http'; -import url from 'url'; -import pg from 'pg'; import dotenv from 'dotenv'; -import path from 'path'; -import mysql from 'mysql2/promise'; +import http from 'http'; import mariadb from 'mariadb'; +import mysql from 'mysql2/promise'; +import path from 'path'; +import pg from 'pg'; +import url from 'url'; dotenv.config({ path: path.resolve(process.cwd(), '.env.test') }); diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index 4d94c3880a..ec79afa8b8 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/utils", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "AGPL-3.0", @@ -13,7 +13,7 @@ "flat-to-nested": "^1.1.1", "graphlib": "^2.1.8", "handlebars": "^4.7.8", - "multer": "^1.4.5-lts.1", + "multer": "^1.4.5-lts.2", "object-path": "^0.11.8" }, "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" diff --git a/packages/core/utils/src/date.ts b/packages/core/utils/src/date.ts index d082c06f70..1baf179e1f 100644 --- a/packages/core/utils/src/date.ts +++ b/packages/core/utils/src/date.ts @@ -236,3 +236,13 @@ export const getDateTimeFormat = (picker, format, showTime, timeFormat) => { } return format; }; + +export function getFormatFromDateStr(dateStr: string): string | null { + if (/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(dateStr)) return 'YYYY-MM-DD HH:mm:ss'; + if (/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) return 'YYYY-MM-DD'; + if (/^\d{4}-\d{2}$/.test(dateStr)) return 'YYYY-MM'; + if (/^\d{4}$/.test(dateStr)) return 'YYYY'; + if (/^\d{4}Q[1-4]$/.test(dateStr)) return 'YYYY[Q]Q'; + if (/^\d{4}-\d{2}-\d{2}T/.test(dateStr)) return 'YYYY-MM-DDTHH:mm:ss.SSSZ'; + return null; +} diff --git a/packages/plugins/@nocobase/plugin-acl/package.json b/packages/plugins/@nocobase/plugin-acl/package.json index 3ee0e40973..20a765ae1d 100644 --- a/packages/plugins/@nocobase/plugin-acl/package.json +++ b/packages/plugins/@nocobase/plugin-acl/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "权限控制", "description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.", "description.zh-CN": "基于角色、资源和操作的权限控制,可以精确控制界面配置权限、数据操作权限、菜单访问权限、插件权限。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/acl", @@ -13,8 +13,8 @@ "Users & permissions" ], "devDependencies": { - "@types/jsonwebtoken": "^8.5.8", - "jsonwebtoken": "^8.5.1", + "@types/jsonwebtoken": "^9.0.9", + "jsonwebtoken": "^9.0.2", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/schemas/scopes.ts b/packages/plugins/@nocobase/plugin-acl/src/client/schemas/scopes.ts index e4195906c7..36f081596c 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/schemas/scopes.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/schemas/scopes.ts @@ -234,7 +234,6 @@ export const scopesSchema: ISchema = { 'x-component': 'Action.Link', 'x-component-props': { openMode: 'drawer', - icon: 'EditOutlined', }, properties: { drawer: { diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json index 6edc7a09c0..7fd1a37de4 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json +++ b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-bulk-edit", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-bulk-edit", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-edit", diff --git a/packages/plugins/@nocobase/plugin-action-bulk-update/package.json b/packages/plugins/@nocobase/plugin-action-bulk-update/package.json index b403878ce7..fda6e140c3 100644 --- a/packages/plugins/@nocobase/plugin-action-bulk-update/package.json +++ b/packages/plugins/@nocobase/plugin-action-bulk-update/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-bulk-update", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-bulk-update", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-bulk-update", diff --git a/packages/plugins/@nocobase/plugin-action-custom-request/package.json b/packages/plugins/@nocobase/plugin-action-custom-request/package.json index 31412d72b3..de0d7ab109 100644 --- a/packages/plugins/@nocobase/plugin-action-custom-request/package.json +++ b/packages/plugins/@nocobase/plugin-action-custom-request/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-custom-request", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-custom-request", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-custom-request", diff --git a/packages/plugins/@nocobase/plugin-action-custom-request/src/client/hooks/useCustomizeRequestActionProps.ts b/packages/plugins/@nocobase/plugin-action-custom-request/src/client/hooks/useCustomizeRequestActionProps.ts index 93739c9c74..deafba7833 100644 --- a/packages/plugins/@nocobase/plugin-action-custom-request/src/client/hooks/useCustomizeRequestActionProps.ts +++ b/packages/plugins/@nocobase/plugin-action-custom-request/src/client/hooks/useCustomizeRequestActionProps.ts @@ -18,6 +18,10 @@ import { useNavigateNoUpdate, useBlockRequestContext, useContextVariable, + useLocalVariables, + useVariables, + replaceVariables, + interpolateVariables, } from '@nocobase/client'; import { isURL } from '@nocobase/utils/client'; import { App } from 'antd'; @@ -38,12 +42,21 @@ export const useCustomizeRequestActionProps = () => { const { modal, message } = App.useApp(); const dataSourceKey = useDataSourceKey(); const { ctx } = useContextVariable(); + const localVariables = useLocalVariables(); + const variables = useVariables(); return { async onClick(e?, callBack?) { - const selectedRecord = field.data?.selectedRowData ? field.data?.selectedRowData : ctx; + const selectedRecord = field?.data?.selectedRowData ? field?.data?.selectedRowData : ctx; const { skipValidator, onSuccess } = actionSchema?.['x-action-settings'] ?? {}; - const { manualClose, redirecting, redirectTo, successMessage, actionAfterSuccess } = onSuccess || {}; + const { + manualClose, + redirecting, + redirectTo, + successMessage: rawSuccessMessage, + actionAfterSuccess, + } = onSuccess || {}; + let successMessage = rawSuccessMessage; const xAction = actionSchema?.['x-action']; if (skipValidator !== true && xAction === 'customize:form:request') { await form.submit(); @@ -71,6 +84,19 @@ export const useCustomizeRequestActionProps = () => { }, responseType: fieldSchema['x-response-type'] === 'stream' ? 'blob' : 'json', }); + try { + const { exp, scope: expScope } = await replaceVariables(successMessage, { + variables, + localVariables: [ + ...localVariables, + { name: '$nResponse', ctx: new Proxy({ ...res?.data, ...res?.data?.data }, {}) }, + ], + }); + successMessage = interpolateVariables(exp, expScope); + } catch (error) { + console.log(error); + } + if (res.headers['content-disposition']) { const contentDisposition = res.headers['content-disposition']; const utf8Match = contentDisposition.match(/filename\*=utf-8''([^;]+)/i); diff --git a/packages/plugins/@nocobase/plugin-action-custom-request/src/client/schemaSettings.ts b/packages/plugins/@nocobase/plugin-action-custom-request/src/client/schemaSettings.ts deleted file mode 100644 index 2a872ac122..0000000000 --- a/packages/plugins/@nocobase/plugin-action-custom-request/src/client/schemaSettings.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * This file is part of the NocoBase (R) project. - * Copyright (c) 2020-2024 NocoBase Co., Ltd. - * Authors: NocoBase Team. - * - * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. - * For more information, please refer to: https://www.nocobase.com/agreement. - */ - -import { useFieldSchema } from '@formily/react'; -import { - AfterSuccess, - ButtonEditor, - RefreshDataBlockRequest, - RemoveButton, - SchemaSettings, - SchemaSettingsLinkageRules, - SecondConFirm, - useCollection, - useCollectionRecord, - useSchemaToolbar, - SchemaSettingAccessControl, - useDataBlockProps, - useCollectionManager_deprecated, -} from '@nocobase/client'; -import { CustomRequestSettingsItem } from './components/CustomRequestActionDesigner'; - -export const customizeCustomRequestActionSettings = new SchemaSettings({ - name: 'actionSettings:customRequest', - items: [ - { - name: 'editButton', - Component: ButtonEditor, - useComponentProps() { - const fieldSchema = useFieldSchema(); - return { - isLink: fieldSchema['x-action'] === 'customize:table:request', - }; - }, - }, - { - name: 'linkageRules', - Component: SchemaSettingsLinkageRules, - useComponentProps() { - const { linkageRulesProps } = useSchemaToolbar(); - return { - ...linkageRulesProps, - }; - }, - }, - { - name: 'secondConFirm', - Component: SecondConFirm, - }, - { - name: 'afterSuccessfulSubmission', - Component: AfterSuccess, - }, - { - name: 'request settings', - Component: CustomRequestSettingsItem, - }, - { - ...SchemaSettingAccessControl, - useVisible() { - return true; - }, - }, - { - name: 'refreshDataBlockRequest', - Component: RefreshDataBlockRequest, - useComponentProps() { - return { - isPopupAction: false, - }; - }, - useVisible() { - const collection = useCollection(); - return !!collection; - }, - }, - { - name: 'delete', - sort: 100, - Component: RemoveButton as any, - useComponentProps() { - const { removeButtonProps } = useSchemaToolbar(); - return removeButtonProps; - }, - }, - ], -}); diff --git a/packages/plugins/@nocobase/plugin-action-custom-request/src/client/schemaSettings.tsx b/packages/plugins/@nocobase/plugin-action-custom-request/src/client/schemaSettings.tsx new file mode 100644 index 0000000000..9f2e680968 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-action-custom-request/src/client/schemaSettings.tsx @@ -0,0 +1,242 @@ +/** + * This file is part of the NocoBase (R) project. + * Copyright (c) 2020-2024 NocoBase Co., Ltd. + * Authors: NocoBase Team. + * + * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. + * For more information, please refer to: https://www.nocobase.com/agreement. + */ + +import { + ButtonEditor, + RefreshDataBlockRequest, + RemoveButton, + SchemaSettings, + SchemaSettingsLinkageRules, + SecondConFirm, + useCollection, + useSchemaToolbar, + SchemaSettingAccessControl, + useDesignable, + useGlobalVariable, + usePlugin, + SchemaSettingsModalItem, + useAfterSuccessOptions, + BlocksSelector, +} from '@nocobase/client'; +import React from 'react'; +import { ISchema, useFieldSchema } from '@formily/react'; +import { useTranslation } from 'react-i18next'; +import { CustomRequestSettingsItem } from './components/CustomRequestActionDesigner'; + +const useVariableOptions = () => { + const scopes = useAfterSuccessOptions(); + const { t } = useTranslation(); + return [ + { + value: '$nResponse', + label: t('Response', { ns: 'client' }), + children: null, + }, + ...scopes.filter((v: any) => ['currentUser', 'currentTime', '$nRole'].includes(v.value)), + ].filter(Boolean); +}; + +const useLinkVariableOptions = () => { + const scopes = useAfterSuccessOptions(); + const environmentVariables = useGlobalVariable('$env'); + return [...scopes.filter((v: any) => v.value !== '$record'), environmentVariables].filter(Boolean); +}; +const useLinkVariableProps = () => { + const scope = useLinkVariableOptions(); + return { + scope, + useTypedConstant: true, + }; +}; +export function AfterSuccess() { + const { dn } = useDesignable(); + const { t } = useTranslation(); + const fieldSchema = useFieldSchema(); + const { onSuccess } = fieldSchema?.['x-action-settings'] || {}; + const templatePlugin: any = usePlugin('@nocobase/plugin-block-template'); + const isInBlockTemplateConfigPage = templatePlugin?.isInBlockTemplateConfigPage?.(); + return ( + { + return { + tooltip: t('After successful submission, the selected data blocks will be automatically refreshed.'), + }; + }, + 'x-component': BlocksSelector, + 'x-hidden': isInBlockTemplateConfigPage, // 模板配置页面暂不支持该配置 + }, + }, + } as ISchema + } + onSubmit={(onSuccess) => { + fieldSchema['x-action-settings']['onSuccess'] = onSuccess; + dn.emit('patch', { + schema: { + ['x-uid']: fieldSchema['x-uid'], + 'x-action-settings': fieldSchema['x-action-settings'], + }, + }); + }} + /> + ); +} + +export const customizeCustomRequestActionSettings = new SchemaSettings({ + name: 'actionSettings:customRequest', + items: [ + { + name: 'editButton', + Component: ButtonEditor, + useComponentProps() { + const fieldSchema = useFieldSchema(); + return { + isLink: fieldSchema['x-action'] === 'customize:table:request', + }; + }, + }, + { + name: 'linkageRules', + Component: SchemaSettingsLinkageRules, + useComponentProps() { + const { linkageRulesProps } = useSchemaToolbar(); + return { + ...linkageRulesProps, + }; + }, + }, + { + name: 'secondConFirm', + Component: SecondConFirm, + }, + { + name: 'afterSuccessfulSubmission', + Component: AfterSuccess, + }, + { + name: 'request settings', + Component: CustomRequestSettingsItem, + }, + { + ...SchemaSettingAccessControl, + useVisible() { + return true; + }, + }, + { + name: 'refreshDataBlockRequest', + Component: RefreshDataBlockRequest, + useComponentProps() { + return { + isPopupAction: false, + }; + }, + useVisible() { + const collection = useCollection(); + return !!collection; + }, + }, + { + name: 'delete', + sort: 100, + Component: RemoveButton as any, + useComponentProps() { + const { removeButtonProps } = useSchemaToolbar(); + return removeButtonProps; + }, + }, + ], +}); diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/package.json b/packages/plugins/@nocobase/plugin-action-duplicate/package.json index 2fce568739..363fa87bb9 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/package.json +++ b/packages/plugins/@nocobase/plugin-action-duplicate/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-duplicate", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-duplicate", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-duplicate", diff --git a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaSettings.test.ts b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaSettings.test.ts index 0b4b86d3f2..5f950ccea9 100644 --- a/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaSettings.test.ts +++ b/packages/plugins/@nocobase/plugin-action-duplicate/src/client/__e2e__/schemaSettings.test.ts @@ -55,6 +55,7 @@ test.describe('direct duplicate & copy into the form and continue to fill in', ( await page.getByRole('menuitem', { name: 'oneToMany' }).click(); await page.getByRole('menuitem', { name: 'manyToOne', exact: true }).click(); await page.getByRole('menuitem', { name: 'manyToMany' }).click(); + await page.mouse.move(300, 0); await page.getByLabel('schema-initializer-ActionBar-createForm:configureActions-general').click(); await page.getByRole('menuitem', { name: 'Submit' }).click(); await page.getByLabel('drawer-Action.Container-general-Duplicate-mask').click(); diff --git a/packages/plugins/@nocobase/plugin-action-export/package.json b/packages/plugins/@nocobase/plugin-action-export/package.json index 98c4cefbad..721b09962c 100644 --- a/packages/plugins/@nocobase/plugin-action-export/package.json +++ b/packages/plugins/@nocobase/plugin-action-export/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "操作:导出记录", "description": "Export filtered records to excel, you can configure which fields to export.", "description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-export", diff --git a/packages/plugins/@nocobase/plugin-action-export/src/server/services/base-exporter.ts b/packages/plugins/@nocobase/plugin-action-export/src/server/services/base-exporter.ts index a86eea3c3d..d699a96b5d 100644 --- a/packages/plugins/@nocobase/plugin-action-export/src/server/services/base-exporter.ts +++ b/packages/plugins/@nocobase/plugin-action-export/src/server/services/base-exporter.ts @@ -1,3 +1,12 @@ +/** + * This file is part of the NocoBase (R) project. + * Copyright (c) 2020-2024 NocoBase Co., Ltd. + * Authors: NocoBase Team. + * + * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. + * For more information, please refer to: https://www.nocobase.com/agreement. + */ + import { FindOptions, ICollection, @@ -10,6 +19,7 @@ import EventEmitter from 'events'; import { deepGet } from '../utils/deep-get'; import path from 'path'; import os from 'os'; +import _ from 'lodash'; export type ExportOptions = { collectionManager: ICollectionManager; @@ -49,11 +59,11 @@ abstract class BaseExporter extends Eve const { collection, chunkSize, repository } = this.options; - const total = await (repository || collection.repository).count(this.getFindOptions()); + const total = await (repository || collection.repository).count(this.getFindOptions(ctx)); let current = 0; await (repository || collection.repository).chunk({ - ...this.getFindOptions(), + ...this.getFindOptions(ctx), chunkSize: chunkSize || 200, callback: async (rows, options) => { for (const row of rows) { @@ -71,31 +81,34 @@ abstract class BaseExporter extends Eve return this.finalize(); } - protected getAppendOptionsFromFields() { - return this.options.fields + protected getAppendOptionsFromFields(ctx?) { + const fields = this.options.fields.map((x) => x[0]); + const hasPermissionFields = _.isEmpty(ctx?.permission?.can?.params) + ? fields + : _.intersection(ctx?.permission?.can?.params?.appends || [], fields); + return hasPermissionFields .map((field) => { - const fieldInstance = this.options.collection.getField(field[0]); + const fieldInstance = this.options.collection.getField(field); if (!fieldInstance) { - throw new Error(`Field "${field[0]}" not found: , please check the fields configuration.`); + throw new Error(`Field "${field}" not found: , please check the fields configuration.`); } if (fieldInstance.isRelationField()) { - return field.join('.'); + return field; } return null; }) .filter(Boolean); } - - protected getFindOptions() { + protected getFindOptions(ctx?) { const { findOptions = {} } = this.options; if (this.limit) { findOptions.limit = this.limit; } - const appendOptions = this.getAppendOptionsFromFields(); + const appendOptions = this.getAppendOptionsFromFields(ctx); if (appendOptions.length) { return { diff --git a/packages/plugins/@nocobase/plugin-action-import/package.json b/packages/plugins/@nocobase/plugin-action-import/package.json index 7ef859058d..b1d56533f0 100644 --- a/packages/plugins/@nocobase/plugin-action-import/package.json +++ b/packages/plugins/@nocobase/plugin-action-import/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "操作:导入记录", "description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.", "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-import", @@ -15,7 +15,7 @@ "@formily/core": "2.x", "@formily/react": "2.x", "@formily/shared": "2.x", - "@koa/multer": "^3.0.2", + "@koa/multer": "^3.1.0", "@types/node-xlsx": "^0.15.1", "antd": "5.x", "async-mutex": "^0.5.0", diff --git a/packages/plugins/@nocobase/plugin-action-import/src/client/index.ts b/packages/plugins/@nocobase/plugin-action-import/src/client/index.ts index 25a89e0419..6c452c3cb1 100644 --- a/packages/plugins/@nocobase/plugin-action-import/src/client/index.ts +++ b/packages/plugins/@nocobase/plugin-action-import/src/client/index.ts @@ -34,7 +34,7 @@ export class PluginActionImportClient extends Plugin { skipScopeCheck: true, }, }, - useVisible: () => useActionAvailable('import'), + useVisible: () => useActionAvailable('importXlsx'), }; const tableActionInitializers = this.app.schemaInitializerManager.get('table:configureActions'); diff --git a/packages/plugins/@nocobase/plugin-action-import/src/server/__tests__/xlsx-importer.test.ts b/packages/plugins/@nocobase/plugin-action-import/src/server/__tests__/xlsx-importer.test.ts index 21153d3760..5f1fff7559 100644 --- a/packages/plugins/@nocobase/plugin-action-import/src/server/__tests__/xlsx-importer.test.ts +++ b/packages/plugins/@nocobase/plugin-action-import/src/server/__tests__/xlsx-importer.test.ts @@ -2156,6 +2156,76 @@ describe('xlsx importer', () => { expect(await Post.repository.count()).toBe(1); }); + it('should filter no permission columns', async () => { + const User = app.db.collection({ + name: 'users', + fields: [ + { + type: 'string', + name: 'name', + }, + { + type: 'string', + name: 'email', + }, + ], + }); + + await app.db.sync(); + + const templateCreator = new TemplateCreator({ + collection: User, + explain: 'test', + columns: [ + { + dataIndex: ['name'], + defaultTitle: '姓名', + }, + { + dataIndex: ['email'], + defaultTitle: '邮箱', + }, + ], + }); + + const template = (await templateCreator.run({ returnXLSXWorkbook: true })) as XLSX.WorkBook; + + const worksheet = template.Sheets[template.SheetNames[0]]; + + XLSX.utils.sheet_add_aoa(worksheet, [['User1', 'test@test.com']], { + origin: 'A3', + }); + + const importer = new XlsxImporter({ + collectionManager: app.mainDataSource.collectionManager, + collection: User, + explain: 'test', + columns: [ + { + dataIndex: ['name'], + defaultTitle: '姓名', + }, + { + dataIndex: ['email'], + defaultTitle: '邮箱', + }, + ], + workbook: template, + }); + await importer.run({ + context: { + permission: { + can: { params: { fields: ['name'] } }, + }, + }, + }); + + expect(await User.repository.count()).toBe(1); + const user = await User.repository.findOne(); + expect(user.get('name')).toBe('User1'); + expect(user.get('email')).not.exist; + }); + it('should import time field successfully', async () => { const TimeCollection = app.db.collection({ name: 'time_tests', diff --git a/packages/plugins/@nocobase/plugin-action-import/src/server/services/xlsx-importer.ts b/packages/plugins/@nocobase/plugin-action-import/src/server/services/xlsx-importer.ts index 6641efcee6..1e850ab8cd 100644 --- a/packages/plugins/@nocobase/plugin-action-import/src/server/services/xlsx-importer.ts +++ b/packages/plugins/@nocobase/plugin-action-import/src/server/services/xlsx-importer.ts @@ -14,6 +14,8 @@ import { Collection as DBCollection, Database } from '@nocobase/database'; import { Transaction } from 'sequelize'; import EventEmitter from 'events'; import { ImportValidationError, ImportError } from '../errors'; +import { Context } from '@nocobase/actions'; +import _ from 'lodash'; export type ImportColumn = { dataIndex: Array; @@ -54,8 +56,9 @@ export class XlsxImporter extends EventEmitter { this.repository = options.repository ? options.repository : options.collection.repository; } - async validate() { - if (this.options.columns.length == 0) { + async validate(ctx?: Context) { + const columns = this.getColumnsByPermission(ctx); + if (columns.length == 0) { throw new ImportValidationError('Columns configuration is empty'); } @@ -66,7 +69,7 @@ export class XlsxImporter extends EventEmitter { } } - const data = await this.getData(); + const data = await this.getData(ctx); return data; } @@ -80,7 +83,7 @@ export class XlsxImporter extends EventEmitter { } try { - await this.validate(); + await this.validate(options.context); const imported = await this.performImport(options); // @ts-ignore @@ -111,7 +114,7 @@ export class XlsxImporter extends EventEmitter { } let hasImportedAutoIncrementPrimary = false; - for (const importedDataIndex of this.options.columns) { + for (const importedDataIndex of this.getColumnsByPermission(options?.context)) { if (importedDataIndex.dataIndex[0] === autoIncrementAttribute) { hasImportedAutoIncrementPrimary = true; break; @@ -150,9 +153,18 @@ export class XlsxImporter extends EventEmitter { this.emit('seqReset', { maxVal, seqName: autoIncrInfo.seqName }); } + private getColumnsByPermission(ctx: Context): ImportColumn[] { + const columns = this.options.columns; + return columns.filter((x) => + _.isEmpty(ctx?.permission?.can?.params) + ? true + : _.includes(ctx?.permission?.can?.params?.fields || [], x.dataIndex[0]), + ); + } + async performImport(options?: RunOptions): Promise { const transaction = options?.transaction; - const data = await this.getData(); + const data = await this.getData(options?.context); const chunks = lodash.chunk(data.slice(1), this.options.chunkSize || 200); let handingRowIndex = 1; @@ -271,25 +283,26 @@ export class XlsxImporter extends EventEmitter { return str; } - private getExpectedHeaders(): string[] { - return this.options.columns.map((col) => col.title || col.defaultTitle); + private getExpectedHeaders(ctx?: Context): string[] { + const columns = this.getColumnsByPermission(ctx); + return columns.map((col) => col.title || col.defaultTitle); } - async getData() { + async getData(ctx?: Context) { const workbook = this.options.workbook; const worksheet = workbook.Sheets[workbook.SheetNames[0]]; - const data = XLSX.utils.sheet_to_json(worksheet, { header: 1, defval: null }) as string[][]; + let data = XLSX.utils.sheet_to_json(worksheet, { header: 1, defval: null }) as string[][]; // Find and validate header row - const expectedHeaders = this.getExpectedHeaders(); - const { headerRowIndex, headers } = this.findAndValidateHeaders(data); + const expectedHeaders = this.getExpectedHeaders(ctx); + const { headerRowIndex, headers } = this.findAndValidateHeaders({ data, expectedHeaders }); if (headerRowIndex === -1) { throw new ImportValidationError('Headers not found. Expected headers: {{headers}}', { headers: expectedHeaders.join(', '), }); } - + data = this.alignWithHeaders({ data, expectedHeaders, headers }); // Extract data rows const rows = data.slice(headerRowIndex + 1); @@ -301,8 +314,18 @@ export class XlsxImporter extends EventEmitter { return [headers, ...rows]; } - private findAndValidateHeaders(data: string[][]): { headerRowIndex: number; headers: string[] } { - const expectedHeaders = this.getExpectedHeaders(); + private alignWithHeaders(params: { headers: string[]; expectedHeaders: string[]; data: string[][] }): string[][] { + const { expectedHeaders, headers, data } = params; + const keepCols = headers.map((x, i) => (expectedHeaders.includes(x) ? i : -1)).filter((i) => i > -1); + + return data.map((row) => keepCols.map((i) => row[i])); + } + + private findAndValidateHeaders(options: { expectedHeaders: string[]; data: string[][] }): { + headerRowIndex: number; + headers: string[]; + } { + const { data, expectedHeaders } = options; // Find header row and validate for (let rowIndex = 0; rowIndex < data.length; rowIndex++) { @@ -310,31 +333,11 @@ export class XlsxImporter extends EventEmitter { const actualHeaders = row.filter((cell) => cell !== null && cell !== ''); const allHeadersFound = expectedHeaders.every((header) => actualHeaders.includes(header)); - const noExtraHeaders = actualHeaders.length === expectedHeaders.length; - if (allHeadersFound && noExtraHeaders) { - const mismatchIndex = expectedHeaders.findIndex((title, index) => actualHeaders[index] !== title); - - if (mismatchIndex === -1) { - // All headers match - return { headerRowIndex: rowIndex, headers: actualHeaders }; - } else { - // Found potential header row but with mismatch - throw new ImportValidationError( - 'Header mismatch at column {{column}}: expected "{{expected}}", but got "{{actual}}"', - { - column: mismatchIndex + 1, - expected: expectedHeaders[mismatchIndex], - actual: actualHeaders[mismatchIndex] || 'empty', - }, - ); - } + if (allHeadersFound) { + const orderedHeaders = expectedHeaders.filter((h) => actualHeaders.includes(h)); + return { headerRowIndex: rowIndex, headers: orderedHeaders }; } } - - // No row with matching headers found - throw new ImportValidationError('Headers not found. Expected headers: {{headers}}', { - headers: expectedHeaders.join(', '), - }); } } diff --git a/packages/plugins/@nocobase/plugin-action-print/package.json b/packages/plugins/@nocobase/plugin-action-print/package.json index bc6dfce4ca..26d27d2488 100644 --- a/packages/plugins/@nocobase/plugin-action-print/package.json +++ b/packages/plugins/@nocobase/plugin-action-print/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-action-print", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/action-print", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/action-print", diff --git a/packages/plugins/@nocobase/plugin-ai/package.json b/packages/plugins/@nocobase/plugin-ai/package.json index 68ba33e54f..a54dd67fff 100644 --- a/packages/plugins/@nocobase/plugin-ai/package.json +++ b/packages/plugins/@nocobase/plugin-ai/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "AI 集成", "description": "Support integration with AI services, providing AI-related workflow nodes to enhance business processing capabilities.", "description.zh-CN": "支持接入 AI 服务,提供 AI 相关的工作流节点,增强业务处理能力。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "peerDependencies": { "@nocobase/client": "1.x", diff --git a/packages/plugins/@nocobase/plugin-ai/src/client/schemas/llms.ts b/packages/plugins/@nocobase/plugin-ai/src/client/schemas/llms.ts index c945abc595..1a4cff6066 100644 --- a/packages/plugins/@nocobase/plugin-ai/src/client/schemas/llms.ts +++ b/packages/plugins/@nocobase/plugin-ai/src/client/schemas/llms.ts @@ -187,7 +187,6 @@ export const llmsSchema = { 'x-component': 'Action.Link', 'x-component-props': { openMode: 'drawer', - icon: 'EditOutlined', }, properties: { drawer: { diff --git a/packages/plugins/@nocobase/plugin-api-doc/package.json b/packages/plugins/@nocobase/plugin-api-doc/package.json index 1885d5c275..aeb9d61b4c 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/package.json +++ b/packages/plugins/@nocobase/plugin-api-doc/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-api-doc", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "API documentation", "displayName.zh-CN": "API 文档", "description": "An OpenAPI documentation generator for NocoBase HTTP API.", diff --git a/packages/plugins/@nocobase/plugin-api-keys/package.json b/packages/plugins/@nocobase/plugin-api-keys/package.json index 248e051be4..6317e406f5 100644 --- a/packages/plugins/@nocobase/plugin-api-keys/package.json +++ b/packages/plugins/@nocobase/plugin-api-keys/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:API 密钥", "description": "Allows users to use API key to access application's HTTP API", "description.zh-CN": "允许用户使用 API 密钥访问应用的 HTTP API", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/api-keys", diff --git a/packages/plugins/@nocobase/plugin-async-task-manager/package.json b/packages/plugins/@nocobase/plugin-async-task-manager/package.json index 185c71ea5e..f6f9d97594 100644 --- a/packages/plugins/@nocobase/plugin-async-task-manager/package.json +++ b/packages/plugins/@nocobase/plugin-async-task-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "异步任务管理器", "description": "Manage and monitor asynchronous tasks such as data import/export. Support task progress tracking and notification.", "description.zh-CN": "管理和监控数据导入导出等异步任务。支持任务进度跟踪和通知。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "peerDependencies": { "@nocobase/client": "1.x", diff --git a/packages/plugins/@nocobase/plugin-audit-logs/package.json b/packages/plugins/@nocobase/plugin-audit-logs/package.json index 03d19886e6..4e763a7c6f 100644 --- a/packages/plugins/@nocobase/plugin-audit-logs/package.json +++ b/packages/plugins/@nocobase/plugin-audit-logs/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-audit-logs", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Audit logs (deprecated)", "displayName.zh-CN": "审计日志(废弃)", "description": "This plugin is deprecated. There will be a new audit log plugin in the future.", diff --git a/packages/plugins/@nocobase/plugin-auth-sms/package.json b/packages/plugins/@nocobase/plugin-auth-sms/package.json index 4155dd1fcb..b6a92aa71b 100644 --- a/packages/plugins/@nocobase/plugin-auth-sms/package.json +++ b/packages/plugins/@nocobase/plugin-auth-sms/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "认证:短信", "description": "SMS authentication.", "description.zh-CN": "通过短信验证码认证身份。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth-sms", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth-sms", diff --git a/packages/plugins/@nocobase/plugin-auth/package.json b/packages/plugins/@nocobase/plugin-auth/package.json index 24ff85f6ec..915d93bf26 100644 --- a/packages/plugins/@nocobase/plugin-auth/package.json +++ b/packages/plugins/@nocobase/plugin-auth/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-auth", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/auth", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/auth", diff --git a/packages/plugins/@nocobase/plugin-backup-restore/package.json b/packages/plugins/@nocobase/plugin-backup-restore/package.json index 050b0f31f4..16b51aab9e 100644 --- a/packages/plugins/@nocobase/plugin-backup-restore/package.json +++ b/packages/plugins/@nocobase/plugin-backup-restore/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "应用的备份与还原(废弃)", "description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.", "description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/backup-restore", diff --git a/packages/plugins/@nocobase/plugin-block-iframe/package.json b/packages/plugins/@nocobase/plugin-block-iframe/package.json index 64268369a4..b91e70c78a 100644 --- a/packages/plugins/@nocobase/plugin-block-iframe/package.json +++ b/packages/plugins/@nocobase/plugin-block-iframe/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "区块:iframe", "description": "Create an iframe block on the page to embed and display external web pages or content.", "description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/block-iframe", diff --git a/packages/plugins/@nocobase/plugin-block-template/package.json b/packages/plugins/@nocobase/plugin-block-template/package.json index 51837bc095..d5f815035b 100644 --- a/packages/plugins/@nocobase/plugin-block-template/package.json +++ b/packages/plugins/@nocobase/plugin-block-template/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "区块:模板", "description": "Create and manage block templates for reuse on pages.", "description.zh-CN": "创建和管理区块模板,用于在页面中重复使用。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/block-template", diff --git a/packages/plugins/@nocobase/plugin-block-template/src/client/components/BlockTemplateMenusProvider.tsx b/packages/plugins/@nocobase/plugin-block-template/src/client/components/BlockTemplateMenusProvider.tsx index 192524154b..5187b6b7db 100644 --- a/packages/plugins/@nocobase/plugin-block-template/src/client/components/BlockTemplateMenusProvider.tsx +++ b/packages/plugins/@nocobase/plugin-block-template/src/client/components/BlockTemplateMenusProvider.tsx @@ -68,7 +68,7 @@ export const BlockTemplateMenusProvider = ({ children }) => { method: 'get', params: { filter: { - configured: true, + configured: { $isTruly: true }, type: isMobile ? 'Mobile' : { $ne: 'Mobile' }, }, paginate: false, diff --git a/packages/plugins/@nocobase/plugin-block-template/src/client/components/ConvertToNormalBlockSetting.tsx b/packages/plugins/@nocobase/plugin-block-template/src/client/components/ConvertToNormalBlockSetting.tsx new file mode 100644 index 0000000000..2f1310fe8c --- /dev/null +++ b/packages/plugins/@nocobase/plugin-block-template/src/client/components/ConvertToNormalBlockSetting.tsx @@ -0,0 +1,182 @@ +/** + * This file is part of the NocoBase (R) project. + * Copyright (c) 2020-2024 NocoBase Co., Ltd. + * Authors: NocoBase Team. + * + * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. + * For more information, please refer to: https://www.nocobase.com/agreement. + */ + +import { SchemaSettingsItem, useAPIClient, useDesignable, useFormBlockProps } from '@nocobase/client'; +import { useFieldSchema, useForm, useField } from '@formily/react'; +import { App } from 'antd'; +import React from 'react'; +import _ from 'lodash'; +import { Schema } from '@formily/json-schema'; +import { useT } from '../locale'; +import { uid } from '@nocobase/utils/client'; + +const findInsertPosition = (parentSchema, uid) => { + const postion = { + insertPosition: 'beforeBegin', + insertTarget: null, + }; + const properties = Object.values(parentSchema.properties || {}).sort((a, b) => { + return (a as any)['x-index'] - (b as any)['x-index']; + }); + for (let i = 0; i < properties.length; i++) { + const property = properties[i]; + if ((property as any)['x-uid'] === uid) { + postion.insertPosition = 'beforeBegin'; + if (i === properties.length - 1) { + postion.insertPosition = 'beforeEnd'; + postion.insertTarget = parentSchema['x-uid']; + } else { + postion.insertPosition = 'beforeBegin'; + postion.insertTarget = (properties[i + 1] as any)['x-uid']; + } + } + } + return postion; +}; + +const findParentRootTemplateSchema = (fieldSchema) => { + if (!fieldSchema) { + return null; + } + if (fieldSchema['x-template-root-uid']) { + return fieldSchema; + } else { + return findParentRootTemplateSchema(fieldSchema.parent); + } +}; + +// Create a copy of the schema with all template associations removed +const convertToNormalBlockSchema = (schema) => { + const newSchema = _.cloneDeep(schema); + + // Remove template associations from the schema + const removeTemplateAssociations = (s) => { + // Remove template-specific properties + delete s['x-template-uid']; + delete s['x-template-root-uid']; + delete s['x-template-version']; + delete s['x-block-template-key']; + delete s['x-template-root-ref']; + delete s['x-template-title']; + delete s['x-virtual']; + + if (s['x-toolbar-props']?.toolbarClassName?.includes('nb-in-template')) { + s['x-toolbar-props'].toolbarClassName = s['x-toolbar-props'].toolbarClassName.replace('nb-in-template', ''); + } + + if (s['x-uid']) { + s['x-uid'] = uid(); + } + // Process nested properties + if (s.properties) { + for (const key in s.properties) { + if (!s.properties[key]['x-template-root-uid']) { + removeTemplateAssociations(s.properties[key]); + } + } + } + }; + + removeTemplateAssociations(newSchema); + return newSchema; +}; + +export const ConvertToNormalBlockSetting = () => { + const { refresh } = useDesignable(); + const t = useT(); + const api = useAPIClient(); + const form = useForm(); + const field = useField(); + const { form: blockForm } = useFormBlockProps(); + const fieldSchema = useFieldSchema(); + const { modal, message } = App.useApp(); + const blockTemplatesResource = api.resource('blockTemplates'); + + const confirm = { + okText: t('Yes'), + cancelText: t('No'), + }; + + return ( + { + modal.confirm({ + title: t('Convert to normal block'), + content: t('Are you sure you want to convert this template block to a normal block?'), + ...confirm, + async onOk() { + const newSchema = convertToNormalBlockSchema(fieldSchema.toJSON()); + const position = findInsertPosition(fieldSchema.parent, fieldSchema['x-uid']); + // TODO: Remove old schema, and links + + // Remove old schema + await api.request({ + url: `/uiSchemas:remove/${fieldSchema['x-uid']}`, + }); + + // Insert new schema + const schema = new Schema(newSchema); + await api.request({ + url: `/uiSchemas:insertAdjacent/${position.insertTarget}?position=${position.insertPosition}`, + method: 'post', + data: { + schema, + }, + }); + + // Update the UI to show the new schema + fieldSchema.toJSON = () => { + const ret = schema.toJSON(); + return ret; + }; + + refresh({ refreshParentSchema: true }); + + // Update component properties + field['componentProps'] = { + ...field['componentProps'], + key: uid(), + }; + + if (field.parent?.['componentProps']) { + field.parent['componentProps'] = { + ...field.parent['componentProps'], + key: uid(), + }; + } + + // Update decorator properties + field['decoratorProps'] = { + ...field['decoratorProps'], + key: uid(), + }; + + if (field.parent?.['decoratorProps']) { + field.parent['decoratorProps'] = { + ...field.parent['decoratorProps'], + key: uid(), + }; + } + + // Reset forms + form.reset(); + blockForm?.reset(); + form.clearFormGraph('*', false); + blockForm?.clearFormGraph('*', false); + + message.success(t('Converted successfully'), 0.2); + }, + }); + }} + > + {t('Convert to normal block')} + + ); +}; diff --git a/packages/plugins/@nocobase/plugin-block-template/src/client/components/SaveAsTemplateSetting.tsx b/packages/plugins/@nocobase/plugin-block-template/src/client/components/SaveAsTemplateSetting.tsx index 1ab2d6a7a5..769c7622f5 100644 --- a/packages/plugins/@nocobase/plugin-block-template/src/client/components/SaveAsTemplateSetting.tsx +++ b/packages/plugins/@nocobase/plugin-block-template/src/client/components/SaveAsTemplateSetting.tsx @@ -74,7 +74,7 @@ export const SaveAsTemplateSetting = () => { key: { type: 'string', 'x-decorator': 'FormItem', - title: t('Key'), + title: t('Name'), 'x-component': 'Input', 'x-validator': 'uid', required: true, @@ -298,6 +298,10 @@ function getTemplateSchemaFromPage(schema: ISchema) { } _.set(t, `properties.['${key}']`, {}); traverseSchema(s.properties[key], t.properties[key]); + // array's key will be set to number when render, so we need to set the name to the key + if (s.type === 'array' && t['properties']?.[key]?.name) { + _.set(t, `properties.['${key}'].name`, key); + } } } }; diff --git a/packages/plugins/@nocobase/plugin-block-template/src/client/hooks/useIsPageBlock.ts b/packages/plugins/@nocobase/plugin-block-template/src/client/hooks/useIsPageBlock.ts index 86a2e0e4e2..e89dd5108e 100644 --- a/packages/plugins/@nocobase/plugin-block-template/src/client/hooks/useIsPageBlock.ts +++ b/packages/plugins/@nocobase/plugin-block-template/src/client/hooks/useIsPageBlock.ts @@ -22,8 +22,9 @@ export const useIsPageBlock = () => { const isPage = location.pathname.startsWith('/admin/') || location.pathname.startsWith('/page/'); const notInPopup = !location.pathname.includes('/popups/'); const notInSetting = !location.pathname.startsWith('/admin/settings/'); + const notInWorkflow = !location.pathname.startsWith('/admin/workflow/workflows/'); const notInBlockTemplate = !location.pathname.startsWith('/block-templates/'); - return isPage && notInPopup && notInSetting && notInBlockTemplate; + return isPage && notInPopup && notInSetting && notInWorkflow && notInBlockTemplate; }, [location.pathname, fieldSchema]); return isPageBlock; diff --git a/packages/plugins/@nocobase/plugin-block-template/src/client/index.tsx b/packages/plugins/@nocobase/plugin-block-template/src/client/index.tsx index f143dc158d..cd25300a80 100644 --- a/packages/plugins/@nocobase/plugin-block-template/src/client/index.tsx +++ b/packages/plugins/@nocobase/plugin-block-template/src/client/index.tsx @@ -28,6 +28,8 @@ import { import { BlockTemplateMenusProvider } from './components/BlockTemplateMenusProvider'; import { disabledDeleteSettingItem } from './settings/disabledDeleteSetting'; import { saveAsTemplateSetting } from './settings/saveAsTemplateSetting'; +import { convertToNormalBlockSettingItem } from './settings/convertToNormalBlockSetting'; + export class PluginBlockTemplateClient extends Plugin { templateInfos = new Map(); templateschemacache = {}; @@ -158,9 +160,10 @@ export class PluginBlockTemplateClient extends Plugin { deleteItemIndex !== -1 && !schemaSetting.items.find((item) => item.name === 'template-revertSettingItem') ) { - schemaSetting.items.splice(deleteItemIndex, 0, revertSettingItem); + schemaSetting.items.splice(deleteItemIndex, 0, revertSettingItem, convertToNormalBlockSettingItem); } else { schemaSetting.add('template-revertSettingItem', revertSettingItem); + schemaSetting.add('template-convertToNormalBlockSettingItem', convertToNormalBlockSettingItem); } schemaSetting.add('template-disabledDeleteItem', disabledDeleteSettingItem); } diff --git a/packages/plugins/@nocobase/plugin-block-template/src/client/schemas/editActionSchema.ts b/packages/plugins/@nocobase/plugin-block-template/src/client/schemas/editActionSchema.ts index 9a4365844f..40fcb34290 100644 --- a/packages/plugins/@nocobase/plugin-block-template/src/client/schemas/editActionSchema.ts +++ b/packages/plugins/@nocobase/plugin-block-template/src/client/schemas/editActionSchema.ts @@ -15,7 +15,6 @@ export const editActionSchema = { 'x-component': 'Action.Link', 'x-component-props': { openMode: 'drawer', - icon: 'EditOutlined', }, properties: { drawer: { diff --git a/packages/plugins/@nocobase/plugin-block-template/src/client/settings/convertToNormalBlockSetting.ts b/packages/plugins/@nocobase/plugin-block-template/src/client/settings/convertToNormalBlockSetting.ts new file mode 100644 index 0000000000..4539c27af8 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-block-template/src/client/settings/convertToNormalBlockSetting.ts @@ -0,0 +1,23 @@ +/** + * This file is part of the NocoBase (R) project. + * Copyright (c) 2020-2024 NocoBase Co., Ltd. + * Authors: NocoBase Team. + * + * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. + * For more information, please refer to: https://www.nocobase.com/agreement. + */ + +import { useFieldSchema } from '@formily/react'; +import { ConvertToNormalBlockSetting } from '../components/ConvertToNormalBlockSetting'; +import { tStr } from '../locale'; +import { useIsInTemplate } from '../hooks/useIsInTemplate'; + +export const convertToNormalBlockSettingItem = { + name: 'template-convertToNormalBlockSettingItem', + title: tStr('Convert to normal block'), + Component: ConvertToNormalBlockSetting, + useVisible: () => { + const fieldSchema = useFieldSchema(); + return fieldSchema?.['x-template-root-uid']; + }, +}; diff --git a/packages/plugins/@nocobase/plugin-block-template/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-block-template/src/locale/en-US.json index 6acd6419ea..9f737f2a9c 100644 --- a/packages/plugins/@nocobase/plugin-block-template/src/locale/en-US.json +++ b/packages/plugins/@nocobase/plugin-block-template/src/locale/en-US.json @@ -12,7 +12,9 @@ "Mobile": "Mobile", "Current": "Current record", "Revert to template": "Revert to template", + "Convert to normal block": "Convert to normal block", "Are you sure you want to revert all changes from the template?": "Are you sure you want to revert all changes from the template?", + "Are you sure you want to convert this template block to a normal block?": "Are you sure you want to convert this template block to a normal block?", "Templates": "Templates", "Block templates": "Block templates", "Submit": "Submit", @@ -22,6 +24,7 @@ "Saved successfully": "Saved successfully", "Block template": "Block template", "Reset successfully": "Reset successfully", + "Converted successfully": "Converted successfully", "Delete successfully": "Delete successfully", "Template block settings": "Template block settings", "Filter": "Filter", diff --git a/packages/plugins/@nocobase/plugin-block-template/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-block-template/src/locale/zh-CN.json index be27745c26..57bdbbb754 100644 --- a/packages/plugins/@nocobase/plugin-block-template/src/locale/zh-CN.json +++ b/packages/plugins/@nocobase/plugin-block-template/src/locale/zh-CN.json @@ -12,7 +12,9 @@ "Mobile": "移动端", "Current": "当前记录", "Revert to template": "恢复到模板", + "Convert to normal block": "转换成普通区块", "Are you sure you want to revert all changes from the template?": "您确定要恢复所有对模板的更改吗?", + "Are you sure you want to convert this template block to a normal block?": "您确定要将此模板区块转换为普通区块吗?", "Templates": "模板", "Block templates": "区块模板", "Submit": "提交", @@ -22,6 +24,7 @@ "Saved successfully": "保存成功", "Block template": "区块模板", "Reset successfully": "重置成功", + "Converted successfully": "转换成功", "Delete successfully": "删除成功", "Template block settings": "模板区块设置", "Filter": "筛选", diff --git a/packages/plugins/@nocobase/plugin-block-workbench/package.json b/packages/plugins/@nocobase/plugin-block-workbench/package.json index 436343e691..38d7a6d406 100644 --- a/packages/plugins/@nocobase/plugin-block-workbench/package.json +++ b/packages/plugins/@nocobase/plugin-block-workbench/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-block-workbench", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Block: Action panel", "displayName.zh-CN": "区块:操作面板", "description": "Centrally manages and displays various actions, allowing users to efficiently perform tasks. It supports extensibility, with current action types including pop-ups, links, scanning, and custom requests.", diff --git a/packages/plugins/@nocobase/plugin-calendar/package.json b/packages/plugins/@nocobase/plugin-calendar/package.json index 3b4e77feb8..3950a36005 100644 --- a/packages/plugins/@nocobase/plugin-calendar/package.json +++ b/packages/plugins/@nocobase/plugin-calendar/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-calendar", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Calendar", "displayName.zh-CN": "日历", "description": "Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on.", diff --git a/packages/plugins/@nocobase/plugin-charts/package.json b/packages/plugins/@nocobase/plugin-charts/package.json index 6d91b5ba8c..6c24b0f541 100644 --- a/packages/plugins/@nocobase/plugin-charts/package.json +++ b/packages/plugins/@nocobase/plugin-charts/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "图表(废弃)", "description": "The plugin has been deprecated, please use the data visualization plugin instead.", "description.zh-CN": "已废弃插件,请使用数据可视化插件代替。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-client/package.json b/packages/plugins/@nocobase/plugin-client/package.json index 5e9e25bc22..31127b8b72 100644 --- a/packages/plugins/@nocobase/plugin-client/package.json +++ b/packages/plugins/@nocobase/plugin-client/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "WEB 客户端", "description": "Provides a client interface for the NocoBase server", "description.zh-CN": "为 NocoBase 服务端提供客户端界面", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "license": "AGPL-3.0", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-collection-sql/package.json b/packages/plugins/@nocobase/plugin-collection-sql/package.json index d32f59a53d..16e6ef368f 100644 --- a/packages/plugins/@nocobase/plugin-collection-sql/package.json +++ b/packages/plugins/@nocobase/plugin-collection-sql/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表: SQL", "description": "Provides SQL collection template", "description.zh-CN": "提供 SQL 数据表模板", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "homepage": "https://docs-cn.nocobase.com/handbook/collection-sql", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/collection-sql", "main": "dist/server/index.js", diff --git a/packages/plugins/@nocobase/plugin-collection-sql/src/server/sql-collection/sql-collection.ts b/packages/plugins/@nocobase/plugin-collection-sql/src/server/sql-collection/sql-collection.ts index f34ad946ba..947aaac6d9 100644 --- a/packages/plugins/@nocobase/plugin-collection-sql/src/server/sql-collection/sql-collection.ts +++ b/packages/plugins/@nocobase/plugin-collection-sql/src/server/sql-collection/sql-collection.ts @@ -42,7 +42,7 @@ export class SQLCollection extends Collection { } unavailableActions(): Array { - return ['create', 'update', 'destroy']; + return ['create', 'update', 'destroy', 'importXlsx', 'destroyMany', 'updateMany']; } public collectionSchema() { diff --git a/packages/plugins/@nocobase/plugin-collection-tree/package.json b/packages/plugins/@nocobase/plugin-collection-tree/package.json index 07ccedfe77..2048100c32 100644 --- a/packages/plugins/@nocobase/plugin-collection-tree/package.json +++ b/packages/plugins/@nocobase/plugin-collection-tree/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-collection-tree", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Collection: Tree", "displayName.zh-CN": "数据表:树", "description": "Provides tree collection template", diff --git a/packages/plugins/@nocobase/plugin-data-source-main/package.json b/packages/plugins/@nocobase/plugin-data-source-main/package.json index 5ff106cf26..47b4fc92b3 100644 --- a/packages/plugins/@nocobase/plugin-data-source-main/package.json +++ b/packages/plugins/@nocobase/plugin-data-source-main/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据源:主数据库", "description": "NocoBase main database, supports relational databases such as PostgreSQL, MySQL, MariaDB and so on.", "description.zh-CN": "NocoBase 主数据库,支持 PostgreSQL、MySQL、MariaDB 等关系型数据库。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/data-source-main", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main", diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/package.json b/packages/plugins/@nocobase/plugin-data-source-manager/package.json index af1b3ef74d..4389e4d7c3 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/package.json +++ b/packages/plugins/@nocobase/plugin-data-source-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-data-source-manager", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "displayName": "Data source manager", "displayName.zh-CN": "数据源管理", diff --git a/packages/plugins/@nocobase/plugin-data-visualization/package.json b/packages/plugins/@nocobase/plugin-data-visualization/package.json index 0f928eeaba..9c981af307 100644 --- a/packages/plugins/@nocobase/plugin-data-visualization/package.json +++ b/packages/plugins/@nocobase/plugin-data-visualization/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-data-visualization", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Data visualization", "displayName.zh-CN": "数据可视化", "description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.", diff --git a/packages/plugins/@nocobase/plugin-departments/package.json b/packages/plugins/@nocobase/plugin-departments/package.json index e6ba44c503..71f976e43f 100644 --- a/packages/plugins/@nocobase/plugin-departments/package.json +++ b/packages/plugins/@nocobase/plugin-departments/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "部门", "description": "Organize users by departments, set hierarchical relationships, link roles to control permissions, and use departments as variables in workflows and expressions.", "description.zh-CN": "以部门来组织用户,设定上下级关系,绑定角色控制权限,并支持作为变量用于工作流和表达式。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "peerDependencies": { "@nocobase/actions": "1.x", diff --git a/packages/plugins/@nocobase/plugin-disable-pm-add/package.json b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json index d48830cb4b..e11932b3c8 100644 --- a/packages/plugins/@nocobase/plugin-disable-pm-add/package.json +++ b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-disable-pm-add", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "peerDependencies": { "@nocobase/client": "1.x", diff --git a/packages/plugins/@nocobase/plugin-environment-variables/package.json b/packages/plugins/@nocobase/plugin-environment-variables/package.json index d46ff68b16..2fdf6a521c 100644 --- a/packages/plugins/@nocobase/plugin-environment-variables/package.json +++ b/packages/plugins/@nocobase/plugin-environment-variables/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-environment-variables", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "peerDependencies": { "@nocobase/client": "1.x", diff --git a/packages/plugins/@nocobase/plugin-error-handler/package.json b/packages/plugins/@nocobase/plugin-error-handler/package.json index fa41b1aa1f..d9c2b0ba36 100644 --- a/packages/plugins/@nocobase/plugin-error-handler/package.json +++ b/packages/plugins/@nocobase/plugin-error-handler/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "错误处理器", "description": "Handling application errors and exceptions.", "description.zh-CN": "处理应用程序中的错误和异常。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "devDependencies": { diff --git a/packages/plugins/@nocobase/plugin-field-attachment-url/package.json b/packages/plugins/@nocobase/plugin-field-attachment-url/package.json index a174250d96..c3dccbf78c 100644 --- a/packages/plugins/@nocobase/plugin-field-attachment-url/package.json +++ b/packages/plugins/@nocobase/plugin-field-attachment-url/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-field-attachment-url", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "displayName": "Collection field: Attachment(URL)", "displayName.zh-CN": "数据表字段:附件(URL)", diff --git a/packages/plugins/@nocobase/plugin-field-china-region/package.json b/packages/plugins/@nocobase/plugin-field-china-region/package.json index cf65196fb5..9fd02e0634 100644 --- a/packages/plugins/@nocobase/plugin-field-china-region/package.json +++ b/packages/plugins/@nocobase/plugin-field-china-region/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-field-china-region", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Collection field: administrative divisions of China", "displayName.zh-CN": "数据表字段:中国行政区划", "description": "Provides data and field type for administrative divisions of China.", diff --git a/packages/plugins/@nocobase/plugin-field-formula/package.json b/packages/plugins/@nocobase/plugin-field-formula/package.json index b7e3b1e03c..72e51f1d0b 100644 --- a/packages/plugins/@nocobase/plugin-field-formula/package.json +++ b/packages/plugins/@nocobase/plugin-field-formula/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:公式", "description": "Configure and store the results of calculations between multiple field values in the same record, supporting both Math.js and Excel formula functions.", "description.zh-CN": "可以配置并存储同一条记录的多字段值之间的计算结果,支持 Math.js 和 Excel formula functions 两种引擎", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-formula", diff --git a/packages/plugins/@nocobase/plugin-field-m2m-array/package.json b/packages/plugins/@nocobase/plugin-field-m2m-array/package.json index 65621e764a..26be605694 100644 --- a/packages/plugins/@nocobase/plugin-field-m2m-array/package.json +++ b/packages/plugins/@nocobase/plugin-field-m2m-array/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:多对多 (数组)", "description": "Allows to create many to many relationships between two models by storing an array of unique keys of the target model.", "description.zh-CN": "支持通过在数组中存储目标表唯一键的方式建立多对多关系。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "peerDependencies": { "@nocobase/client": "1.x", diff --git a/packages/plugins/@nocobase/plugin-field-markdown-vditor/package.json b/packages/plugins/@nocobase/plugin-field-markdown-vditor/package.json index 516562a881..7176b430d7 100644 --- a/packages/plugins/@nocobase/plugin-field-markdown-vditor/package.json +++ b/packages/plugins/@nocobase/plugin-field-markdown-vditor/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:Markdown(Vditor)", "description": "Used to store Markdown and render it using Vditor editor, supports common Markdown syntax such as list, code, quote, etc., and supports uploading images, recordings, etc.It also allows for instant rendering, where what you see is what you get.", "description.zh-CN": "用于存储 Markdown,并使用 Vditor 编辑器渲染,支持常见 Markdown 语法,如列表,代码,引用等,并支持上传图片,录音等。同时可以做到即时渲染,所见即所得。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-markdown-vditor", diff --git a/packages/plugins/@nocobase/plugin-field-sequence/package.json b/packages/plugins/@nocobase/plugin-field-sequence/package.json index 3f740cb220..2e352f4a3b 100644 --- a/packages/plugins/@nocobase/plugin-field-sequence/package.json +++ b/packages/plugins/@nocobase/plugin-field-sequence/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:自动编码", "description": "Automatically generate codes based on configured rules, supporting combinations of dates, numbers, and text.", "description.zh-CN": "根据配置的规则自动生成编码,支持日期、数字、文本的组合。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-sequence", diff --git a/packages/plugins/@nocobase/plugin-field-sort/package.json b/packages/plugins/@nocobase/plugin-field-sort/package.json index 435cddc733..22ae4b34b4 100644 --- a/packages/plugins/@nocobase/plugin-field-sort/package.json +++ b/packages/plugins/@nocobase/plugin-field-sort/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-field-sort", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "displayName": "Collection field: Sort", "displayName.zh-CN": "数据表字段:排序", diff --git a/packages/plugins/@nocobase/plugin-file-manager/package.json b/packages/plugins/@nocobase/plugin-file-manager/package.json index 8ea463b760..e6702db4eb 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/package.json +++ b/packages/plugins/@nocobase/plugin-file-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-file-manager", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "File manager", "displayName.zh-CN": "文件管理器", "description": "Provides files storage services with files collection template and attachment field.", @@ -15,15 +15,15 @@ "@formily/core": "2.x", "@formily/react": "2.x", "@formily/shared": "2.x", - "@koa/multer": "^3.0.0", - "@types/koa-multer": "^1.0.1", + "@koa/multer": "^3.1.0", + "@types/koa-multer": "^1.0.4", "@types/multer": "^1.4.5", "antd": "5.x", "cos-nodejs-sdk-v5": "^2.11.14", "koa-static": "^5.0.0", "mime-match": "^1.0.2", "mkdirp": "~0.5.4", - "multer": "^1.4.2", + "multer": "^1.4.5-lts.2", "multer-aliyun-oss": "2.1.3", "multer-cos": "^1.0.3", "multer-s3": "^3.0.1", diff --git a/packages/plugins/@nocobase/plugin-gantt/package.json b/packages/plugins/@nocobase/plugin-gantt/package.json index 241e270f0c..18ed2495b0 100644 --- a/packages/plugins/@nocobase/plugin-gantt/package.json +++ b/packages/plugins/@nocobase/plugin-gantt/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-gantt", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Block: Gantt", "displayName.zh-CN": "区块:甘特图", "description": "Provides Gantt block.", diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/calendar.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/calendar.tsx index ec81615d9f..4024a5faa8 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/calendar.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/calendar.tsx @@ -52,12 +52,7 @@ export const Calendar: React.FC = ({ const date = dateSetup.dates[i]; const bottomValue = date.getFullYear(); bottomValues.push( - + {bottomValue} , ); @@ -98,7 +93,7 @@ export const Calendar: React.FC = ({ key={date.getTime()} y={headerHeight * 0.8} x={columnWidth * i + columnWidth * 0.5} - className={cx('calendarBottomText')} + className={styles.calendarBottomText} > {quarter} , @@ -118,7 +113,7 @@ export const Calendar: React.FC = ({ x1Line={columnWidth * i} y1Line={0} y2Line={topDefaultHeight} - xText={Math.abs(xText)} + xText={Math.abs(xText) - 200} yText={topDefaultHeight * 0.9} />, ); @@ -139,7 +134,7 @@ export const Calendar: React.FC = ({ key={bottomValue + date.getFullYear()} y={headerHeight * 0.8} x={columnWidth * i + columnWidth * 0.5} - className={cx('calendarBottomText')} + className={styles.calendarBottomText} > {bottomValue} , @@ -189,7 +184,7 @@ export const Calendar: React.FC = ({ key={date.getTime()} y={headerHeight * 0.8} x={columnWidth * (i + +rtl)} - className={cx('calendarBottomText')} + className={styles.calendarBottomText} > {bottomValue} , diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/style.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/style.tsx index b222628f6f..306b91e70d 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/style.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/calendar/style.tsx @@ -23,6 +23,9 @@ const useStyles = createStyles(({ token, css }) => { background: ${colorFillAlterSolid}; border-bottom: 1px solid ${token.colorBorderSecondary}; `, + calendarBottomText: css` + font-size: 11px; + `, nbGanttCalendar: css` .calendarbottomtext: { textanchor: middle; diff --git a/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/gantt.tsx b/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/gantt.tsx index 27ad8c0123..4764299ba3 100644 --- a/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/gantt.tsx +++ b/packages/plugins/@nocobase/plugin-gantt/src/client/components/gantt/gantt.tsx @@ -47,7 +47,7 @@ import { TaskGantt } from './task-gantt'; import { TaskGanttContentProps } from './task-gantt-content'; const getColumnWidth = (dataSetLength: any, clientWidth: any) => { - const columnWidth = clientWidth / dataSetLength > 50 ? Math.floor(clientWidth / dataSetLength) + 20 : 50; + const columnWidth = clientWidth / dataSetLength > 50 ? Math.floor(clientWidth / dataSetLength) + 20 : 60; return columnWidth; }; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json index 2ce1dff039..70cd32ef29 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "可视化数据表管理", "description": "An ER diagram-like tool. Currently only the Master database is supported.", "description.zh-CN": "类似 ER 图的工具,目前只支持主数据库。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/graph-collection-manager", diff --git a/packages/plugins/@nocobase/plugin-kanban/package.json b/packages/plugins/@nocobase/plugin-kanban/package.json index 0acd5c8217..6d987ad752 100644 --- a/packages/plugins/@nocobase/plugin-kanban/package.json +++ b/packages/plugins/@nocobase/plugin-kanban/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-kanban", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/block-kanban", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/block-kanban", diff --git a/packages/plugins/@nocobase/plugin-locale-tester/package.json b/packages/plugins/@nocobase/plugin-locale-tester/package.json index 327a32c4c6..a49538dba8 100644 --- a/packages/plugins/@nocobase/plugin-locale-tester/package.json +++ b/packages/plugins/@nocobase/plugin-locale-tester/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-locale-tester", "displayName": "Locale tester", "displayName.zh-CN": "翻译测试工具", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "homepage": "https://github.com/nocobase/locales", "main": "dist/server/index.js", "peerDependencies": { diff --git a/packages/plugins/@nocobase/plugin-localization/package.json b/packages/plugins/@nocobase/plugin-localization/package.json index 30eb37c08a..2db1d7f8df 100644 --- a/packages/plugins/@nocobase/plugin-localization/package.json +++ b/packages/plugins/@nocobase/plugin-localization/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-localization", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/localization-management", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management", diff --git a/packages/plugins/@nocobase/plugin-logger/package.json b/packages/plugins/@nocobase/plugin-logger/package.json index 20116132a2..dc89d5abb3 100644 --- a/packages/plugins/@nocobase/plugin-logger/package.json +++ b/packages/plugins/@nocobase/plugin-logger/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "日志", "description": "Server-side logs, mainly including API request logs and system runtime logs, and allows to package and download log files.", "description.zh-CN": "服务端日志,主要包括接口请求日志和系统运行日志,并支持打包和下载日志文件。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/logger", diff --git a/packages/plugins/@nocobase/plugin-map/package.json b/packages/plugins/@nocobase/plugin-map/package.json index 43e2951ff3..6548a11382 100644 --- a/packages/plugins/@nocobase/plugin-map/package.json +++ b/packages/plugins/@nocobase/plugin-map/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-map", "displayName": "Block: Map", "displayName.zh-CN": "区块:地图", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "Map block, support Gaode map and Google map, you can also extend more map types.", "description.zh-CN": "地图区块,支持高德地图和 Google 地图,你也可以扩展更多地图类型。", "license": "AGPL-3.0", diff --git a/packages/plugins/@nocobase/plugin-mobile-client/package.json b/packages/plugins/@nocobase/plugin-mobile-client/package.json index 33853bca25..06c2d4bf68 100644 --- a/packages/plugins/@nocobase/plugin-mobile-client/package.json +++ b/packages/plugins/@nocobase/plugin-mobile-client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-mobile-client", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/mobile-client", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client", diff --git a/packages/plugins/@nocobase/plugin-mobile/package.json b/packages/plugins/@nocobase/plugin-mobile/package.json index af3767a3ee..5eed7a31f6 100644 --- a/packages/plugins/@nocobase/plugin-mobile/package.json +++ b/packages/plugins/@nocobase/plugin-mobile/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-mobile", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/mobile", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile", diff --git a/packages/plugins/@nocobase/plugin-mobile/src/client/pages/dynamic-page/components/MobileDatePicker.tsx b/packages/plugins/@nocobase/plugin-mobile/src/client/pages/dynamic-page/components/MobileDatePicker.tsx index 70ae6b67c4..e0f88cc014 100644 --- a/packages/plugins/@nocobase/plugin-mobile/src/client/pages/dynamic-page/components/MobileDatePicker.tsx +++ b/packages/plugins/@nocobase/plugin-mobile/src/client/pages/dynamic-page/components/MobileDatePicker.tsx @@ -140,8 +140,8 @@ const MobileDateTimePicker = connect( }} precision={showTime && picker === 'date' ? getPrecision(timeFormat) : picker === 'date' ? 'day' : picker} renderLabel={labelRenderer} - min={minDate || rest.min || new Date(1000, 0, 1)} - max={maxDate || rest.max || new Date(9999, 11, 31)} + min={minDate || rest.min || new Date(1950, 0, 1)} + max={maxDate || rest.max || new Date(2050, 11, 31)} onConfirm={(val) => { handleConfirm(val); }} diff --git a/packages/plugins/@nocobase/plugin-mobile/src/client/pages/dynamic-page/header/navigation-bar/actions/mobile-navigation-bar-action/styles.ts b/packages/plugins/@nocobase/plugin-mobile/src/client/pages/dynamic-page/header/navigation-bar/actions/mobile-navigation-bar-action/styles.ts index 06751439b7..ee2bdba69d 100644 --- a/packages/plugins/@nocobase/plugin-mobile/src/client/pages/dynamic-page/header/navigation-bar/actions/mobile-navigation-bar-action/styles.ts +++ b/packages/plugins/@nocobase/plugin-mobile/src/client/pages/dynamic-page/header/navigation-bar/actions/mobile-navigation-bar-action/styles.ts @@ -29,6 +29,10 @@ export const useStyles = genStyleHook('nb-mobile-navigation-bar-action', (token) display: 'flex', alignItems: 'center', justifyContent: 'center', + + '& > span': { + position: 'relative', + }, }, '.nb-navigation-bar-action-title': { fontSize: 17, diff --git a/packages/plugins/@nocobase/plugin-mock-collections/package.json b/packages/plugins/@nocobase/plugin-mock-collections/package.json index 62f74c6994..016a395b5e 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/package.json +++ b/packages/plugins/@nocobase/plugin-mock-collections/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-mock-collections", "displayName": "mock-collections", "description": "mock-collections", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "license": "AGPL-3.0", "peerDependencies": { diff --git a/packages/plugins/@nocobase/plugin-mock-collections/src/server/collection-templates/index.ts b/packages/plugins/@nocobase/plugin-mock-collections/src/server/collection-templates/index.ts index 254f1a88c3..f1838da1a2 100644 --- a/packages/plugins/@nocobase/plugin-mock-collections/src/server/collection-templates/index.ts +++ b/packages/plugins/@nocobase/plugin-mock-collections/src/server/collection-templates/index.ts @@ -199,7 +199,7 @@ export default { value: 'formula.js', label: 'Formula.js', tooltip: '{{t("Formula.js supports most Microsoft Excel formula functions.")}}', - link: 'https://formulajs.info/functions/', + link: 'https://docs.nocobase.com/handbook/calculation-engines/formula', }, ], default: 'formula.js', diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json index 2030a90e2a..af3fae0ff8 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "多应用管理器", "description": "Dynamically create multiple apps without separate deployments.", "description.zh-CN": "无需单独部署即可动态创建多个应用。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/multi-app-manager", diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json index 71bc9c4d28..09db4f9eaf 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "多应用数据表共享", "description": "", "description.zh-CN": "", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "devDependencies": { "@formily/react": "2.x", diff --git a/packages/plugins/@nocobase/plugin-notification-email/package.json b/packages/plugins/@nocobase/plugin-notification-email/package.json index 5254afa5d6..ecd74fafc9 100644 --- a/packages/plugins/@nocobase/plugin-notification-email/package.json +++ b/packages/plugins/@nocobase/plugin-notification-email/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-notification-email", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Notification: Email", "displayName.zh-CN": "通知:电子邮件", "description": "Used for sending email notifications with built-in SMTP transport.", diff --git a/packages/plugins/@nocobase/plugin-notification-in-app-message/package.json b/packages/plugins/@nocobase/plugin-notification-in-app-message/package.json index b999b960c6..dd4e8bc17f 100644 --- a/packages/plugins/@nocobase/plugin-notification-in-app-message/package.json +++ b/packages/plugins/@nocobase/plugin-notification-in-app-message/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-notification-in-app-message", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Notification: In-app message", "displayName.zh-CN": "通知:站内信", "description": "It supports users in receiving real-time message notifications within the NocoBase application.", diff --git a/packages/plugins/@nocobase/plugin-notification-manager/package.json b/packages/plugins/@nocobase/plugin-notification-manager/package.json index 770d91fe31..955250cc1f 100644 --- a/packages/plugins/@nocobase/plugin-notification-manager/package.json +++ b/packages/plugins/@nocobase/plugin-notification-manager/package.json @@ -4,7 +4,7 @@ "description": "Provides a unified management service that includes channel configuration, logging, and other features, supporting the configuration of various notification channels, including in-app message and email.", "displayName.zh-CN": "通知管理", "description.zh-CN": "提供统一的管理服务,涵盖渠道配置、日志记录等功能,支持多种通知渠道的配置,包括站内信和电子邮件等。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "homepage": "https://docs.nocobase.com/handbook/notification-manager", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/notification-manager", "main": "dist/server/index.js", diff --git a/packages/plugins/@nocobase/plugin-notification-manager/src/client/manager/channel/schemas/index.ts b/packages/plugins/@nocobase/plugin-notification-manager/src/client/manager/channel/schemas/index.ts index a031292bb6..b77e3b5c80 100644 --- a/packages/plugins/@nocobase/plugin-notification-manager/src/client/manager/channel/schemas/index.ts +++ b/packages/plugins/@nocobase/plugin-notification-manager/src/client/manager/channel/schemas/index.ts @@ -185,7 +185,6 @@ export const channelsSchema: ISchema = { 'x-component': 'Action.Link', 'x-component-props': { openMode: 'drawer', - icon: 'EditOutlined', }, 'x-use-component-props': 'useRecordEditActionProps', 'x-decorator': 'Space', diff --git a/packages/plugins/@nocobase/plugin-notification-manager/src/client/manager/log/schemas/index.ts b/packages/plugins/@nocobase/plugin-notification-manager/src/client/manager/log/schemas/index.ts index 054c70254b..84f8fff4dd 100644 --- a/packages/plugins/@nocobase/plugin-notification-manager/src/client/manager/log/schemas/index.ts +++ b/packages/plugins/@nocobase/plugin-notification-manager/src/client/manager/log/schemas/index.ts @@ -259,7 +259,6 @@ export const messageLogsManagerSchema: ISchema = { 'x-component': 'Action.Link', 'x-component-props': { openMode: 'drawer', - icon: 'EditOutlined', }, properties: { drawer: { diff --git a/packages/plugins/@nocobase/plugin-notifications/package.json b/packages/plugins/@nocobase/plugin-notifications/package.json index e9fb5d6b5a..acb356fc78 100644 --- a/packages/plugins/@nocobase/plugin-notifications/package.json +++ b/packages/plugins/@nocobase/plugin-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-notifications", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "description": "", "license": "AGPL-3.0", "main": "./dist/server/index.js", diff --git a/packages/plugins/@nocobase/plugin-public-forms/package.json b/packages/plugins/@nocobase/plugin-public-forms/package.json index 9a1d24fdfb..e96296c570 100644 --- a/packages/plugins/@nocobase/plugin-public-forms/package.json +++ b/packages/plugins/@nocobase/plugin-public-forms/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-public-forms", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "displayName": "Public forms", "displayName.zh-CN": "公开表单", diff --git a/packages/plugins/@nocobase/plugin-public-forms/src/client/schemas/editActionSchema.ts b/packages/plugins/@nocobase/plugin-public-forms/src/client/schemas/editActionSchema.ts index 53c3ffa77f..402f79d01f 100644 --- a/packages/plugins/@nocobase/plugin-public-forms/src/client/schemas/editActionSchema.ts +++ b/packages/plugins/@nocobase/plugin-public-forms/src/client/schemas/editActionSchema.ts @@ -13,7 +13,6 @@ export const editActionSchema = { 'x-component': 'Action.Link', 'x-component-props': { openMode: 'drawer', - icon: 'EditOutlined', }, properties: { drawer: { diff --git a/packages/plugins/@nocobase/plugin-sample-hello/package.json b/packages/plugins/@nocobase/plugin-sample-hello/package.json index d6c79d85ee..22ddeed1b0 100644 --- a/packages/plugins/@nocobase/plugin-sample-hello/package.json +++ b/packages/plugins/@nocobase/plugin-sample-hello/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-sample-hello", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "./dist/server/index.js", "displayName": "Hello", "displayName.zh-CN": "Hello", diff --git a/packages/plugins/@nocobase/plugin-snapshot-field/package.json b/packages/plugins/@nocobase/plugin-snapshot-field/package.json index d6837aeb32..98679848c9 100644 --- a/packages/plugins/@nocobase/plugin-snapshot-field/package.json +++ b/packages/plugins/@nocobase/plugin-snapshot-field/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "数据表字段:关系快照", "description": "When adding a new record, create a snapshot for its relational record and save in the new record. The snapshot will not be updated when the relational record is updated.", "description.zh-CN": "在添加数据时,为它的关系数据创建快照,并保存在当前的数据中。关系数据更新时,快照不会更新。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/field-snapshot", diff --git a/packages/plugins/@nocobase/plugin-system-settings/package.json b/packages/plugins/@nocobase/plugin-system-settings/package.json index 44f1467c0c..da68907e12 100644 --- a/packages/plugins/@nocobase/plugin-system-settings/package.json +++ b/packages/plugins/@nocobase/plugin-system-settings/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "系统设置", "description": "Used to adjust the system title, logo, language, etc.", "description.zh-CN": "用于调整系统的标题、LOGO、语言等。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/system-settings", diff --git a/packages/plugins/@nocobase/plugin-theme-editor/package.json b/packages/plugins/@nocobase/plugin-theme-editor/package.json index 0edb35befb..bb983a1194 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/package.json +++ b/packages/plugins/@nocobase/plugin-theme-editor/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-theme-editor", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/theme-editor", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/theme-editor", diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json index 693128c61c..108f739405 100644 --- a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json +++ b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "UI schema 存储服务", "description": "Provides centralized UI schema storage service.", "description.zh-CN": "提供中心化的 UI schema 存储服务。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/ui-schema-storage", diff --git a/packages/plugins/@nocobase/plugin-user-data-sync/package.json b/packages/plugins/@nocobase/plugin-user-data-sync/package.json index a156748c19..21c53f1011 100644 --- a/packages/plugins/@nocobase/plugin-user-data-sync/package.json +++ b/packages/plugins/@nocobase/plugin-user-data-sync/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "用户数据同步", "description": "Reigster and manage extensible user data synchronization sources, with HTTP API provided by default. Support for synchronizing data to resources such as users and departments.", "description.zh-CN": "注册和管理可扩展的用户数据同步来源,默认提供 HTTP API。支持向用户和部门等资源同步数据。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "main": "dist/server/index.js", "peerDependencies": { "@nocobase/client": "1.x", diff --git a/packages/plugins/@nocobase/plugin-users/package.json b/packages/plugins/@nocobase/plugin-users/package.json index f4f83dae2e..6cae727483 100644 --- a/packages/plugins/@nocobase/plugin-users/package.json +++ b/packages/plugins/@nocobase/plugin-users/package.json @@ -4,14 +4,14 @@ "displayName.zh-CN": "用户", "description": "Provides basic user model, as well as created by and updated by fields.", "description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/users", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/users", "devDependencies": { - "@types/jsonwebtoken": "^8.5.8", - "jsonwebtoken": "^8.5.1" + "@types/jsonwebtoken": "^9.0.9", + "jsonwebtoken": "^9.0.2" }, "peerDependencies": { "@nocobase/actions": "1.x", diff --git a/packages/plugins/@nocobase/plugin-verification/package.json b/packages/plugins/@nocobase/plugin-verification/package.json index ea37012e50..41522eba4e 100644 --- a/packages/plugins/@nocobase/plugin-verification/package.json +++ b/packages/plugins/@nocobase/plugin-verification/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "验证", "description": "User identity verification management, including SMS, TOTP authenticator, with extensibility.", "description.zh-CN": "用户身份验证管理,包含短信、TOTP 认证器等,可扩展。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/verification", diff --git a/packages/plugins/@nocobase/plugin-verification/src/client/schemas/verificators.ts b/packages/plugins/@nocobase/plugin-verification/src/client/schemas/verificators.ts index 9115298ca0..f7393c4314 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/client/schemas/verificators.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/client/schemas/verificators.ts @@ -207,7 +207,6 @@ export const verficatorsSchema: ISchema = { 'x-component': 'Action.Link', 'x-component-props': { openMode: 'drawer', - icon: 'EditOutlined', }, properties: { drawer: { diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json index 44f2eaa1e3..3c3232a3a4 100644 --- a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:操作后事件", "description": "Triggered after the completion of a request initiated through an action button or API, such as after adding, updating, deleting data, or \"submit to workflow\". Suitable for data processing, sending notifications, etc., after actions are completed.", "description.zh-CN": "通过操作按钮或 API 发起请求并在执行完成后触发,比如新增、更新、删除数据或者“提交至工作流”之后。适用于在操作完成后进行数据处理、发送通知等。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/plugins/workflow-action-trigger", diff --git a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json index 05f78f5de1..39fceba385 100644 --- a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:聚合查询节点", "description": "Used to aggregate data against the database in workflow, such as: statistics, sum, average, etc.", "description.zh-CN": "可用于在工作流中对数据库进行聚合查询,如:统计数量、求和、平均值等。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-aggregate", diff --git a/packages/plugins/@nocobase/plugin-workflow-delay/package.json b/packages/plugins/@nocobase/plugin-workflow-delay/package.json index 31f12b8bf1..f56fd7a7dc 100644 --- a/packages/plugins/@nocobase/plugin-workflow-delay/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-delay/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:延时节点", "description": "Could be used in workflow parallel branch for waiting other branches.", "description.zh-CN": "可用于工作流并行分支中等待其他分支执行完成。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-delay", diff --git a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json index 2c5f15c9bd..7b96d47931 100644 --- a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:动态表达式计算节点", "description": "Useful plugin for doing dynamic calculation based on expression collection records in workflow.", "description.zh-CN": "用于在工作流中进行基于数据行的动态表达式计算。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-dynamic-calculation", diff --git a/packages/plugins/@nocobase/plugin-workflow-loop/package.json b/packages/plugins/@nocobase/plugin-workflow-loop/package.json index cb001a0e24..74c8560983 100644 --- a/packages/plugins/@nocobase/plugin-workflow-loop/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-loop/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:循环节点", "description": "Used to repeat the sub-process processing of each value in an array, and can also be used for fixed times of sub-process processing.", "description.zh-CN": "用于对一个数组中的每个值进行重复的子流程处理,也可用于固定次数的重复子流程处理。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-loop", diff --git a/packages/plugins/@nocobase/plugin-workflow-mailer/package.json b/packages/plugins/@nocobase/plugin-workflow-mailer/package.json index 8ea55cc31f..5e423ba104 100644 --- a/packages/plugins/@nocobase/plugin-workflow-mailer/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-mailer/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:邮件发送节点", "description": "Send email in workflow.", "description.zh-CN": "可用于在工作流中发送电子邮件。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer", diff --git a/packages/plugins/@nocobase/plugin-workflow-manual/package.json b/packages/plugins/@nocobase/plugin-workflow-manual/package.json index c566a6a25a..f74e563d96 100644 --- a/packages/plugins/@nocobase/plugin-workflow-manual/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-manual/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:人工处理节点", "description": "Could be used for workflows which some of decisions are made by users.", "description.zh-CN": "用于人工控制部分决策的流程。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-manual", diff --git a/packages/plugins/@nocobase/plugin-workflow-notification/package.json b/packages/plugins/@nocobase/plugin-workflow-notification/package.json index d99263dafb..0cd44af169 100644 --- a/packages/plugins/@nocobase/plugin-workflow-notification/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-notification/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:通知节点", "description": "Send notification in workflow.", "description.zh-CN": "可用于在工作流中发送各类通知。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-smtp-mailer", diff --git a/packages/plugins/@nocobase/plugin-workflow-parallel/package.json b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json index ca93769c56..4478bb0cec 100644 --- a/packages/plugins/@nocobase/plugin-workflow-parallel/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:并行分支节点", "description": "Could be used for parallel execution of branch processes in the workflow.", "description.zh-CN": "用于在工作流中需要并行执行的分支流程。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-parallel", diff --git a/packages/plugins/@nocobase/plugin-workflow-request/package.json b/packages/plugins/@nocobase/plugin-workflow-request/package.json index 1e04339826..d583a96467 100644 --- a/packages/plugins/@nocobase/plugin-workflow-request/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-request/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:HTTP 请求节点", "description": "Send HTTP requests to any HTTP service for data interaction in workflow.", "description.zh-CN": "可用于在工作流中向任意 HTTP 服务发送请求,进行数据交互。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-request", diff --git a/packages/plugins/@nocobase/plugin-workflow-response-message/package.json b/packages/plugins/@nocobase/plugin-workflow-response-message/package.json index cc9961a5f0..bef64ceb90 100644 --- a/packages/plugins/@nocobase/plugin-workflow-response-message/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-response-message/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-workflow-response-message", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "displayName": "Workflow: Response message", "displayName.zh-CN": "工作流:响应消息", "description": "Used for assemble response message and showing to client in form event and request interception workflows.", diff --git a/packages/plugins/@nocobase/plugin-workflow-sql/package.json b/packages/plugins/@nocobase/plugin-workflow-sql/package.json index 004ffd5fef..e0dbe72e94 100644 --- a/packages/plugins/@nocobase/plugin-workflow-sql/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-sql/package.json @@ -4,7 +4,7 @@ "displayName.zh-CN": "工作流:SQL 节点", "description": "Execute SQL statements in workflow.", "description.zh-CN": "可用于在工作流中对数据库执行任意 SQL 语句。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow-sql", diff --git a/packages/plugins/@nocobase/plugin-workflow-test/package.json b/packages/plugins/@nocobase/plugin-workflow-test/package.json index 74af5a3c0d..ce66a4bf55 100644 --- a/packages/plugins/@nocobase/plugin-workflow-test/package.json +++ b/packages/plugins/@nocobase/plugin-workflow-test/package.json @@ -2,7 +2,7 @@ "name": "@nocobase/plugin-workflow-test", "displayName": "Workflow: test kit", "displayName.zh-CN": "工作流:测试工具包", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "dist/server/index.js", "types": "./dist/server/index.d.ts", diff --git a/packages/plugins/@nocobase/plugin-workflow-test/src/e2e/e2eCollectionModel.ts b/packages/plugins/@nocobase/plugin-workflow-test/src/e2e/e2eCollectionModel.ts index 10709e0ae7..9dbbd3aded 100644 --- a/packages/plugins/@nocobase/plugin-workflow-test/src/e2e/e2eCollectionModel.ts +++ b/packages/plugins/@nocobase/plugin-workflow-test/src/e2e/e2eCollectionModel.ts @@ -882,7 +882,7 @@ export const builtinExpression = { value: 'formula.js', label: 'Formula.js', tooltip: '{{t("Formula.js supports most Microsoft Excel formula functions.")}}', - link: 'https://formulajs.info/functions/', + link: 'https://docs.nocobase.com/handbook/calculation-engines/formula', }, ], default: 'formula.js', diff --git a/packages/plugins/@nocobase/plugin-workflow/package.json b/packages/plugins/@nocobase/plugin-workflow/package.json index e1b5002f46..c942f2d4c4 100644 --- a/packages/plugins/@nocobase/plugin-workflow/package.json +++ b/packages/plugins/@nocobase/plugin-workflow/package.json @@ -4,13 +4,13 @@ "displayName.zh-CN": "工作流", "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.", "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./dist/server/index.js", "homepage": "https://docs.nocobase.com/handbook/workflow", "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow", "dependencies": { - "@nocobase/plugin-workflow-test": "1.7.0-alpha.11" + "@nocobase/plugin-workflow-test": "1.7.0-alpha.12" }, "devDependencies": { "@ant-design/icons": "5.x", diff --git a/packages/presets/nocobase/package.json b/packages/presets/nocobase/package.json index f6e9809d02..0b80affd11 100644 --- a/packages/presets/nocobase/package.json +++ b/packages/presets/nocobase/package.json @@ -1,85 +1,85 @@ { "name": "@nocobase/preset-nocobase", - "version": "1.7.0-alpha.11", + "version": "1.7.0-alpha.12", "license": "AGPL-3.0", "main": "./lib/server/index.js", "dependencies": { "@formily/json-schema": "2.x", - "@nocobase/plugin-acl": "1.7.0-alpha.11", - "@nocobase/plugin-action-bulk-edit": "1.7.0-alpha.11", - "@nocobase/plugin-action-bulk-update": "1.7.0-alpha.11", - "@nocobase/plugin-action-custom-request": "1.7.0-alpha.11", - "@nocobase/plugin-action-duplicate": "1.7.0-alpha.11", - "@nocobase/plugin-action-export": "1.7.0-alpha.11", - "@nocobase/plugin-action-import": "1.7.0-alpha.11", - "@nocobase/plugin-action-print": "1.7.0-alpha.11", - "@nocobase/plugin-ai": "1.7.0-alpha.11", - "@nocobase/plugin-api-doc": "1.7.0-alpha.11", - "@nocobase/plugin-api-keys": "1.7.0-alpha.11", - "@nocobase/plugin-async-task-manager": "1.7.0-alpha.11", - "@nocobase/plugin-audit-logs": "1.7.0-alpha.11", - "@nocobase/plugin-auth": "1.7.0-alpha.11", - "@nocobase/plugin-auth-sms": "1.7.0-alpha.11", - "@nocobase/plugin-backup-restore": "1.7.0-alpha.11", - "@nocobase/plugin-block-iframe": "1.7.0-alpha.11", - "@nocobase/plugin-block-template": "1.7.0-alpha.11", - "@nocobase/plugin-block-workbench": "1.7.0-alpha.11", - "@nocobase/plugin-calendar": "1.7.0-alpha.11", - "@nocobase/plugin-charts": "1.7.0-alpha.11", - "@nocobase/plugin-client": "1.7.0-alpha.11", - "@nocobase/plugin-collection-sql": "1.7.0-alpha.11", - "@nocobase/plugin-collection-tree": "1.7.0-alpha.11", - "@nocobase/plugin-data-source-main": "1.7.0-alpha.11", - "@nocobase/plugin-data-source-manager": "1.7.0-alpha.11", - "@nocobase/plugin-data-visualization": "1.7.0-alpha.11", - "@nocobase/plugin-departments": "1.7.0-alpha.11", - "@nocobase/plugin-environment-variables": "1.7.0-alpha.11", - "@nocobase/plugin-error-handler": "1.7.0-alpha.11", - "@nocobase/plugin-field-attachment-url": "1.7.0-alpha.11", - "@nocobase/plugin-field-china-region": "1.7.0-alpha.11", - "@nocobase/plugin-field-formula": "1.7.0-alpha.11", - "@nocobase/plugin-field-m2m-array": "1.7.0-alpha.11", - "@nocobase/plugin-field-markdown-vditor": "1.7.0-alpha.11", - "@nocobase/plugin-field-sequence": "1.7.0-alpha.11", - "@nocobase/plugin-field-sort": "1.7.0-alpha.11", - "@nocobase/plugin-file-manager": "1.7.0-alpha.11", - "@nocobase/plugin-gantt": "1.7.0-alpha.11", - "@nocobase/plugin-graph-collection-manager": "1.7.0-alpha.11", - "@nocobase/plugin-kanban": "1.7.0-alpha.11", - "@nocobase/plugin-locale-tester": "1.7.0-alpha.11", - "@nocobase/plugin-localization": "1.7.0-alpha.11", - "@nocobase/plugin-logger": "1.7.0-alpha.11", - "@nocobase/plugin-map": "1.7.0-alpha.11", - "@nocobase/plugin-mobile": "1.7.0-alpha.11", - "@nocobase/plugin-mobile-client": "1.7.0-alpha.11", - "@nocobase/plugin-mock-collections": "1.7.0-alpha.11", - "@nocobase/plugin-multi-app-manager": "1.7.0-alpha.11", - "@nocobase/plugin-multi-app-share-collection": "1.7.0-alpha.11", - "@nocobase/plugin-notification-email": "1.7.0-alpha.11", - "@nocobase/plugin-notification-in-app-message": "1.7.0-alpha.11", - "@nocobase/plugin-notification-manager": "1.7.0-alpha.11", - "@nocobase/plugin-public-forms": "1.7.0-alpha.11", - "@nocobase/plugin-snapshot-field": "1.7.0-alpha.11", - "@nocobase/plugin-system-settings": "1.7.0-alpha.11", - "@nocobase/plugin-theme-editor": "1.7.0-alpha.11", - "@nocobase/plugin-ui-schema-storage": "1.7.0-alpha.11", - "@nocobase/plugin-user-data-sync": "1.7.0-alpha.11", - "@nocobase/plugin-users": "1.7.0-alpha.11", - "@nocobase/plugin-verification": "1.7.0-alpha.11", - "@nocobase/plugin-workflow": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-action-trigger": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-aggregate": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-delay": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-dynamic-calculation": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-loop": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-mailer": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-manual": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-notification": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-parallel": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-request": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-response-message": "1.7.0-alpha.11", - "@nocobase/plugin-workflow-sql": "1.7.0-alpha.11", - "@nocobase/server": "1.7.0-alpha.11", + "@nocobase/plugin-acl": "1.7.0-alpha.12", + "@nocobase/plugin-action-bulk-edit": "1.7.0-alpha.12", + "@nocobase/plugin-action-bulk-update": "1.7.0-alpha.12", + "@nocobase/plugin-action-custom-request": "1.7.0-alpha.12", + "@nocobase/plugin-action-duplicate": "1.7.0-alpha.12", + "@nocobase/plugin-action-export": "1.7.0-alpha.12", + "@nocobase/plugin-action-import": "1.7.0-alpha.12", + "@nocobase/plugin-action-print": "1.7.0-alpha.12", + "@nocobase/plugin-ai": "1.7.0-alpha.12", + "@nocobase/plugin-api-doc": "1.7.0-alpha.12", + "@nocobase/plugin-api-keys": "1.7.0-alpha.12", + "@nocobase/plugin-async-task-manager": "1.7.0-alpha.12", + "@nocobase/plugin-audit-logs": "1.7.0-alpha.12", + "@nocobase/plugin-auth": "1.7.0-alpha.12", + "@nocobase/plugin-auth-sms": "1.7.0-alpha.12", + "@nocobase/plugin-backup-restore": "1.7.0-alpha.12", + "@nocobase/plugin-block-iframe": "1.7.0-alpha.12", + "@nocobase/plugin-block-template": "1.7.0-alpha.12", + "@nocobase/plugin-block-workbench": "1.7.0-alpha.12", + "@nocobase/plugin-calendar": "1.7.0-alpha.12", + "@nocobase/plugin-charts": "1.7.0-alpha.12", + "@nocobase/plugin-client": "1.7.0-alpha.12", + "@nocobase/plugin-collection-sql": "1.7.0-alpha.12", + "@nocobase/plugin-collection-tree": "1.7.0-alpha.12", + "@nocobase/plugin-data-source-main": "1.7.0-alpha.12", + "@nocobase/plugin-data-source-manager": "1.7.0-alpha.12", + "@nocobase/plugin-data-visualization": "1.7.0-alpha.12", + "@nocobase/plugin-departments": "1.7.0-alpha.12", + "@nocobase/plugin-environment-variables": "1.7.0-alpha.12", + "@nocobase/plugin-error-handler": "1.7.0-alpha.12", + "@nocobase/plugin-field-attachment-url": "1.7.0-alpha.12", + "@nocobase/plugin-field-china-region": "1.7.0-alpha.12", + "@nocobase/plugin-field-formula": "1.7.0-alpha.12", + "@nocobase/plugin-field-m2m-array": "1.7.0-alpha.12", + "@nocobase/plugin-field-markdown-vditor": "1.7.0-alpha.12", + "@nocobase/plugin-field-sequence": "1.7.0-alpha.12", + "@nocobase/plugin-field-sort": "1.7.0-alpha.12", + "@nocobase/plugin-file-manager": "1.7.0-alpha.12", + "@nocobase/plugin-gantt": "1.7.0-alpha.12", + "@nocobase/plugin-graph-collection-manager": "1.7.0-alpha.12", + "@nocobase/plugin-kanban": "1.7.0-alpha.12", + "@nocobase/plugin-locale-tester": "1.7.0-alpha.12", + "@nocobase/plugin-localization": "1.7.0-alpha.12", + "@nocobase/plugin-logger": "1.7.0-alpha.12", + "@nocobase/plugin-map": "1.7.0-alpha.12", + "@nocobase/plugin-mobile": "1.7.0-alpha.12", + "@nocobase/plugin-mobile-client": "1.7.0-alpha.12", + "@nocobase/plugin-mock-collections": "1.7.0-alpha.12", + "@nocobase/plugin-multi-app-manager": "1.7.0-alpha.12", + "@nocobase/plugin-multi-app-share-collection": "1.7.0-alpha.12", + "@nocobase/plugin-notification-email": "1.7.0-alpha.12", + "@nocobase/plugin-notification-in-app-message": "1.7.0-alpha.12", + "@nocobase/plugin-notification-manager": "1.7.0-alpha.12", + "@nocobase/plugin-public-forms": "1.7.0-alpha.12", + "@nocobase/plugin-snapshot-field": "1.7.0-alpha.12", + "@nocobase/plugin-system-settings": "1.7.0-alpha.12", + "@nocobase/plugin-theme-editor": "1.7.0-alpha.12", + "@nocobase/plugin-ui-schema-storage": "1.7.0-alpha.12", + "@nocobase/plugin-user-data-sync": "1.7.0-alpha.12", + "@nocobase/plugin-users": "1.7.0-alpha.12", + "@nocobase/plugin-verification": "1.7.0-alpha.12", + "@nocobase/plugin-workflow": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-action-trigger": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-aggregate": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-delay": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-dynamic-calculation": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-loop": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-mailer": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-manual": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-notification": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-parallel": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-request": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-response-message": "1.7.0-alpha.12", + "@nocobase/plugin-workflow-sql": "1.7.0-alpha.12", + "@nocobase/server": "1.7.0-alpha.12", "cronstrue": "^2.11.0", "fs-extra": "^11.1.1" }, diff --git a/yarn.lock b/yarn.lock index b397c14c95..efbf6330b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5273,13 +5273,18 @@ dependencies: vary "^1.1.2" -"@koa/multer@^3.0.0", "@koa/multer@^3.0.2": +"@koa/multer@^3.0.2": version "3.0.2" resolved "https://registry.npmmirror.com/@koa/multer/-/multer-3.0.2.tgz#04ed1af502de5793a6052daf6c256e94ef13e3a4" integrity sha512-Q6WfPpE06mJWyZD1fzxM6zWywaoo+zocAn2YA9QYz4RsecoASr1h/kSzG0c5seDpFVKCMZM9raEfuM7XfqbRLw== dependencies: fix-esm "1.0.1" +"@koa/multer@^3.1.0": + version "3.1.0" + resolved "https://registry.npmmirror.com/@koa/multer/-/multer-3.1.0.tgz#64b12f173d9c8d88c4114574ed67d2c8f5acdba8" + integrity sha512-ETf4OLpOew9XE9lyU+5HIqk3TCmdGAw9pUXgxzrlYip+PkxLGoU4meiVTxiW4B6lxdBNijb3DFQ7M2woLcDL1g== + "@koa/router@^12.0.1": version "12.0.2" resolved "https://registry.npmmirror.com/@koa/router/-/router-12.0.2.tgz#286d51959ed611255faa944818a112e35567835a" @@ -5291,16 +5296,14 @@ methods "^1.1.2" path-to-regexp "^6.3.0" -"@koa/router@^9.4.0": - version "9.4.0" - resolved "https://registry.npmmirror.com/@koa/router/-/router-9.4.0.tgz#734b64c0ae566eb5af752df71e4143edc4748e48" - integrity sha512-dOOXgzqaDoHu5qqMEPLKEgLz5CeIA7q8+1W62mCvFVCOqeC71UoTGJ4u1xUSOpIl2J1x2pqrNULkFteUeZW3/A== +"@koa/router@^13.1.0": + version "13.1.0" + resolved "https://registry.npmmirror.com/@koa/router/-/router-13.1.0.tgz#43f4c554444ea4f4a148a5735a9525c6d16fd1b5" + integrity sha512-mNVu1nvkpSd8Q8gMebGbCkDWJ51ODetrFvLKYusej+V0ByD4btqHYnPIzTBLXnQMVUlm/oxVwqmWBY3zQfZilw== dependencies: - debug "^4.1.1" - http-errors "^1.7.3" + http-errors "^2.0.0" koa-compose "^4.1.0" - methods "^1.1.2" - path-to-regexp "^6.1.0" + path-to-regexp "^6.3.0" "@langchain/core@^0.3.39": version "0.3.42" @@ -6164,21 +6167,6 @@ resolved "https://registry.npmmirror.com/@makotot/ghostui/-/ghostui-2.0.0.tgz#ae035d405a9ed5100436158e953ed9480f1c09a7" integrity sha512-LD6OeMv+yGjpYZNjh34yDTCIE1NegqOtJq5gm4wX6op3QL7K5psTVzMjkWzseBoYj0XOD4g+UJVIZTprfoOPGg== -"@mapbox/node-pre-gyp@^1.0.0": - version "1.0.11" - resolved "https://registry.npmmirror.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa" - integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ== - dependencies: - detect-libc "^2.0.0" - https-proxy-agent "^5.0.0" - make-dir "^3.1.0" - node-fetch "^2.6.7" - nopt "^5.0.0" - npmlog "^5.0.1" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.11" - "@marijn/find-cluster-break@^1.0.0": version "1.0.2" resolved "https://registry.npmmirror.com/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz#775374306116d51c0c500b8c4face0f9a04752d8" @@ -8918,6 +8906,14 @@ dependencies: "@types/node" "*" +"@types/jsonwebtoken@^9.0.9": + version "9.0.9" + resolved "https://registry.npmmirror.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.9.tgz#a4c3a446c0ebaaf467a58398382616f416345fb3" + integrity sha512-uoe+GxEuHbvy12OUQct2X9JenKM3qAscquYymuQN4fMWG9DBQtykrQEFcAbVACF7qaLw9BePSodUL0kquqBJpQ== + dependencies: + "@types/ms" "*" + "@types/node" "*" + "@types/keygrip@*": version "1.0.6" resolved "https://registry.npmmirror.com/@types/keygrip/-/keygrip-1.0.6.tgz#1749535181a2a9b02ac04a797550a8787345b740" @@ -8937,7 +8933,7 @@ dependencies: "@types/koa" "*" -"@types/koa-multer@^1.0.1": +"@types/koa-multer@^1.0.4": version "1.0.4" resolved "https://registry.npmmirror.com/@types/koa-multer/-/koa-multer-1.0.4.tgz#5576cb7aea56926e4d48faaa7b510b87bdfcb3db" integrity sha512-Aty7k5W/bVgvCtyc7iwzjP1QXp1CPsQE3klmIEVBphK2bthjJjUpgkvFNChckA8DPxaatzFmnotWZnXLAAnLog== @@ -9080,7 +9076,7 @@ resolved "https://registry.npmmirror.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== -"@types/multer@^1.4.5": +"@types/multer@^1.4.12", "@types/multer@^1.4.5": version "1.4.12" resolved "https://registry.npmmirror.com/@types/multer/-/multer-1.4.12.tgz#da67bd0c809f3a63fe097c458c0d4af1fea50ab7" integrity sha512-pQ2hoqvXiJt2FP9WQVLPRO+AmiIm/ZYkavPlIQnx282u4ZrVdztx0pkh3jjpQt0Kz+YI0YhSG264y08UJKoUQg== @@ -10801,7 +10797,7 @@ aproba@^1.0.3, aproba@^1.1.1: resolved "https://registry.npmmirror.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -"aproba@^1.0.3 || ^2.0.0", aproba@^2.0.0: +aproba@^2.0.0: version "2.0.0" resolved "https://registry.npmmirror.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== @@ -10886,22 +10882,6 @@ archy@^1.0.0: resolved "https://registry.npmmirror.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== -are-we-there-yet@^2.0.0: - version "2.0.0" - resolved "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" - integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - -are-we-there-yet@^3.0.0: - version "3.0.1" - resolved "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" - integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - are-we-there-yet@~1.1.2: version "1.1.7" resolved "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" @@ -12104,14 +12084,6 @@ bundle-require@^5.0.0: dependencies: load-tsconfig "^0.2.3" -busboy@^0.2.11: - version "0.2.14" - resolved "https://registry.npmmirror.com/busboy/-/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453" - integrity sha512-InWFDomvlkEj+xWLBfU3AvnbVYqeTWmQopiW0tWWEy5yehYm2YkGEc59sUmw/4ty5Zj/b0WHGs1LgecuBSBGrg== - dependencies: - dicer "0.2.5" - readable-stream "1.1.x" - busboy@^1.0.0: version "1.6.0" resolved "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" @@ -13098,7 +13070,7 @@ color-string@^1.5.5, color-string@^1.6.0: color-name "^1.0.0" simple-swizzle "^0.2.2" -color-support@^1.1.2, color-support@^1.1.3: +color-support@^1.1.3: version "1.1.3" resolved "https://registry.npmmirror.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== @@ -13403,7 +13375,7 @@ console-browserify@^1.1.0: resolved "https://registry.npmmirror.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== -console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: +console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== @@ -15051,11 +15023,6 @@ detect-libc@^1.0.3: resolved "https://registry.npmmirror.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== -detect-libc@^2.0.0: - version "2.0.2" - resolved "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" - integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== - detect-newline@^4.0.0: version "4.0.1" resolved "https://registry.npmmirror.com/detect-newline/-/detect-newline-4.0.1.tgz#fcefdb5713e1fb8cb2839b8b6ee22e6716ab8f23" @@ -15079,14 +15046,6 @@ dezalgo@^1.0.0, dezalgo@^1.0.4: asap "^2.0.0" wrappy "1" -dicer@0.2.5: - version "0.2.5" - resolved "https://registry.npmmirror.com/dicer/-/dicer-0.2.5.tgz#5996c086bb33218c812c090bddc09cd12facb70f" - integrity sha512-FDvbtnq7dzlPz0wyYlOExifDEZcu8h+rErEXgfxqmLfRfC/kJidEFh4+effJRO3P0xmfqyPbSMG0LveNRfTKVg== - dependencies: - readable-stream "1.1.x" - streamsearch "0.1.2" - diff-match-patch@^1.0.5: version "1.0.5" resolved "https://registry.npmmirror.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" @@ -17680,35 +17639,6 @@ functions-have-names@^1.2.3: resolved "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -gauge@^3.0.0: - version "3.0.2" - resolved "https://registry.npmmirror.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" - integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.2" - console-control-strings "^1.0.0" - has-unicode "^2.0.1" - object-assign "^4.1.1" - signal-exit "^3.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.2" - -gauge@^4.0.3: - version "4.0.4" - resolved "https://registry.npmmirror.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" - integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.3" - console-control-strings "^1.1.0" - has-unicode "^2.0.1" - signal-exit "^3.0.7" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.5" - gauge@~2.7.3: version "2.7.4" resolved "https://registry.npmmirror.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -20778,23 +20708,7 @@ jsonpath-plus@^9.0.0: "@jsep-plugin/regex" "^1.0.3" jsep "^1.3.8" -jsonwebtoken@^8.5.1: - version "8.5.1" - resolved "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== - dependencies: - jws "^3.2.2" - lodash.includes "^4.3.0" - lodash.isboolean "^3.0.3" - lodash.isinteger "^4.0.4" - lodash.isnumber "^3.0.3" - lodash.isplainobject "^4.0.6" - lodash.isstring "^4.0.1" - lodash.once "^4.0.0" - ms "^2.1.1" - semver "^5.6.0" - -jsonwebtoken@^9.0.0: +jsonwebtoken@^9.0.0, jsonwebtoken@^9.0.2: version "9.0.2" resolved "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== @@ -21917,7 +21831,7 @@ make-fetch-happen@^8.0.9: socks-proxy-agent "^5.0.0" ssri "^8.0.0" -make-fetch-happen@^9.0.1, make-fetch-happen@^9.1.0: +make-fetch-happen@^9.0.1: version "9.1.0" resolved "https://registry.npmmirror.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== @@ -23192,24 +23106,10 @@ multer-s3@^3.0.1: html-comment-regex "^1.1.2" run-parallel "^1.1.6" -multer@^1.4.2: - version "1.4.4" - resolved "https://registry.npmmirror.com/multer/-/multer-1.4.4.tgz#e2bc6cac0df57a8832b858d7418ccaa8ebaf7d8c" - integrity sha512-2wY2+xD4udX612aMqMcB8Ws2Voq6NIUPEtD1be6m411T4uDH/VtL9i//xvcyFlTVfRdaBsk7hV5tgrGQqhuBiw== - dependencies: - append-field "^1.0.0" - busboy "^0.2.11" - concat-stream "^1.5.2" - mkdirp "^0.5.4" - object-assign "^4.1.1" - on-finished "^2.3.0" - type-is "^1.6.4" - xtend "^4.0.0" - -multer@^1.4.5-lts.1: - version "1.4.5-lts.1" - resolved "https://registry.npmmirror.com/multer/-/multer-1.4.5-lts.1.tgz#803e24ad1984f58edffbc79f56e305aec5cfd1ac" - integrity sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ== +multer@^1.4.5-lts.2: + version "1.4.5-lts.2" + resolved "https://registry.npmmirror.com/multer/-/multer-1.4.5-lts.2.tgz#340af065d8685dda846ec9e3d7655fcd50afba2d" + integrity sha512-VzGiVigcG9zUAoCNU+xShztrlr1auZOlurXynNvO9GiWD1/mTBbUljOKY+qMeazBqXgRnjzeEgJI/wyjJUHg9A== dependencies: append-field "^1.0.0" busboy "^1.0.0" @@ -23423,11 +23323,6 @@ node-abort-controller@^3.0.1: resolved "https://registry.npmmirror.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz#a94377e964a9a37ac3976d848cb5c765833b8548" integrity sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ== -node-addon-api@^4.2.0: - version "4.3.0" - resolved "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" - integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== - node-domexception@1.0.0, node-domexception@^1.0.0: version "1.0.0" resolved "https://registry.npmmirror.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" @@ -23458,22 +23353,6 @@ node-fetch@^3.2.0: fetch-blob "^3.1.4" formdata-polyfill "^4.0.10" -node-gyp@8.x: - version "8.4.1" - resolved "https://registry.npmmirror.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" - integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.6" - make-fetch-happen "^9.1.0" - nopt "^5.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.2" - which "^2.0.2" - node-gyp@^10.2.0: version "10.3.1" resolved "https://registry.npmmirror.com/node-gyp/-/node-gyp-10.3.1.tgz#1dd1a1a1c6c5c59da1a76aea06a062786b2c8a1a" @@ -23829,26 +23708,6 @@ npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" -npmlog@^5.0.1: - version "5.0.1" - resolved "https://registry.npmmirror.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" - integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== - dependencies: - are-we-there-yet "^2.0.0" - console-control-strings "^1.1.0" - gauge "^3.0.0" - set-blocking "^2.0.0" - -npmlog@^6.0.0: - version "6.0.2" - resolved "https://registry.npmmirror.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" - integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== - dependencies: - are-we-there-yet "^3.0.0" - console-control-strings "^1.1.0" - gauge "^4.0.3" - set-blocking "^2.0.0" - nprogress@^0.2.0: version "0.2.0" resolved "https://registry.npmmirror.com/nprogress/-/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1" @@ -24914,21 +24773,11 @@ path-to-regexp@3.3.0: resolved "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-3.3.0.tgz#f7f31d32e8518c2660862b644414b6d5c63a611b" integrity sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw== -path-to-regexp@6.2.2: - version "6.2.2" - resolved "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36" - integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== - path-to-regexp@8.2.0: version "8.2.0" resolved "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-8.2.0.tgz#73990cc29e57a3ff2a0d914095156df5db79e8b4" integrity sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ== -path-to-regexp@^6.1.0: - version "6.2.1" - resolved "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz#d54934d6798eb9e5ef14e7af7962c945906918e5" - integrity sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw== - path-to-regexp@^6.3.0: version "6.3.0" resolved "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4" @@ -27478,16 +27327,6 @@ readable-stream@1.1: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@1.1.x: - version "1.1.14" - resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - "readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" @@ -29366,17 +29205,6 @@ sprintf-js@~1.0.2: resolved "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -sqlite3@^5.0.8: - version "5.1.6" - resolved "https://registry.npmmirror.com/sqlite3/-/sqlite3-5.1.6.tgz#1d4fbc90fe4fbd51e952e0a90fd8f6c2b9098e97" - integrity sha512-olYkWoKFVNSSSQNvxVUfjiVbz3YtBwTJj+mfV5zpHmqW3sELx2Cf4QCdirMelhM5Zh+KDVaKgQHqCxrqiWHybw== - dependencies: - "@mapbox/node-pre-gyp" "^1.0.0" - node-addon-api "^4.2.0" - tar "^6.1.11" - optionalDependencies: - node-gyp "8.x" - sqlstring@^2.3.2: version "2.3.3" resolved "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.3.tgz#2ddc21f03bce2c387ed60680e739922c65751d0c" @@ -29553,11 +29381,6 @@ stream-wormhole@^1.0.4: resolved "https://registry.npmmirror.com/stream-wormhole/-/stream-wormhole-1.1.0.tgz#300aff46ced553cfec642a05251885417693c33d" integrity sha512-gHFfL3px0Kctd6Po0M8TzEvt3De/xu6cnRrjlfYNhwbhLPLwigI2t1nc6jrzNuaYg5C4YF78PPFuQPzRiqn9ew== -streamsearch@0.1.2: - version "0.1.2" - resolved "https://registry.npmmirror.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" - integrity sha512-jos8u++JKm0ARcSUTAZXOVC0mSox7Bhn6sBgty73P1f3JGf7yG2clTbBNHUdde/kdvP2FESam+vM6l8jBrNxHA== - streamsearch@^1.1.0: version "1.1.0" resolved "https://registry.npmmirror.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" @@ -30240,7 +30063,7 @@ tar@^4.4.12: safe-buffer "^5.2.1" yallist "^3.1.1" -tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: +tar@^6.0.2, tar@^6.1.0, tar@^6.1.11: version "6.2.0" resolved "https://registry.npmmirror.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73" integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ== @@ -32311,7 +32134,7 @@ why-is-node-running@^2.2.2: siginfo "^2.0.0" stackback "0.0.2" -wide-align@^1.1.0, wide-align@^1.1.2, wide-align@^1.1.5: +wide-align@^1.1.0: version "1.1.5" resolved "https://registry.npmmirror.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==