diff --git a/docker/app-mysql/docker-compose.yml b/docker/app-mysql/docker-compose.yml index 2c8b232e40..42047cf5b0 100644 --- a/docker/app-mysql/docker-compose.yml +++ b/docker/app-mysql/docker-compose.yml @@ -4,7 +4,7 @@ networks: driver: bridge services: app: - image: nocobase/nocobase:0.7.0-alpha.78 + image: nocobase/nocobase:0.7.1-alpha.7 networks: - nocobase depends_on: diff --git a/docker/app-postgres/docker-compose.yml b/docker/app-postgres/docker-compose.yml index 99d06c8413..63f081262a 100644 --- a/docker/app-postgres/docker-compose.yml +++ b/docker/app-postgres/docker-compose.yml @@ -4,7 +4,7 @@ networks: driver: bridge services: app: - image: nocobase/nocobase:0.7.0-alpha.78 + image: nocobase/nocobase:0.7.1-alpha.7 networks: - nocobase environment: diff --git a/docker/app-sqlite/docker-compose.yml b/docker/app-sqlite/docker-compose.yml index f736f5678f..6ecb80d1b6 100644 --- a/docker/app-sqlite/docker-compose.yml +++ b/docker/app-sqlite/docker-compose.yml @@ -4,7 +4,7 @@ networks: driver: bridge services: app: - image: nocobase/nocobase:0.7.0-alpha.78 + image: nocobase/nocobase:0.7.1-alpha.7 networks: - nocobase environment: diff --git a/docs/en-US/release-notes.md b/docs/en-US/release-notes.md index 3d961209c6..b53889bdbc 100644 --- a/docs/en-US/release-notes.md +++ b/docs/en-US/release-notes.md @@ -1,7 +1,45 @@ # Release Notes -## To be released +## 2022/06/26 ~ v0.7.1-alpha.7 +- fix(cli): upgrade from docker +- chore(create-nocobase-app): fix some bugs (#538) +- feat: relationship fields are loaded on demand +- fix: destroy collection fields (#536) +- feat(plugin-workflow): add delay node type (#532) +- refactor: client application (#533) +- fix: missing transaction (#531) +- fix: add ellipsis property to record picker (#527) +- fix: remove pattern without form item (#528) +- fix(client): update only fields in the form +- fix(client): remove z-index +- fix(plugin-workflow): set current when update (#526) +- fix(client): non-empty judgment +- fix: order nulls last (#519) +- fix(client): close the pop-up after request +- fix: action loading, refresh context, form submit and validate (#523) +- fix: field pattern (#520) +- fix(plugin-workflow): fix searchable select min-width (#524) +- fix: template with fields only (#517) +- fix(plugin-workflow): fix update workflow current property (#521) +- feat: improve chart component +- refactor(plugin-workflow): abstract to classes (#515) +- feat: column sortable and form item pattern (#518) +- feat(client): display option value +- feat(client): hide drawer header +- fix(audit-logs): operator does not exist: character varying = integer +- fix(custom-request): support string/json templates (#514) +- fix(cli): missing await +- feat: add block title (#513) +- fix: remove collections & fields from db (#511) +- fix(cli): upgrade error in node v14 +- feat: improve migrations (#510) +- fix(client): improve datepicker component, date with time zone, gmt support +- fix: datepicker with timezone +- fix(client): consolidate usage of date/time as UTC in transfering (#509) +- fix: formula bug +- fix: default exportable fields (#506) +- fix(audit-logs): sort by createdAt - fix(plugin-export): allow to configure in acl - fix: sign in/sign up with enter key - fix(client): percent precision @@ -40,16 +78,17 @@ - fix(plugin-workflow): fix languages (#451) - fix: afterSync hook not triggered (#450) -### New Features +### New features - Fields: Formula、Relationships(o2o, o2m, m2o, m2m) - Blocks: Charts(g2plot) - Plugins: Audit logs, Export -### Break Changes +### Breaking changes - The value of the percentage field, such as 20%, the new version is 0.2, the old version is 20 - Deleted the sub-table field and used the one-to-many field instead +- Previously created projects need to be recreated. ## 2022/06/01 ~ v0.7.0-alpha.83 @@ -74,9 +113,9 @@ - feat(client,sdk): improve api client -### Breaking Change +### Breaking changes -There are major changes to the `@nocobase/sdk` API, see details [JavaScript SDK](./development/http-api/javascript-sdk.md) +There are major changes to the `APIClient` API, see details [JavaScript SDK](./development/http-api/javascript-sdk.md) ## 2022/05/25 ~ v0.7.0-alpha.81 diff --git a/docs/zh-CN/release-notes.md b/docs/zh-CN/release-notes.md index 007b932d72..a8b74e18da 100644 --- a/docs/zh-CN/release-notes.md +++ b/docs/zh-CN/release-notes.md @@ -1,7 +1,45 @@ # 更新日志 -## To be released +## 2022/06/26 ~ v0.7.1-alpha.7 +- fix(cli): upgrade from docker +- chore(create-nocobase-app): fix some bugs (#538) +- feat: relationship fields are loaded on demand +- fix: destroy collection fields (#536) +- feat(plugin-workflow): add delay node type (#532) +- refactor: client application (#533) +- fix: missing transaction (#531) +- fix: add ellipsis property to record picker (#527) +- fix: remove pattern without form item (#528) +- fix(client): update only fields in the form +- fix(client): remove z-index +- fix(plugin-workflow): set current when update (#526) +- fix(client): non-empty judgment +- fix: order nulls last (#519) +- fix(client): close the pop-up after request +- fix: action loading, refresh context, form submit and validate (#523) +- fix: field pattern (#520) +- fix(plugin-workflow): fix searchable select min-width (#524) +- fix: template with fields only (#517) +- fix(plugin-workflow): fix update workflow current property (#521) +- feat: improve chart component +- refactor(plugin-workflow): abstract to classes (#515) +- feat: column sortable and form item pattern (#518) +- feat(client): display option value +- feat(client): hide drawer header +- fix(audit-logs): operator does not exist: character varying = integer +- fix(custom-request): support string/json templates (#514) +- fix(cli): missing await +- feat: add block title (#513) +- fix: remove collections & fields from db (#511) +- fix(cli): upgrade error in node v14 +- feat: improve migrations (#510) +- fix(client): improve datepicker component, date with time zone, gmt support +- fix: datepicker with timezone +- fix(client): consolidate usage of date/time as UTC in transfering (#509) +- fix: formula bug +- fix: default exportable fields (#506) +- fix(audit-logs): sort by createdAt - fix(plugin-export): allow to configure in acl - fix: sign in/sign up with enter key - fix(client): percent precision @@ -40,16 +78,17 @@ - fix(plugin-workflow): fix languages (#451) - fix: afterSync hook not triggered (#450) -### New Features +### New features - Fields: Formula、Relationships(o2o, o2m, m2o, m2m) - Blocks: Charts(g2plot) - Plugins: Audit logs, Export -### Break Changes +### Breaking changes - The value of the percentage field, such as 20%, the new version is 0.2, the old version is 20 - Deleted the sub-table field and used the one-to-many field instead +- Previously created projects need to be recreated. ## 2022/06/01 ~ v0.7.0-alpha.83 @@ -74,7 +113,7 @@ - feat(client,sdk): improve api client -### Breaking Change +### Breaking changes There are major changes to the `APIClient` API, see details [JavaScript SDK](./development/http-api/javascript-sdk.md) diff --git a/lerna.json b/lerna.json index 6460310366..45c378448c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "npmClient": "yarn", "useWorkspaces": true, "npmClientArgs": [ diff --git a/packages/app/client/package.json b/packages/app/client/package.json index 250945b528..3acf093e1f 100644 --- a/packages/app/client/package.json +++ b/packages/app/client/package.json @@ -1,9 +1,9 @@ { "name": "@nocobase/app-client", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "license": "MIT", "devDependencies": { - "@nocobase/client": "0.7.1-alpha.5" + "@nocobase/client": "0.7.1-alpha.7" }, "repository": { "type": "git", diff --git a/packages/app/server/package.json b/packages/app/server/package.json index 723b288030..b92281bc77 100644 --- a/packages/app/server/package.json +++ b/packages/app/server/package.json @@ -1,12 +1,12 @@ { "name": "@nocobase/app-server", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "license": "MIT", "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/preset-nocobase": "0.7.1-alpha.5" + "@nocobase/preset-nocobase": "0.7.1-alpha.7" }, "repository": { "type": "git", diff --git a/packages/core/acl/package.json b/packages/core/acl/package.json index f0823e5f5d..e6a3a7629e 100644 --- a/packages/core/acl/package.json +++ b/packages/core/acl/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/acl", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "license": "Apache-2.0", "licenses": [ @@ -12,7 +12,7 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/resourcer": "0.7.1-alpha.5", + "@nocobase/resourcer": "0.7.1-alpha.7", "json-templates": "^4.2.0" }, "repository": { diff --git a/packages/core/actions/package.json b/packages/core/actions/package.json index 982830da4d..5cd4a2aa36 100644 --- a/packages/core/actions/package.json +++ b/packages/core/actions/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/actions", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "license": "Apache-2.0", "licenses": [ @@ -12,8 +12,8 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/database": "0.7.1-alpha.5", - "@nocobase/resourcer": "0.7.1-alpha.5" + "@nocobase/database": "0.7.1-alpha.7", + "@nocobase/resourcer": "0.7.1-alpha.7" }, "repository": { "type": "git", diff --git a/packages/core/build/package.json b/packages/core/build/package.json index c4fc3de6c5..9b58331717 100755 --- a/packages/core/build/package.json +++ b/packages/core/build/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/build", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "Library build tool based on rollup.", "main": "lib/index.js", "bin": { diff --git a/packages/core/cli/package.json b/packages/core/cli/package.json index bc161902d3..c1d9d3acce 100644 --- a/packages/core/cli/package.json +++ b/packages/core/cli/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/cli", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "license": "Apache-2.0", "licenses": [ @@ -23,7 +23,7 @@ "serve": "^13.0.2" }, "devDependencies": { - "@nocobase/devtools": "0.7.1-alpha.5" + "@nocobase/devtools": "0.7.1-alpha.7" }, "repository": { "type": "git", diff --git a/packages/core/client/package.json b/packages/core/client/package.json index 38fdabd683..712a389c6d 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/client", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "license": "Apache-2.0", "licenses": [ { @@ -19,8 +19,8 @@ "@formily/antd": "2.0.20", "@formily/core": "2.0.20", "@formily/react": "2.0.20", - "@nocobase/sdk": "0.7.1-alpha.5", - "@nocobase/utils": "0.7.1-alpha.5", + "@nocobase/sdk": "0.7.1-alpha.7", + "@nocobase/utils": "0.7.1-alpha.7", "ahooks": "^3.0.5", "antd": "~4.19.5", "axios": "^0.26.1", diff --git a/packages/core/create-nocobase-app/package.json b/packages/core/create-nocobase-app/package.json index 3ddd9a6361..2cb5bdc70d 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": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "src/index.js", "license": "Apache-2.0", "licenses": [ diff --git a/packages/core/database/package.json b/packages/core/database/package.json index 9166c66b25..3c1b161e12 100644 --- a/packages/core/database/package.json +++ b/packages/core/database/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/database", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -12,7 +12,7 @@ } ], "dependencies": { - "@nocobase/utils": "0.7.1-alpha.5", + "@nocobase/utils": "0.7.1-alpha.7", "async-mutex": "^0.3.2", "deepmerge": "^4.2.2", "flat": "^5.0.2", diff --git a/packages/core/devtools/package.json b/packages/core/devtools/package.json index f4ae9962e1..46fd7593d6 100644 --- a/packages/core/devtools/package.json +++ b/packages/core/devtools/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/devtools", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "license": "Apache-2.0", "licenses": [ @@ -11,7 +11,7 @@ ], "main": "./src/index.js", "dependencies": { - "@nocobase/build": "0.7.1-alpha.5", + "@nocobase/build": "0.7.1-alpha.7", "@testing-library/react": "^12.1.2", "@types/jest": "^26.0.0", "@types/koa": "^2.13.4", diff --git a/packages/core/dumi-theme-nocobase/package.json b/packages/core/dumi-theme-nocobase/package.json index de3474b268..95864a91ff 100755 --- a/packages/core/dumi-theme-nocobase/package.json +++ b/packages/core/dumi-theme-nocobase/package.json @@ -1,6 +1,6 @@ { "name": "dumi-theme-nocobase", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "private": true, "files": [ "es", diff --git a/packages/core/resourcer/package.json b/packages/core/resourcer/package.json index 025805f5fa..7474ce0f23 100644 --- a/packages/core/resourcer/package.json +++ b/packages/core/resourcer/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/resourcer", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/core/resourcer/src/assign.ts b/packages/core/resourcer/src/assign.ts index 44853776f9..6721b257e2 100644 --- a/packages/core/resourcer/src/assign.ts +++ b/packages/core/resourcer/src/assign.ts @@ -1,5 +1,5 @@ -import lodash from 'lodash'; import deepmerge from 'deepmerge'; +import lodash from 'lodash'; type MergeStrategyType = 'merge' | 'deepMerge' | 'overwrite' | 'andMerge' | 'orMerge' | 'intersect' | 'union'; type MergeStrategyFunc = (x: any, y: any) => any; @@ -84,7 +84,7 @@ mergeStrategies.set('union', (x, y) => { if (typeof y === 'string') { y = y.split(','); } - return lodash.uniq((x || []).concat(y || [])); + return lodash.uniq((x || []).concat(y || [])).filter(Boolean); }); mergeStrategies.set('intersect', (x, y) => { diff --git a/packages/core/sdk/package.json b/packages/core/sdk/package.json index 8ce0176c99..d1493f091f 100644 --- a/packages/core/sdk/package.json +++ b/packages/core/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/sdk", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "license": "Apache-2.0", "licenses": [ { diff --git a/packages/core/server/package.json b/packages/core/server/package.json index 1a2137f10a..b358ce26e0 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/server", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", @@ -13,10 +13,10 @@ "dependencies": { "@koa/cors": "^3.1.0", "@koa/router": "^9.4.0", - "@nocobase/acl": "0.7.1-alpha.5", - "@nocobase/actions": "0.7.1-alpha.5", - "@nocobase/database": "0.7.1-alpha.5", - "@nocobase/resourcer": "0.7.1-alpha.5", + "@nocobase/acl": "0.7.1-alpha.7", + "@nocobase/actions": "0.7.1-alpha.7", + "@nocobase/database": "0.7.1-alpha.7", + "@nocobase/resourcer": "0.7.1-alpha.7", "chalk": "^4.1.1", "commander": "^9.2.0", "find-package-json": "^1.2.0", diff --git a/packages/core/server/src/commands/install.ts b/packages/core/server/src/commands/install.ts index c1cb0a3774..03005f2b84 100644 --- a/packages/core/server/src/commands/install.ts +++ b/packages/core/server/src/commands/install.ts @@ -15,12 +15,19 @@ export default (app: Application) => { try { await app.db.auth({ retry: opts.retry || 1 }); } catch (error) { - console.log(chalk.red('Unable to connect to the database. Please check the database environment variables in the .env file.')); + console.log( + chalk.red( + 'Unable to connect to the database. Please check the database environment variables in the .env file.', + ), + ); return; } if (!opts?.clean && !opts?.force) { - if (await app.db.collectionExistsInDb('applicationVersion')) { + if ( + (await app.db.collectionExistsInDb('applicationVersion')) || + (await app.db.collectionExistsInDb('collections')) + ) { installed = true; if (!opts.silent) { console.log('NocoBase is already installed. To reinstall, please execute:'); diff --git a/packages/core/test/package.json b/packages/core/test/package.json index ffbaeb62cb..38314c5f76 100644 --- a/packages/core/test/package.json +++ b/packages/core/test/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/test", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", @@ -11,7 +11,7 @@ } ], "dependencies": { - "@nocobase/server": "0.7.1-alpha.5", + "@nocobase/server": "0.7.1-alpha.7", "@types/supertest": "^2.0.11", "mockjs": "^1.1.0", "mysql2": "^2.3.3", diff --git a/packages/core/utils/package.json b/packages/core/utils/package.json index 766a8c165f..c67ae25e66 100644 --- a/packages/core/utils/package.json +++ b/packages/core/utils/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/utils", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "types": "./lib/index.d.ts", "license": "Apache-2.0", diff --git a/packages/plugins/acl/package.json b/packages/plugins/acl/package.json index b7e2edf91c..dd076c35e3 100644 --- a/packages/plugins/acl/package.json +++ b/packages/plugins/acl/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-acl", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "license": "Apache-2.0", "licenses": [ @@ -12,9 +12,9 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/acl": "0.7.1-alpha.5", - "@nocobase/database": "0.7.1-alpha.5", - "@nocobase/server": "0.7.1-alpha.5" + "@nocobase/acl": "0.7.1-alpha.7", + "@nocobase/database": "0.7.1-alpha.7", + "@nocobase/server": "0.7.1-alpha.7" }, "repository": { "type": "git", diff --git a/packages/plugins/audit-logs/package.json b/packages/plugins/audit-logs/package.json index 70861da4c9..94040b1704 100644 --- a/packages/plugins/audit-logs/package.json +++ b/packages/plugins/audit-logs/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-audit-logs", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "./lib/server/index.js", "types": "./lib/server/index.d.ts", "license": "Apache-2.0", @@ -11,11 +11,11 @@ } ], "dependencies": { - "@nocobase/client": "0.7.1-alpha.5", - "@nocobase/server": "0.7.1-alpha.5" + "@nocobase/client": "0.7.1-alpha.7", + "@nocobase/server": "0.7.1-alpha.7" }, "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5" + "@nocobase/test": "0.7.1-alpha.7" }, "gitHead": "40d079ceb4dadfd6a021ab44a42ef7f52f241745" } diff --git a/packages/plugins/china-region/package.json b/packages/plugins/china-region/package.json index 97ce8c45ba..b5b298ea1e 100644 --- a/packages/plugins/china-region/package.json +++ b/packages/plugins/china-region/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-china-region", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -10,12 +10,12 @@ } ], "dependencies": { - "@nocobase/client": "0.7.1-alpha.5", - "@nocobase/server": "0.7.1-alpha.5", + "@nocobase/client": "0.7.1-alpha.7", + "@nocobase/server": "0.7.1-alpha.7", "china-division": "^2.4.0" }, "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5" + "@nocobase/test": "0.7.1-alpha.7" }, "gitHead": "40d079ceb4dadfd6a021ab44a42ef7f52f241745" } diff --git a/packages/plugins/client/package.json b/packages/plugins/client/package.json index 03310b2f40..1cd4dadbaf 100644 --- a/packages/plugins/client/package.json +++ b/packages/plugins/client/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-client", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -10,10 +10,10 @@ } ], "dependencies": { - "@nocobase/server": "0.7.1-alpha.5" + "@nocobase/server": "0.7.1-alpha.7" }, "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5" + "@nocobase/test": "0.7.1-alpha.7" }, "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" } diff --git a/packages/plugins/collection-manager/package.json b/packages/plugins/collection-manager/package.json index f945a0872e..adec112707 100644 --- a/packages/plugins/collection-manager/package.json +++ b/packages/plugins/collection-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-collection-manager", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -10,7 +10,7 @@ } ], "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5" + "@nocobase/test": "0.7.1-alpha.7" }, "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" } diff --git a/packages/plugins/error-handler/package.json b/packages/plugins/error-handler/package.json index ce375f142f..2d7f0ee58a 100644 --- a/packages/plugins/error-handler/package.json +++ b/packages/plugins/error-handler/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-error-handler", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "description": "", "license": "Apache-2.0", "licenses": [ @@ -13,7 +13,7 @@ "types": "./lib/index.d.ts", "dependencies": { "@formily/json-schema": "^2.0.15", - "@nocobase/server": "0.7.1-alpha.5" + "@nocobase/server": "0.7.1-alpha.7" }, "repository": { "type": "git", diff --git a/packages/plugins/export/package.json b/packages/plugins/export/package.json index 91afc81bd9..e83ae41bd7 100644 --- a/packages/plugins/export/package.json +++ b/packages/plugins/export/package.json @@ -1,10 +1,10 @@ { "name": "@nocobase/plugin-export", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/server/index.js", "dependencies": { - "@nocobase/client": "0.7.1-alpha.5", - "@nocobase/server": "0.7.1-alpha.5", + "@nocobase/client": "0.7.1-alpha.7", + "@nocobase/server": "0.7.1-alpha.7", "node-xlsx": "^0.16.1" }, "devDependencies": { diff --git a/packages/plugins/export/src/server/actions/export-xlsx.ts b/packages/plugins/export/src/server/actions/export-xlsx.ts index dac2ae6d3d..08c209da0a 100644 --- a/packages/plugins/export/src/server/actions/export-xlsx.ts +++ b/packages/plugins/export/src/server/actions/export-xlsx.ts @@ -1,28 +1,17 @@ import { Context, Next } from '@nocobase/actions'; -import { Collection, Repository } from '@nocobase/database'; +import { Repository } from '@nocobase/database'; import xlsx from 'node-xlsx'; import render from '../renders'; export async function exportXlsx(ctx: Context, next: Next) { - let { title, columns, associatedName, associatedIndex, resourceName, filter, fields, appends, except } = - ctx.action.params; + let { title, columns, filter, fields, except, appends } = ctx.action.params; + const { resourceName, resourceOf } = ctx.action; if (typeof columns === 'string') { columns = JSON.parse(columns); } columns = columns?.filter((col) => col?.dataIndex?.length > 0); - - let repository: Repository; - let collection: Collection; - - if (associatedName && associatedIndex) { - const associated = ctx.db.getCollection(associatedName); - const resourceField = associated.getField(resourceName); - collection = ctx.db.getCollection(resourceField.target); - repository = associated.repository.relation(resourceName).of(associatedIndex) as any; - } else { - collection = ctx.db.getCollection(resourceName); - repository = collection.repository; - } + const repository = ctx.db.getRepository(resourceName, resourceOf) as Repository; + const collection = repository.collection; const data = await repository.find({ filter, fields, diff --git a/packages/plugins/file-manager/package.json b/packages/plugins/file-manager/package.json index 617df74dc2..4805fb4153 100644 --- a/packages/plugins/file-manager/package.json +++ b/packages/plugins/file-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-file-manager", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -11,7 +11,7 @@ ], "dependencies": { "@koa/multer": "^3.0.0", - "@nocobase/server": "0.7.1-alpha.5", + "@nocobase/server": "0.7.1-alpha.7", "aws-sdk": "^2.2.32", "koa-static": "^5.0.0", "mime-match": "^1.0.2", @@ -21,7 +21,7 @@ "multer-s3": "^2.10.0" }, "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5", + "@nocobase/test": "0.7.1-alpha.7", "@types/koa-multer": "^1.0.1", "@types/multer": "^1.4.5" }, diff --git a/packages/plugins/multi-app-manager/package.json b/packages/plugins/multi-app-manager/package.json index 878f7fd623..54b0ce53cf 100644 --- a/packages/plugins/multi-app-manager/package.json +++ b/packages/plugins/multi-app-manager/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-multi-app-manager", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -10,7 +10,7 @@ } ], "dependencies": { - "@nocobase/server": "0.7.1-alpha.5" + "@nocobase/server": "0.7.1-alpha.7" }, "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" } diff --git a/packages/plugins/notifications/package.json b/packages/plugins/notifications/package.json index 450534ea80..5c15db85db 100644 --- a/packages/plugins/notifications/package.json +++ b/packages/plugins/notifications/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-notifications", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -13,7 +13,7 @@ "nodemailer": "^6.6.1" }, "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5", + "@nocobase/test": "0.7.1-alpha.7", "@types/nodemailer": "6.4.4", "nodemailer-mock": "^1.5.11" }, diff --git a/packages/plugins/system-settings/package.json b/packages/plugins/system-settings/package.json index 5d3ec578aa..d9313ae2e5 100644 --- a/packages/plugins/system-settings/package.json +++ b/packages/plugins/system-settings/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-system-settings", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -10,7 +10,7 @@ } ], "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5" + "@nocobase/test": "0.7.1-alpha.7" }, "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" } diff --git a/packages/plugins/ui-routes-storage/package.json b/packages/plugins/ui-routes-storage/package.json index 083aa7a0fe..431eae2893 100644 --- a/packages/plugins/ui-routes-storage/package.json +++ b/packages/plugins/ui-routes-storage/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-ui-routes-storage", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -13,7 +13,7 @@ "flat-to-nested": "^1.1.1" }, "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5" + "@nocobase/test": "0.7.1-alpha.7" }, "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" } diff --git a/packages/plugins/ui-schema-storage/package.json b/packages/plugins/ui-schema-storage/package.json index 66beb12a71..ab1939cebc 100644 --- a/packages/plugins/ui-schema-storage/package.json +++ b/packages/plugins/ui-schema-storage/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-ui-schema-storage", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -11,7 +11,7 @@ ], "devDependencies": { "@formily/json-schema": "2.0.20", - "@nocobase/test": "0.7.1-alpha.5" + "@nocobase/test": "0.7.1-alpha.7" }, "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" } diff --git a/packages/plugins/users/package.json b/packages/plugins/users/package.json index 5f366cba72..0d30b3d621 100644 --- a/packages/plugins/users/package.json +++ b/packages/plugins/users/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-users", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -13,7 +13,7 @@ "jsonwebtoken": "^8.5.1" }, "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5", + "@nocobase/test": "0.7.1-alpha.7", "@types/jsonwebtoken": "^8.5.8" }, "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" diff --git a/packages/plugins/workflow/package.json b/packages/plugins/workflow/package.json index e0e5cc9f06..625d09a1ae 100644 --- a/packages/plugins/workflow/package.json +++ b/packages/plugins/workflow/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/plugin-workflow", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "main": "lib/index.js", "license": "Apache-2.0", "licenses": [ @@ -10,15 +10,15 @@ } ], "dependencies": { - "@nocobase/actions": "0.7.1-alpha.5", - "@nocobase/database": "0.7.1-alpha.5", - "@nocobase/server": "0.7.1-alpha.5", - "@nocobase/utils": "0.7.1-alpha.5", + "@nocobase/actions": "0.7.1-alpha.7", + "@nocobase/database": "0.7.1-alpha.7", + "@nocobase/server": "0.7.1-alpha.7", + "@nocobase/utils": "0.7.1-alpha.7", "cron-parser": "4.4.0", "json-templates": "^4.2.0" }, "devDependencies": { - "@nocobase/test": "0.7.1-alpha.5" + "@nocobase/test": "0.7.1-alpha.7" }, "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" } diff --git a/packages/presets/nocobase/package.json b/packages/presets/nocobase/package.json index d24da85ce3..7d8ca015e4 100644 --- a/packages/presets/nocobase/package.json +++ b/packages/presets/nocobase/package.json @@ -1,6 +1,6 @@ { "name": "@nocobase/preset-nocobase", - "version": "0.7.1-alpha.5", + "version": "0.7.1-alpha.7", "license": "Apache-2.0", "licenses": [ { @@ -11,20 +11,20 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "dependencies": { - "@nocobase/plugin-acl": "0.7.1-alpha.5", - "@nocobase/plugin-audit-logs": "0.7.1-alpha.5", - "@nocobase/plugin-china-region": "0.7.1-alpha.5", - "@nocobase/plugin-client": "0.7.1-alpha.5", - "@nocobase/plugin-collection-manager": "0.7.1-alpha.5", - "@nocobase/plugin-error-handler": "0.7.1-alpha.5", - "@nocobase/plugin-export": "0.7.1-alpha.5", - "@nocobase/plugin-file-manager": "0.7.1-alpha.5", - "@nocobase/plugin-system-settings": "0.7.1-alpha.5", - "@nocobase/plugin-ui-routes-storage": "0.7.1-alpha.5", - "@nocobase/plugin-ui-schema-storage": "0.7.1-alpha.5", - "@nocobase/plugin-users": "0.7.1-alpha.5", - "@nocobase/plugin-workflow": "0.7.1-alpha.5", - "@nocobase/server": "0.7.1-alpha.5" + "@nocobase/plugin-acl": "0.7.1-alpha.7", + "@nocobase/plugin-audit-logs": "0.7.1-alpha.7", + "@nocobase/plugin-china-region": "0.7.1-alpha.7", + "@nocobase/plugin-client": "0.7.1-alpha.7", + "@nocobase/plugin-collection-manager": "0.7.1-alpha.7", + "@nocobase/plugin-error-handler": "0.7.1-alpha.7", + "@nocobase/plugin-export": "0.7.1-alpha.7", + "@nocobase/plugin-file-manager": "0.7.1-alpha.7", + "@nocobase/plugin-system-settings": "0.7.1-alpha.7", + "@nocobase/plugin-ui-routes-storage": "0.7.1-alpha.7", + "@nocobase/plugin-ui-schema-storage": "0.7.1-alpha.7", + "@nocobase/plugin-users": "0.7.1-alpha.7", + "@nocobase/plugin-workflow": "0.7.1-alpha.7", + "@nocobase/server": "0.7.1-alpha.7" }, "repository": { "type": "git",