();
+ setLastItem(ref);
+
+ setRoles((prev) => prev.concat(data.data));
+ }, [data, setLastItem]);
+
+ const items = useMemo(
+ () =>
+ roles.map((item: any, index: number) => ({
+ key: item.name,
+ label:
+ index === roles.length - 1 ? (
+
+ {
+ setVisible(true);
+ setRecord(item);
+ }}
+ />
+
+ ) : (
+ {
+ setVisible(true);
+ setRecord(item);
+ }}
+ />
+ ),
+ })),
+ [roles, lastItem],
+ );
return (
<>
- {items.length ? (
-
+ {roles.length ? (
+ <>
+
+ {loading && }
+ >
) : (
)}
@@ -92,12 +135,15 @@ RolesMenu.Item = function DepartmentTreeItem({ item, onEdit }) {
deleteDepartment();
}
};
+ const title = Schema.compile(item.title, { t });
return (
- {Schema.compile(item.title, { t })}
+
+ {title}
+
diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/hooks/load-more-observer.ts b/packages/plugins/@nocobase/plugin-acl/src/client/hooks/load-more-observer.ts
new file mode 100644
index 000000000..7bc5e5bbf
--- /dev/null
+++ b/packages/plugins/@nocobase/plugin-acl/src/client/hooks/load-more-observer.ts
@@ -0,0 +1,45 @@
+import React, { useCallback, useEffect, useRef, useState } from 'react';
+
+export const useLoadMoreObserver = ({
+ loadMore,
+}: {
+ loadMore: () => void; // callback
+}) => {
+ const [lastItem, setLastItem] = useState>(null);
+ const observer = useRef(null);
+ const observeExposure = useCallback(
+ (lastItem: React.RefObject) => {
+ if (!lastItem) {
+ return;
+ }
+ observer.current && observer.current.disconnect();
+ observer.current = new IntersectionObserver((entries) => {
+ entries.forEach((entry) => {
+ if (entry.target !== lastItem.current) {
+ return;
+ }
+ if (entry.isIntersecting) {
+ observer.current && observer.current.unobserve(lastItem.current);
+ loadMore();
+ }
+ });
+ });
+
+ lastItem.current && observer.current && observer.current.observe(lastItem.current);
+ },
+ [loadMore],
+ );
+
+ useEffect(() => {
+ observeExposure(lastItem);
+
+ return () => {
+ observer.current && observer.current.disconnect();
+ };
+ }, [lastItem, observeExposure]);
+
+ return {
+ lastItem,
+ setLastItem,
+ };
+};
diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/server.ts b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts
index 98d33fa19..807773a0d 100644
--- a/packages/plugins/@nocobase/plugin-acl/src/server/server.ts
+++ b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts
@@ -398,11 +398,12 @@ export class PluginACL extends Plugin {
};
// sync database role data to acl
- this.app.on('afterLoad', async () => {
+ this.app.on('afterStart', async () => {
await writeRolesToACL(this.app, {
withOutResources: true,
});
});
+
// this.app.on('afterInstall', writeRolesToACL);
this.app.on('afterInstallPlugin', async (plugin) => {
diff --git a/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json b/packages/plugins/@nocobase/plugin-action-bulk-edit/package.json
index 7308b704d..7ea3e71b0 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 2c8d553f7..8d83ce095 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-duplicate/package.json b/packages/plugins/@nocobase/plugin-action-duplicate/package.json
index ae466348e..41dbaffb4 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-print/package.json b/packages/plugins/@nocobase/plugin-action-print/package.json
index 7228ed051..21b6d8421 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-api-doc/package.json b/packages/plugins/@nocobase/plugin-api-doc/package.json
index 7e987d6c5..0221c5b77 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 9b1ad1d07..f10fe2ec5 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/api-keys",
diff --git a/packages/plugins/@nocobase/plugin-audit-logs/package.json b/packages/plugins/@nocobase/plugin-audit-logs/package.json
index 5f9e0ae3e..ae328c717 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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/package.json b/packages/plugins/@nocobase/plugin-auth/package.json
index fbe555537..055b1756b 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 b703acf9f..d664c020a 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/backup-restore",
diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dumper.test.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dumper.test.ts
index d06890bdb..4b3952ec2 100644
--- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dumper.test.ts
+++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/__tests__/dumper.test.ts
@@ -85,6 +85,43 @@ describe('dumper', () => {
expect(items.length).toBe(1);
});
+ it('should dump and restore uuid field', async () => {
+ await db.getRepository('collections').create({
+ values: {
+ name: 'tests',
+ fields: [
+ {
+ type: 'uuid',
+ name: 'uuid_test',
+ },
+ ],
+ },
+ context: {},
+ });
+
+ await db.getRepository('tests').create({
+ values: {},
+ });
+
+ const dumper = new Dumper(app);
+
+ const result = await dumper.dump({
+ groups: new Set(['required', 'custom']),
+ });
+
+ const restorer = new Restorer(app, {
+ backUpFilePath: result.filePath,
+ });
+
+ await restorer.restore({
+ groups: new Set(['required', 'custom']),
+ });
+
+ const testCollection = app.db.getCollection('tests');
+ const items = await testCollection.repository.find();
+ expect(items.length).toBe(1);
+ });
+
describe('id seq', () => {
let allGroups;
diff --git a/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts b/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts
index 32fa2a3ab..dbcfd373d 100644
--- a/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts
+++ b/packages/plugins/@nocobase/plugin-backup-restore/src/server/dumper.ts
@@ -412,12 +412,18 @@ export class Dumper extends AppMigrator {
if (collectionField) {
// is a field
- return {
+ const fieldAttributes: any = {
field: attr.field,
isCollectionField: true,
type: collectionField.type,
typeOptions: collectionField.options,
};
+
+ if (fieldAttributes.typeOptions?.defaultValue?.constructor?.name === 'UUIDV4') {
+ delete fieldAttributes.typeOptions.defaultValue;
+ }
+
+ return fieldAttributes;
}
return {
diff --git a/packages/plugins/@nocobase/plugin-calendar/package.json b/packages/plugins/@nocobase/plugin-calendar/package.json
index 49b018f76..27bc0ec19 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-cas/package.json b/packages/plugins/@nocobase/plugin-cas/package.json
index d8080330d..8788079f9 100644
--- a/packages/plugins/@nocobase/plugin-cas/package.json
+++ b/packages/plugins/@nocobase/plugin-cas/package.json
@@ -4,7 +4,7 @@
"displayName.zh-CN": "认证:CAS",
"description": "CAS authentication.",
"description.zh-CN": "通过 CAS 协议认证身份。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/auth-cas",
diff --git a/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts b/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts
index 28db05de4..ae811ddb9 100644
--- a/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts
+++ b/packages/plugins/@nocobase/plugin-cas/src/server/actions/service.ts
@@ -3,20 +3,25 @@ import { AppSupervisor } from '@nocobase/server';
import { CASAuth } from '../auth';
export const service = async (ctx: Context, next: Next) => {
- const { authenticator, __appName: appName, redirect = '/admin' } = ctx.action.params;
+ const { authenticator, __appName: appName, redirect } = ctx.action.params;
- let prefix = '';
+ let prefix = process.env.APP_PUBLIC_PATH || '';
if (appName && appName !== 'main') {
const appSupervisor = AppSupervisor.getInstance();
if (appSupervisor?.runningMode !== 'single') {
- prefix = process.env.APP_PUBLIC_PATH + `apps/${appName}`;
+ prefix += `apps/${appName}`;
}
}
const auth = (await ctx.app.authManager.get(authenticator, ctx)) as CASAuth;
+
+ if (prefix.endsWith('/')) {
+ prefix = prefix.slice(0, -1);
+ }
+
try {
const { token } = await auth.signIn();
- ctx.redirect(`${prefix}${redirect}?authenticator=${authenticator}&token=${token}`);
+ ctx.redirect(`${prefix}${redirect || '/admin'}?authenticator=${authenticator}&token=${token}`);
} catch (error) {
ctx.redirect(`${prefix}/signin?authenticator=${authenticator}&error=${error.message}&redirect=${redirect}`);
}
diff --git a/packages/plugins/@nocobase/plugin-charts/package.json b/packages/plugins/@nocobase/plugin-charts/package.json
index c5df2c17b..ae1b205de 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"main": "./dist/server/index.js",
"license": "AGPL-3.0",
"devDependencies": {
diff --git a/packages/plugins/@nocobase/plugin-china-region/package.json b/packages/plugins/@nocobase/plugin-china-region/package.json
index aa1019b0f..34461a0f6 100644
--- a/packages/plugins/@nocobase/plugin-china-region/package.json
+++ b/packages/plugins/@nocobase/plugin-china-region/package.json
@@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-china-region",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"displayName": "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-client/package.json b/packages/plugins/@nocobase/plugin-client/package.json
index 388f5ae3b..97128e546 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"main": "./dist/server/index.js",
"license": "AGPL-3.0",
"devDependencies": {
diff --git a/packages/plugins/@nocobase/plugin-collection-manager/package.json b/packages/plugins/@nocobase/plugin-collection-manager/package.json
index df7335ec1..c65b2cd7e 100644
--- a/packages/plugins/@nocobase/plugin-collection-manager/package.json
+++ b/packages/plugins/@nocobase/plugin-collection-manager/package.json
@@ -4,7 +4,7 @@
"displayName.zh-CN": "数据源:主数据库",
"description": "NocoBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.",
"description.zh-CN": "NocoBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-collection-manager/src/server/__tests__/fields/uuid.test.ts b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/uuid.test.ts
new file mode 100644
index 000000000..d17e4c7db
--- /dev/null
+++ b/packages/plugins/@nocobase/plugin-collection-manager/src/server/__tests__/fields/uuid.test.ts
@@ -0,0 +1,46 @@
+import Database, { Collection as DBCollection } from '@nocobase/database';
+import Application from '@nocobase/server';
+import { createApp } from '..';
+
+describe('uuid', () => {
+ let db: Database;
+ let app: Application;
+ let Collection: DBCollection;
+ let Field: DBCollection;
+
+ beforeEach(async () => {
+ app = await createApp();
+ db = app.db;
+ Collection = db.getCollection('collections');
+ Field = db.getCollection('fields');
+ });
+
+ afterEach(async () => {
+ await app.destroy();
+ });
+
+ it('should create uuid field', async () => {
+ await Collection.repository.create({
+ values: {
+ name: 'tests',
+ },
+ context: {},
+ });
+
+ await Field.repository.create({
+ values: {
+ collectionName: 'tests',
+ type: 'uuid',
+ name: 'uuid',
+ },
+ context: {},
+ });
+
+ // @ts-ignore
+ const resp = await app.agent().resource('tests').create({});
+ expect(resp.status).toBe(200);
+
+ const data = resp.body.data;
+ expect(data['uuid']).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/);
+ });
+});
diff --git a/packages/plugins/@nocobase/plugin-custom-request/package.json b/packages/plugins/@nocobase/plugin-custom-request/package.json
index 8aa459099..bbb63f529 100644
--- a/packages/plugins/@nocobase/plugin-custom-request/package.json
+++ b/packages/plugins/@nocobase/plugin-custom-request/package.json
@@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-custom-request",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-data-source-manager/package.json b/packages/plugins/@nocobase/plugin-data-source-manager/package.json
index 98dc169fc..8f0bb6449 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 2e0564f09..eb100dbd8 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-disable-pm-add/package.json b/packages/plugins/@nocobase/plugin-disable-pm-add/package.json
index c422c51b9..25e097c88 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"main": "./dist/server/index.js",
"peerDependencies": {
"@nocobase/client": "0.x",
diff --git a/packages/plugins/@nocobase/plugin-error-handler/package.json b/packages/plugins/@nocobase/plugin-error-handler/package.json
index 8c71dd3c8..e6d9d93c4 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"devDependencies": {
diff --git a/packages/plugins/@nocobase/plugin-excel-formula-field/package.json b/packages/plugins/@nocobase/plugin-excel-formula-field/package.json
index 2c9697df9..26b9438d4 100644
--- a/packages/plugins/@nocobase/plugin-excel-formula-field/package.json
+++ b/packages/plugins/@nocobase/plugin-excel-formula-field/package.json
@@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-excel-formula-field",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"description": "",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
diff --git a/packages/plugins/@nocobase/plugin-export/package.json b/packages/plugins/@nocobase/plugin-export/package.json
index ce22a3c01..cddb09ce5 100644
--- a/packages/plugins/@nocobase/plugin-export/package.json
+++ b/packages/plugins/@nocobase/plugin-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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-export",
diff --git a/packages/plugins/@nocobase/plugin-file-manager/package.json b/packages/plugins/@nocobase/plugin-file-manager/package.json
index 1fb81551a..189dc6ec5 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"displayName": "File manager",
"displayName.zh-CN": "文件管理器",
"description": "Provides files storage services with files collection template and attachment field.",
diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts
index 307c4cc66..a028c17f8 100644
--- a/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts
+++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/templates/file.ts
@@ -1,158 +1,6 @@
import { CollectionTemplate, getConfigurableProperties } from '@nocobase/client';
-// import { CollectionOptions } from '@nocobase/database';
import { NAMESPACE } from '../locale';
-// export const fileCollectionTemplate = {
-// name: 'file',
-// title: `{{t("File collection", { ns: "${NAMESPACE}" })}}`,
-// order: 3,
-// color: 'blue',
-// default: {
-// createdBy: true,
-// updatedBy: true,
-// fields: [
-// {
-// interface: 'input',
-// type: 'string',
-// name: 'title',
-// deletable: false,
-// uiSchema: {
-// type: 'string',
-// title: `{{t("Title")}}`,
-// 'x-component': 'Input',
-// },
-// },
-// // '系统文件名(含扩展名)',
-// {
-// interface: 'input',
-// type: 'string',
-// name: 'filename',
-// deletable: false,
-// uiSchema: {
-// type: 'string',
-// title: `{{t("File name", { ns: "${NAMESPACE}" })}}`,
-// 'x-component': 'Input',
-// 'x-read-pretty': true,
-// },
-// },
-// // '扩展名(含“.”)',
-// {
-// interface: 'input',
-// type: 'string',
-// name: 'extname',
-// deletable: false,
-// uiSchema: {
-// type: 'string',
-// title: `{{t("Extension name", { ns: "${NAMESPACE}" })}}`,
-// 'x-component': 'Input',
-// 'x-read-pretty': true,
-// },
-// },
-// // '文件体积(字节)',
-// {
-// interface: 'integer',
-// type: 'integer',
-// name: 'size',
-// deletable: false,
-// uiSchema: {
-// type: 'number',
-// title: `{{t("Size", { ns: "${NAMESPACE}" })}}`,
-// 'x-component': 'InputNumber',
-// 'x-read-pretty': true,
-// 'x-component-props': {
-// stringMode: true,
-// step: '0',
-// },
-// },
-// },
-// {
-// interface: 'input',
-// type: 'string',
-// name: 'mimetype',
-// deletable: false,
-// uiSchema: {
-// type: 'string',
-// title: `{{t("MIME type", { ns: "${NAMESPACE}" })}}`,
-// 'x-component': 'Input',
-// 'x-read-pretty': true,
-// },
-// },
-// // '相对路径(含“/”前缀)',
-// {
-// interface: 'input',
-// type: 'string',
-// name: 'path',
-// deletable: false,
-// uiSchema: {
-// type: 'string',
-// title: `{{t("Path")}}`,
-// 'x-component': 'Input',
-// 'x-read-pretty': true,
-// },
-// },
-// // 文件的可访问地址
-// {
-// interface: 'input',
-// type: 'string',
-// name: 'url',
-// deletable: false,
-// uiSchema: {
-// type: 'string',
-// title: `{{t("URL")}}`,
-// 'x-component': 'Input.URL',
-// 'x-read-pretty': true,
-// },
-// },
-// // 用于预览
-// {
-// interface: 'url',
-// type: 'string',
-// name: 'preview',
-// field: 'url', // 直接引用 url 字段
-// deletable: false,
-// uiSchema: {
-// type: 'string',
-// title: `{{t("Preview")}}`,
-// 'x-component': 'Preview',
-// 'x-read-pretty': true,
-// },
-// },
-// {
-// comment: '存储引擎',
-// type: 'belongsTo',
-// name: 'storage',
-// target: 'storages',
-// foreignKey: 'storageId',
-// deletable: false,
-// },
-// // '其他文件信息(如图片的宽高)',
-// {
-// type: 'jsonb',
-// name: 'meta',
-// deletable: false,
-// defaultValue: {},
-// },
-// ],
-// },
-// configurableProperties: {
-// ...getConfigurableProperties('title', 'name'),
-// inherits: {
-// ...getConfigurableProperties('inherits').inherits,
-// 'x-reactions': ['{{useAsyncDataSource(loadCollections)}}'],
-// },
-// ...getConfigurableProperties('category', 'description'),
-// storage: {
-// title: `{{t("File storage", { ns: "${NAMESPACE}" })}}`,
-// type: 'hasOne',
-// name: 'storage',
-// required: true,
-// 'x-decorator': 'FormItem',
-// 'x-component': 'Select',
-// 'x-reactions': ['{{useAsyncDataSource(loadStorages)}}'],
-// },
-// },
-// } as CollectionOptions;
-
export class FileCollectionTemplate extends CollectionTemplate {
name = 'file';
title = `{{t("File collection", { ns: "${NAMESPACE}" })}}`;
@@ -236,7 +84,7 @@ export class FileCollectionTemplate extends CollectionTemplate {
deletable: false,
uiSchema: {
type: 'string',
- title: `{{t("Path")}}`,
+ title: `{{t("Path", { ns: "${NAMESPACE}" })}}`,
'x-component': 'Input',
'x-read-pretty': true,
},
@@ -263,7 +111,7 @@ export class FileCollectionTemplate extends CollectionTemplate {
deletable: false,
uiSchema: {
type: 'string',
- title: `{{t("Preview")}}`,
+ title: `{{t("Preview", { ns: "${NAMESPACE}" })}}`,
'x-component': 'Preview',
'x-read-pretty': true,
},
@@ -275,6 +123,12 @@ export class FileCollectionTemplate extends CollectionTemplate {
target: 'storages',
foreignKey: 'storageId',
deletable: false,
+ uiSchema: {
+ type: 'string',
+ title: `{{t("Storage", { ns: "${NAMESPACE}" })}}`,
+ 'x-component': 'Input',
+ 'x-read-pretty': true,
+ },
},
// '其他文件信息(如图片的宽高)',
{
diff --git a/packages/plugins/@nocobase/plugin-formula-field/package.json b/packages/plugins/@nocobase/plugin-formula-field/package.json
index 9173b5d0d..978fa62b5 100644
--- a/packages/plugins/@nocobase/plugin-formula-field/package.json
+++ b/packages/plugins/@nocobase/plugin-formula-field/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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/field-formula",
diff --git a/packages/plugins/@nocobase/plugin-gantt/package.json b/packages/plugins/@nocobase/plugin-gantt/package.json
index 78837c6ef..dc8e800d5 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"displayName": "Block: Gantt",
"displayName.zh-CN": "区块:甘特图",
"description": "Provides Gantt block.",
diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json b/packages/plugins/@nocobase/plugin-graph-collection-manager/package.json
index 03ed8dea3..ee93f70fd 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-iframe-block/package.json b/packages/plugins/@nocobase/plugin-iframe-block/package.json
index 115192dad..f2c1c8109 100644
--- a/packages/plugins/@nocobase/plugin-iframe-block/package.json
+++ b/packages/plugins/@nocobase/plugin-iframe-block/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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/block-iframe",
diff --git a/packages/plugins/@nocobase/plugin-import/package.json b/packages/plugins/@nocobase/plugin-import/package.json
index 193a2a0cc..fc5cc1a6a 100644
--- a/packages/plugins/@nocobase/plugin-import/package.json
+++ b/packages/plugins/@nocobase/plugin-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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/action-import",
diff --git a/packages/plugins/@nocobase/plugin-kanban/package.json b/packages/plugins/@nocobase/plugin-kanban/package.json
index 989f26f80..1652cdd14 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-localization-management/package.json b/packages/plugins/@nocobase/plugin-localization-management/package.json
index 14aeff38d..7f099e562 100644
--- a/packages/plugins/@nocobase/plugin-localization-management/package.json
+++ b/packages/plugins/@nocobase/plugin-localization-management/package.json
@@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-localization-management",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 a1db455ba..8e2c3e135 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 95598cc50..006de43b0 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-math-formula-field/package.json b/packages/plugins/@nocobase/plugin-math-formula-field/package.json
index 142a39875..22c507c21 100644
--- a/packages/plugins/@nocobase/plugin-math-formula-field/package.json
+++ b/packages/plugins/@nocobase/plugin-math-formula-field/package.json
@@ -4,7 +4,7 @@
"displayName.zh-CN": "数学公式字段",
"description": "A powerful mathematical formula field plugin designed to provide flexible mathematical and formula calculation capabilities for databases or data management systems. It seamlessly integrates with various database systems such as MySQL, PostgreSQL, and offers an intuitive user interface for defining and executing mathematical formula fields.",
"description.zh-CN": "一个功能强大的数学公式字段插件,旨在为数据库或数据管理系统提供灵活的数学计算和公式计算功能。它可以与各种数据库系统(如MySQL、PostgreSQL)无缝集成,并提供直观的用户界面来定义和执行数学公式字段。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"devDependencies": {
diff --git a/packages/plugins/@nocobase/plugin-mobile-client/package.json b/packages/plugins/@nocobase/plugin-mobile-client/package.json
index cb4e5a649..17cb41de5 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-mock-collections/package.json b/packages/plugins/@nocobase/plugin-mock-collections/package.json
index 58e5d27da..b81d45078 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"main": "./dist/server/index.js",
"license": "AGPL-3.0",
"peerDependencies": {
diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/package.json b/packages/plugins/@nocobase/plugin-multi-app-manager/package.json
index 1c3501d02..e97d615dd 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-manager/src/server/__tests__/multiple-apps.test.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts
index 738714c88..d18ef82de 100644
--- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts
+++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/__tests__/multiple-apps.test.ts
@@ -1,6 +1,6 @@
import { Database } from '@nocobase/database';
import { AppSupervisor, Gateway } from '@nocobase/server';
-import { MockServer, createMockServer } from '@nocobase/test';
+import { createMockServer, MockServer } from '@nocobase/test';
import { uid } from '@nocobase/utils';
import { vi } from 'vitest';
import { PluginMultiAppManager } from '../server';
@@ -22,6 +22,29 @@ describe('multiple apps', () => {
await app.destroy();
});
+ it('should merge database options', async () => {
+ const name = `td_${uid()}`;
+
+ await db.getRepository('applications').create({
+ values: {
+ name,
+ options: {
+ plugins: [],
+ database: {
+ underscored: true,
+ },
+ },
+ },
+ context: {
+ waitSubAppInstall: true,
+ },
+ });
+
+ const subApp = await AppSupervisor.getInstance().getApp(name);
+
+ expect(subApp.db.options.underscored).toBeTruthy();
+ });
+
it('should register db creator', async () => {
const fn = vi.fn();
diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts
index 48b1fe389..27dc4983b 100644
--- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts
+++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/models/application.ts
@@ -1,6 +1,7 @@
import { Model, Transactionable } from '@nocobase/database';
import { Application } from '@nocobase/server';
import { AppOptionsFactory } from '../server';
+import { merge } from '@nocobase/utils';
export interface registerAppOptions extends Transactionable {
skipInstall?: boolean;
@@ -10,11 +11,12 @@ export interface registerAppOptions extends Transactionable {
export class ApplicationModel extends Model {
registerToSupervisor(mainApp: Application, options: registerAppOptions) {
const appName = this.get('name') as string;
- const appOptions = (this.get('options') as any) || {};
+ const appModelOptions = (this.get('options') as any) || {};
+
+ const appOptions = options.appOptionsFactory(appName, mainApp);
const subAppOptions = {
- ...options.appOptionsFactory(appName, mainApp),
- ...appOptions,
+ ...(merge(appOptions, appModelOptions) as object),
name: appName,
};
diff --git a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts
index cd1c5675e..3aa6e3299 100644
--- a/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts
+++ b/packages/plugins/@nocobase/plugin-multi-app-manager/src/server/server.ts
@@ -1,6 +1,5 @@
import { Database, IDatabaseOptions, Transactionable } from '@nocobase/database';
import Application, { AppSupervisor, Gateway, Plugin } from '@nocobase/server';
-import { Mutex } from 'async-mutex';
import lodash from 'lodash';
import path from 'path';
import { ApplicationModel } from '../server';
@@ -125,8 +124,6 @@ export class PluginMultiAppManager extends Plugin {
appOptionsFactory: AppOptionsFactory = defaultAppOptionsFactory;
subAppUpgradeHandler: SubAppUpgradeHandler = defaultSubAppUpgradeHandle;
- private beforeGetApplicationMutex = new Mutex();
-
static getDatabaseConfig(app: Application): IDatabaseOptions {
let oldConfig =
app.options.database instanceof Database
@@ -136,6 +133,7 @@ export class PluginMultiAppManager extends Plugin {
if (!oldConfig && app.db) {
oldConfig = app.db.options;
}
+
return lodash.cloneDeep(lodash.omit(oldConfig, ['migrator']));
}
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 00dfc64ae..e40f50911 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"main": "./dist/server/index.js",
"devDependencies": {
"@formily/react": "2.x",
diff --git a/packages/plugins/@nocobase/plugin-notifications/package.json b/packages/plugins/@nocobase/plugin-notifications/package.json
index 27ecbbf05..9151dc886 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"description": "",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
diff --git a/packages/plugins/@nocobase/plugin-oidc/package.json b/packages/plugins/@nocobase/plugin-oidc/package.json
index a35b9c73d..a1d3ea038 100644
--- a/packages/plugins/@nocobase/plugin-oidc/package.json
+++ b/packages/plugins/@nocobase/plugin-oidc/package.json
@@ -4,7 +4,7 @@
"displayName.zh-CN": "认证:OIDC",
"description": "OIDC (OpenID Connect) authentication.",
"description.zh-CN": "通过 OIDC (OpenID Connect) 协议认证身份。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/auth-oidc",
diff --git a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts
index 7cdadd839..40eb78767 100644
--- a/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts
+++ b/packages/plugins/@nocobase/plugin-oidc/src/server/actions/redirect.ts
@@ -10,14 +10,17 @@ export const redirect = async (ctx: Context, next: Next) => {
const authenticator = search.get('name');
const appName = search.get('app');
const redirect = search.get('redirect') || '/admin';
- let prefix = '';
+ let prefix = process.env.APP_PUBLIC_PATH || '';
if (appName && appName !== 'main') {
const appSupervisor = AppSupervisor.getInstance();
if (appSupervisor?.runningMode !== 'single') {
- prefix = process.env.APP_PUBLIC_PATH + `apps/${appName}`;
+ prefix += `apps/${appName}`;
}
}
const auth = (await ctx.app.authManager.get(authenticator, ctx)) as OIDCAuth;
+ if (prefix.endsWith('/')) {
+ prefix = prefix.slice(0, -1);
+ }
try {
const { token } = await auth.signIn();
ctx.redirect(`${prefix}${redirect}?authenticator=${authenticator}&token=${token}`);
diff --git a/packages/plugins/@nocobase/plugin-saml/package.json b/packages/plugins/@nocobase/plugin-saml/package.json
index 39ddb3fd2..ea7c40be2 100644
--- a/packages/plugins/@nocobase/plugin-saml/package.json
+++ b/packages/plugins/@nocobase/plugin-saml/package.json
@@ -4,7 +4,7 @@
"displayName.zh-CN": "认证:SAML 2.0",
"description": "SAML 2.0 authentication.",
"description.zh-CN": "通过 SAML 2.0 协议认证身份。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/auth-saml",
diff --git a/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts b/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts
index 21f225947..8a1573b15 100644
--- a/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts
+++ b/packages/plugins/@nocobase/plugin-saml/src/server/actions/redirect.ts
@@ -4,18 +4,21 @@ import { SAMLAuth } from '../saml-auth';
export const redirect = async (ctx: Context, next: Next) => {
const { authenticator, __appName: appName } = ctx.action.params || {};
- const { RelayState: redirect = '/admin' } = ctx.action.params.values || {};
- let prefix = '';
+ const { RelayState: redirect } = ctx.action.params.values || {};
+ let prefix = process.env.APP_PUBLIC_PATH || '';
if (appName && appName !== 'main') {
const appSupervisor = AppSupervisor.getInstance();
if (appSupervisor?.runningMode !== 'single') {
- prefix = process.env.APP_PUBLIC_PATH + `apps/${appName}`;
+ prefix += `/apps/${appName}`;
}
}
const auth = (await ctx.app.authManager.get(authenticator, ctx)) as SAMLAuth;
+ if (prefix.endsWith('/')) {
+ prefix = prefix.slice(0, -1);
+ }
try {
const { token } = await auth.signIn();
- ctx.redirect(`${prefix}${redirect}?authenticator=${authenticator}&token=${token}`);
+ ctx.redirect(`${prefix}${redirect || '/admin'}?authenticator=${authenticator}&token=${token}`);
} catch (error) {
ctx.redirect(`${prefix}/signin?authenticator=${authenticator}&error=${error.message}&redirect=${redirect}`);
}
diff --git a/packages/plugins/@nocobase/plugin-sample-hello/package.json b/packages/plugins/@nocobase/plugin-sample-hello/package.json
index 2746508c5..cd30e46bb 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"main": "./dist/server/index.js",
"displayName": "Hello",
"displayName.zh-CN": "Hello",
diff --git a/packages/plugins/@nocobase/plugin-sequence-field/package.json b/packages/plugins/@nocobase/plugin-sequence-field/package.json
index dfb179dc8..0f5ef69da 100644
--- a/packages/plugins/@nocobase/plugin-sequence-field/package.json
+++ b/packages/plugins/@nocobase/plugin-sequence-field/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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/field-sequence",
diff --git a/packages/plugins/@nocobase/plugin-sms-auth/package.json b/packages/plugins/@nocobase/plugin-sms-auth/package.json
index 766aa4cd2..e11b97201 100644
--- a/packages/plugins/@nocobase/plugin-sms-auth/package.json
+++ b/packages/plugins/@nocobase/plugin-sms-auth/package.json
@@ -4,7 +4,7 @@
"displayName.zh-CN": "认证:短信",
"description": "SMS authentication.",
"description.zh-CN": "通过短信验证码认证身份。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-snapshot-field/package.json b/packages/plugins/@nocobase/plugin-snapshot-field/package.json
index 70eeb5775..9ddc00e30 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 7d2acf875..a460762fa 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 1d203ec70..d7db8ca29 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-routes-storage/package.json b/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json
index 1ea50b1eb..af11e2790 100644
--- a/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json
+++ b/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json
@@ -4,7 +4,7 @@
"displayName.zh-CN": "路由管理",
"description": "manage the routes of nocobase",
"description.zh-CN": "管理页面路由。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"devDependencies": {
diff --git a/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json b/packages/plugins/@nocobase/plugin-ui-schema-storage/package.json
index 0dc856b97..11eb89dae 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-users/package.json b/packages/plugins/@nocobase/plugin-users/package.json
index 29820721c..c543155f8 100644
--- a/packages/plugins/@nocobase/plugin-users/package.json
+++ b/packages/plugins/@nocobase/plugin-users/package.json
@@ -4,7 +4,7 @@
"displayName.zh-CN": "用户",
"description": "Provides basic user model, as well as created by and updated by fields.",
"description.zh-CN": "提供了基础的用户模型,以及创建人和最后更新人字段。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/users",
diff --git a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/model.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/model.test.ts
new file mode 100644
index 000000000..fb7317af9
--- /dev/null
+++ b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/model.test.ts
@@ -0,0 +1,27 @@
+import Database from '@nocobase/database';
+import { createMockServer, MockServer } from '@nocobase/test';
+import { UserModel } from '../models/UserModel';
+
+describe('models', () => {
+ let app: MockServer;
+ let db: Database;
+
+ beforeEach(async () => {
+ app = await createMockServer({
+ plugins: ['auth', 'users'],
+ });
+ db = app.db;
+ });
+
+ afterEach(async () => {
+ await app.destroy();
+ });
+
+ it('model registeration', async () => {
+ const model = db.getModel('users');
+ const u1 = model.build({ nickname: 'test', password: '123' });
+ expect(u1).toBeInstanceOf(UserModel);
+ const n = u1.desensitize();
+ expect(n.password).toBeUndefined();
+ });
+});
diff --git a/packages/plugins/@nocobase/plugin-users/src/server/__tests__/role-users.test.ts b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/role-users.test.ts
new file mode 100644
index 000000000..5bb0589ab
--- /dev/null
+++ b/packages/plugins/@nocobase/plugin-users/src/server/__tests__/role-users.test.ts
@@ -0,0 +1,56 @@
+import { Database, Repository } from '@nocobase/database';
+import { MockServer, createMockServer } from '@nocobase/test';
+
+describe('actions', () => {
+ let app: MockServer;
+ let db: Database;
+ let repo: Repository;
+ let agent: any;
+
+ beforeAll(async () => {
+ app = await createMockServer({
+ plugins: ['acl', 'users', 'data-source-manager'],
+ });
+ db = app.db;
+ repo = db.getRepository('users');
+ agent = app.agent();
+ });
+
+ afterAll(async () => {
+ await app.destroy();
+ });
+
+ it('should list users exclude role', async () => {
+ const res = await agent.resource('users').listExcludeRole({
+ roleName: ['admin'],
+ });
+ expect(res.status).toBe(200);
+ expect(res.body.data.length).toBe(0);
+ });
+
+ it('should list users exclude role with filter', async () => {
+ let res = await agent.resource('users').listExcludeRole({
+ roleName: ['test'],
+ });
+ expect(res.status).toBe(200);
+ expect(res.body.data.length).toBe(1);
+
+ res = await agent.resource('users').listExcludeRole({
+ roleName: ['test'],
+ filter: {
+ id: 1,
+ },
+ });
+ expect(res.status).toBe(200);
+ expect(res.body.data.length).toBe(1);
+
+ res = await agent.resource('users').listExcludeRole({
+ roleName: ['test'],
+ filter: {
+ id: 2,
+ },
+ });
+ expect(res.status).toBe(200);
+ expect(res.body.data.length).toBe(0);
+ });
+});
diff --git a/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts b/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts
index fa1aadc7b..a843ce57c 100644
--- a/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts
+++ b/packages/plugins/@nocobase/plugin-users/src/server/actions/users.ts
@@ -25,19 +25,21 @@ export const listExcludeRole = async (ctx: Context, next: Next) => {
},
});
const userIds = users.map((user: { id: number }) => user.id);
+ if (userIds.length) {
+ ctx.action.mergeParams({
+ filter: {
+ id: {
+ $notIn: userIds,
+ },
+ },
+ });
+ }
+ const { filter } = ctx.action.params;
const [rows, count] = await repo.findAndCount({
context: ctx,
offset: (page - 1) * pageSize,
limit: pageSize,
- // Ensure memberIds is not empty to resolve strange issue:
- // notIn: [] will be translated to "WHERE id IS NULL"
- filter: userIds.length
- ? {
- id: {
- $notIn: userIds,
- },
- }
- : {},
+ filter,
});
ctx.body = {
count,
diff --git a/packages/plugins/@nocobase/plugin-users/src/server/models/UserModel.ts b/packages/plugins/@nocobase/plugin-users/src/server/models/UserModel.ts
new file mode 100644
index 000000000..93575c9dc
--- /dev/null
+++ b/packages/plugins/@nocobase/plugin-users/src/server/models/UserModel.ts
@@ -0,0 +1,15 @@
+import { Model } from '@nocobase/database';
+
+export class UserModel extends Model {
+ desensitize() {
+ const { fields } = (this.constructor as typeof UserModel).collection;
+ const result = (this.constructor as typeof UserModel).build({}, { isNewRecord: this.isNewRecord });
+ for (const [name, value] of Object.entries(this.get())) {
+ const field = fields.get(name);
+ if (field && !field.options.hidden) {
+ result.set(name, value);
+ }
+ }
+ return result;
+ }
+}
diff --git a/packages/plugins/@nocobase/plugin-users/src/server/server.ts b/packages/plugins/@nocobase/plugin-users/src/server/server.ts
index 359caef6e..402bfa288 100644
--- a/packages/plugins/@nocobase/plugin-users/src/server/server.ts
+++ b/packages/plugins/@nocobase/plugin-users/src/server/server.ts
@@ -5,9 +5,13 @@ import { resolve } from 'path';
import * as actions from './actions/users';
import { Cache } from '@nocobase/cache';
+import { UserModel } from './models/UserModel';
export default class PluginUsersServer extends Plugin {
async beforeLoad() {
+ this.db.registerModels({
+ UserModel,
+ });
this.db.registerOperators({
$isCurrentUser(_, ctx) {
return {
@@ -116,7 +120,6 @@ export default class PluginUsersServer extends Plugin {
async load() {
await this.importCollections(resolve(__dirname, 'collections'));
-
this.db.addMigrations({
namespace: 'users',
directory: resolve(__dirname, 'migrations'),
diff --git a/packages/plugins/@nocobase/plugin-verification/package.json b/packages/plugins/@nocobase/plugin-verification/package.json
index 2244dfb1e..5cec9c45d 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": "verification setting.",
"description.zh-CN": "验证码配置。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./dist/server/index.js",
"homepage": "https://docs.nocobase.com/handbook/verification",
diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json b/packages/plugins/@nocobase/plugin-workflow-action-trigger/package.json
index 34afa5183..22265bc85 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": "Bind action buttons to trigger workflow events when clicked.",
"description.zh-CN": "可对数据操作按钮绑定,在点击后触发对应的工作流事件。",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-action-trigger/src/server/ActionTrigger.ts b/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/ActionTrigger.ts
index d05b49876..b113924b0 100644
--- a/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/ActionTrigger.ts
+++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/src/server/ActionTrigger.ts
@@ -57,8 +57,9 @@ export default class extends Trigger {
const { triggerWorkflows = '', values } = context.action.params;
const { currentUser, currentRole } = context.state;
+ const { model: UserModel } = this.workflow.db.getCollection('users');
const userInfo = {
- user: toJSON(currentUser),
+ user: UserModel.build(currentUser).desensitize(),
roleName: currentRole,
};
diff --git a/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json b/packages/plugins/@nocobase/plugin-workflow-aggregate/package.json
index 863b14613..aab70255c 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 bcd0286f4..53bb4333d 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 154153ac2..17f3a90c0 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 80422aa30..3b3440a32 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-manual/package.json b/packages/plugins/@nocobase/plugin-workflow-manual/package.json
index 2143afb72..3b1ebbb51 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-parallel/package.json b/packages/plugins/@nocobase/plugin-workflow-parallel/package.json
index 36929071f..3834ab9e8 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 9e685d7f4..c2e60f30b 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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-sql/package.json b/packages/plugins/@nocobase/plugin-workflow-sql/package.json
index 8991725ae..466a83d89 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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 679f97005..da4ddf5df 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "dist/server/index.js",
"types": "./dist/server/index.d.ts",
diff --git a/packages/plugins/@nocobase/plugin-workflow/package.json b/packages/plugins/@nocobase/plugin-workflow/package.json
index 341cd4ac1..437d230b8 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": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"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": "0.20.0-alpha.14"
+ "@nocobase/plugin-workflow-test": "0.20.0-alpha.15"
},
"devDependencies": {
"@ant-design/icons": "5.x",
diff --git a/packages/presets/nocobase/package.json b/packages/presets/nocobase/package.json
index 50aed5af1..29ace686b 100644
--- a/packages/presets/nocobase/package.json
+++ b/packages/presets/nocobase/package.json
@@ -1,66 +1,66 @@
{
"name": "@nocobase/preset-nocobase",
- "version": "0.20.0-alpha.14",
+ "version": "0.20.0-alpha.15",
"license": "AGPL-3.0",
"main": "./lib/server/index.js",
"dependencies": {
"@formily/json-schema": "2.x",
- "@nocobase/plugin-acl": "0.20.0-alpha.14",
- "@nocobase/plugin-action-bulk-edit": "0.20.0-alpha.14",
- "@nocobase/plugin-action-bulk-update": "0.20.0-alpha.14",
- "@nocobase/plugin-action-duplicate": "0.20.0-alpha.14",
- "@nocobase/plugin-action-print": "0.20.0-alpha.14",
- "@nocobase/plugin-api-doc": "0.20.0-alpha.14",
- "@nocobase/plugin-api-keys": "0.20.0-alpha.14",
- "@nocobase/plugin-audit-logs": "0.20.0-alpha.14",
- "@nocobase/plugin-auth": "0.20.0-alpha.14",
- "@nocobase/plugin-backup-restore": "0.20.0-alpha.14",
- "@nocobase/plugin-calendar": "0.20.0-alpha.14",
- "@nocobase/plugin-cas": "0.20.0-alpha.14",
- "@nocobase/plugin-charts": "0.20.0-alpha.14",
- "@nocobase/plugin-china-region": "0.20.0-alpha.14",
- "@nocobase/plugin-client": "0.20.0-alpha.14",
- "@nocobase/plugin-collection-manager": "0.20.0-alpha.14",
- "@nocobase/plugin-custom-request": "0.20.0-alpha.14",
- "@nocobase/plugin-data-source-manager": "0.20.0-alpha.14",
- "@nocobase/plugin-data-visualization": "0.20.0-alpha.14",
- "@nocobase/plugin-error-handler": "0.20.0-alpha.14",
- "@nocobase/plugin-export": "0.20.0-alpha.14",
- "@nocobase/plugin-file-manager": "0.20.0-alpha.14",
- "@nocobase/plugin-formula-field": "0.20.0-alpha.14",
- "@nocobase/plugin-gantt": "0.20.0-alpha.14",
- "@nocobase/plugin-graph-collection-manager": "0.20.0-alpha.14",
- "@nocobase/plugin-iframe-block": "0.20.0-alpha.14",
- "@nocobase/plugin-import": "0.20.0-alpha.14",
- "@nocobase/plugin-kanban": "0.20.0-alpha.14",
- "@nocobase/plugin-localization-management": "0.20.0-alpha.14",
- "@nocobase/plugin-logger": "0.20.0-alpha.14",
- "@nocobase/plugin-map": "0.20.0-alpha.14",
- "@nocobase/plugin-mobile-client": "0.20.0-alpha.14",
- "@nocobase/plugin-mock-collections": "0.20.0-alpha.14",
- "@nocobase/plugin-multi-app-manager": "0.20.0-alpha.14",
- "@nocobase/plugin-multi-app-share-collection": "0.20.0-alpha.14",
- "@nocobase/plugin-oidc": "0.20.0-alpha.14",
- "@nocobase/plugin-saml": "0.20.0-alpha.14",
- "@nocobase/plugin-sequence-field": "0.20.0-alpha.14",
- "@nocobase/plugin-sms-auth": "0.20.0-alpha.14",
- "@nocobase/plugin-snapshot-field": "0.20.0-alpha.14",
- "@nocobase/plugin-system-settings": "0.20.0-alpha.14",
- "@nocobase/plugin-theme-editor": "0.20.0-alpha.14",
- "@nocobase/plugin-ui-schema-storage": "0.20.0-alpha.14",
- "@nocobase/plugin-users": "0.20.0-alpha.14",
- "@nocobase/plugin-verification": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-action-trigger": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-aggregate": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-delay": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-dynamic-calculation": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-loop": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-manual": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-parallel": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-request": "0.20.0-alpha.14",
- "@nocobase/plugin-workflow-sql": "0.20.0-alpha.14",
- "@nocobase/server": "0.20.0-alpha.14",
+ "@nocobase/plugin-acl": "0.20.0-alpha.15",
+ "@nocobase/plugin-action-bulk-edit": "0.20.0-alpha.15",
+ "@nocobase/plugin-action-bulk-update": "0.20.0-alpha.15",
+ "@nocobase/plugin-action-duplicate": "0.20.0-alpha.15",
+ "@nocobase/plugin-action-print": "0.20.0-alpha.15",
+ "@nocobase/plugin-api-doc": "0.20.0-alpha.15",
+ "@nocobase/plugin-api-keys": "0.20.0-alpha.15",
+ "@nocobase/plugin-audit-logs": "0.20.0-alpha.15",
+ "@nocobase/plugin-auth": "0.20.0-alpha.15",
+ "@nocobase/plugin-backup-restore": "0.20.0-alpha.15",
+ "@nocobase/plugin-calendar": "0.20.0-alpha.15",
+ "@nocobase/plugin-cas": "0.20.0-alpha.15",
+ "@nocobase/plugin-charts": "0.20.0-alpha.15",
+ "@nocobase/plugin-china-region": "0.20.0-alpha.15",
+ "@nocobase/plugin-client": "0.20.0-alpha.15",
+ "@nocobase/plugin-collection-manager": "0.20.0-alpha.15",
+ "@nocobase/plugin-custom-request": "0.20.0-alpha.15",
+ "@nocobase/plugin-data-source-manager": "0.20.0-alpha.15",
+ "@nocobase/plugin-data-visualization": "0.20.0-alpha.15",
+ "@nocobase/plugin-error-handler": "0.20.0-alpha.15",
+ "@nocobase/plugin-export": "0.20.0-alpha.15",
+ "@nocobase/plugin-file-manager": "0.20.0-alpha.15",
+ "@nocobase/plugin-formula-field": "0.20.0-alpha.15",
+ "@nocobase/plugin-gantt": "0.20.0-alpha.15",
+ "@nocobase/plugin-graph-collection-manager": "0.20.0-alpha.15",
+ "@nocobase/plugin-iframe-block": "0.20.0-alpha.15",
+ "@nocobase/plugin-import": "0.20.0-alpha.15",
+ "@nocobase/plugin-kanban": "0.20.0-alpha.15",
+ "@nocobase/plugin-localization-management": "0.20.0-alpha.15",
+ "@nocobase/plugin-logger": "0.20.0-alpha.15",
+ "@nocobase/plugin-map": "0.20.0-alpha.15",
+ "@nocobase/plugin-mobile-client": "0.20.0-alpha.15",
+ "@nocobase/plugin-mock-collections": "0.20.0-alpha.15",
+ "@nocobase/plugin-multi-app-manager": "0.20.0-alpha.15",
+ "@nocobase/plugin-multi-app-share-collection": "0.20.0-alpha.15",
+ "@nocobase/plugin-oidc": "0.20.0-alpha.15",
+ "@nocobase/plugin-saml": "0.20.0-alpha.15",
+ "@nocobase/plugin-sequence-field": "0.20.0-alpha.15",
+ "@nocobase/plugin-sms-auth": "0.20.0-alpha.15",
+ "@nocobase/plugin-snapshot-field": "0.20.0-alpha.15",
+ "@nocobase/plugin-system-settings": "0.20.0-alpha.15",
+ "@nocobase/plugin-theme-editor": "0.20.0-alpha.15",
+ "@nocobase/plugin-ui-schema-storage": "0.20.0-alpha.15",
+ "@nocobase/plugin-users": "0.20.0-alpha.15",
+ "@nocobase/plugin-verification": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-action-trigger": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-aggregate": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-delay": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-dynamic-calculation": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-loop": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-manual": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-parallel": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-request": "0.20.0-alpha.15",
+ "@nocobase/plugin-workflow-sql": "0.20.0-alpha.15",
+ "@nocobase/server": "0.20.0-alpha.15",
"cronstrue": "^2.11.0"
},
"repository": {