chore(versions): 😊 publish v0.7.1-alpha.7 (#539)

* fix(cli): upgrade from docker

* chore(versions): 😊 publish v0.7.1-alpha.6

* fix: export bug

* chore(versions): 😊 publish v0.7.1-alpha.7

* docs: update release notes
This commit is contained in:
chenos 2022-06-26 11:25:13 +08:00 committed by GitHub
parent c9159c6cf4
commit a8f951dfab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 196 additions and 122 deletions

View File

@ -4,7 +4,7 @@ networks:
driver: bridge driver: bridge
services: services:
app: app:
image: nocobase/nocobase:0.7.0-alpha.78 image: nocobase/nocobase:0.7.1-alpha.7
networks: networks:
- nocobase - nocobase
depends_on: depends_on:

View File

@ -4,7 +4,7 @@ networks:
driver: bridge driver: bridge
services: services:
app: app:
image: nocobase/nocobase:0.7.0-alpha.78 image: nocobase/nocobase:0.7.1-alpha.7
networks: networks:
- nocobase - nocobase
environment: environment:

View File

@ -4,7 +4,7 @@ networks:
driver: bridge driver: bridge
services: services:
app: app:
image: nocobase/nocobase:0.7.0-alpha.78 image: nocobase/nocobase:0.7.1-alpha.7
networks: networks:
- nocobase - nocobase
environment: environment:

View File

@ -1,7 +1,45 @@
# Release Notes # 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(plugin-export): allow to configure in acl
- fix: sign in/sign up with enter key - fix: sign in/sign up with enter key
- fix(client): percent precision - fix(client): percent precision
@ -40,16 +78,17 @@
- fix(plugin-workflow): fix languages (#451) - fix(plugin-workflow): fix languages (#451)
- fix: afterSync hook not triggered (#450) - fix: afterSync hook not triggered (#450)
### New Features ### New features
- Fields: Formula、Relationships(o2o, o2m, m2o, m2m) - Fields: Formula、Relationships(o2o, o2m, m2o, m2m)
- Blocks: Charts(g2plot) - Blocks: Charts(g2plot)
- Plugins: Audit logs, Export - 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 - 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 - 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 ## 2022/06/01 ~ v0.7.0-alpha.83
@ -74,9 +113,9 @@
- feat(client,sdk): improve api client - 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 ## 2022/05/25 ~ v0.7.0-alpha.81

View File

@ -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(plugin-export): allow to configure in acl
- fix: sign in/sign up with enter key - fix: sign in/sign up with enter key
- fix(client): percent precision - fix(client): percent precision
@ -40,16 +78,17 @@
- fix(plugin-workflow): fix languages (#451) - fix(plugin-workflow): fix languages (#451)
- fix: afterSync hook not triggered (#450) - fix: afterSync hook not triggered (#450)
### New Features ### New features
- Fields: Formula、Relationships(o2o, o2m, m2o, m2m) - Fields: Formula、Relationships(o2o, o2m, m2o, m2m)
- Blocks: Charts(g2plot) - Blocks: Charts(g2plot)
- Plugins: Audit logs, Export - 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 - 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 - 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 ## 2022/06/01 ~ v0.7.0-alpha.83
@ -74,7 +113,7 @@
- feat(client,sdk): improve api client - 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) There are major changes to the `APIClient` API, see details [JavaScript SDK](./development/http-api/javascript-sdk.md)

View File

@ -1,5 +1,5 @@
{ {
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"npmClientArgs": [ "npmClientArgs": [

View File

@ -1,9 +1,9 @@
{ {
"name": "@nocobase/app-client", "name": "@nocobase/app-client",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@nocobase/client": "0.7.1-alpha.5" "@nocobase/client": "0.7.1-alpha.7"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,12 +1,12 @@
{ {
"name": "@nocobase/app-server", "name": "@nocobase/app-server",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"license": "MIT", "license": "MIT",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/preset-nocobase": "0.7.1-alpha.5" "@nocobase/preset-nocobase": "0.7.1-alpha.7"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/acl", "name": "@nocobase/acl",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -12,7 +12,7 @@
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/resourcer": "0.7.1-alpha.5", "@nocobase/resourcer": "0.7.1-alpha.7",
"json-templates": "^4.2.0" "json-templates": "^4.2.0"
}, },
"repository": { "repository": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/actions", "name": "@nocobase/actions",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -12,8 +12,8 @@
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/database": "0.7.1-alpha.5", "@nocobase/database": "0.7.1-alpha.7",
"@nocobase/resourcer": "0.7.1-alpha.5" "@nocobase/resourcer": "0.7.1-alpha.7"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/build", "name": "@nocobase/build",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "Library build tool based on rollup.", "description": "Library build tool based on rollup.",
"main": "lib/index.js", "main": "lib/index.js",
"bin": { "bin": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/cli", "name": "@nocobase/cli",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -23,7 +23,7 @@
"serve": "^13.0.2" "serve": "^13.0.2"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/devtools": "0.7.1-alpha.5" "@nocobase/devtools": "0.7.1-alpha.7"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/client", "name": "@nocobase/client",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
{ {
@ -19,8 +19,8 @@
"@formily/antd": "2.0.20", "@formily/antd": "2.0.20",
"@formily/core": "2.0.20", "@formily/core": "2.0.20",
"@formily/react": "2.0.20", "@formily/react": "2.0.20",
"@nocobase/sdk": "0.7.1-alpha.5", "@nocobase/sdk": "0.7.1-alpha.7",
"@nocobase/utils": "0.7.1-alpha.5", "@nocobase/utils": "0.7.1-alpha.7",
"ahooks": "^3.0.5", "ahooks": "^3.0.5",
"antd": "~4.19.5", "antd": "~4.19.5",
"axios": "^0.26.1", "axios": "^0.26.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "create-nocobase-app", "name": "create-nocobase-app",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "src/index.js", "main": "src/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/database", "name": "@nocobase/database",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
@ -12,7 +12,7 @@
} }
], ],
"dependencies": { "dependencies": {
"@nocobase/utils": "0.7.1-alpha.5", "@nocobase/utils": "0.7.1-alpha.7",
"async-mutex": "^0.3.2", "async-mutex": "^0.3.2",
"deepmerge": "^4.2.2", "deepmerge": "^4.2.2",
"flat": "^5.0.2", "flat": "^5.0.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/devtools", "name": "@nocobase/devtools",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -11,7 +11,7 @@
], ],
"main": "./src/index.js", "main": "./src/index.js",
"dependencies": { "dependencies": {
"@nocobase/build": "0.7.1-alpha.5", "@nocobase/build": "0.7.1-alpha.7",
"@testing-library/react": "^12.1.2", "@testing-library/react": "^12.1.2",
"@types/jest": "^26.0.0", "@types/jest": "^26.0.0",
"@types/koa": "^2.13.4", "@types/koa": "^2.13.4",

View File

@ -1,6 +1,6 @@
{ {
"name": "dumi-theme-nocobase", "name": "dumi-theme-nocobase",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"private": true, "private": true,
"files": [ "files": [
"es", "es",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/resourcer", "name": "@nocobase/resourcer",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",

View File

@ -1,5 +1,5 @@
import lodash from 'lodash';
import deepmerge from 'deepmerge'; import deepmerge from 'deepmerge';
import lodash from 'lodash';
type MergeStrategyType = 'merge' | 'deepMerge' | 'overwrite' | 'andMerge' | 'orMerge' | 'intersect' | 'union'; type MergeStrategyType = 'merge' | 'deepMerge' | 'overwrite' | 'andMerge' | 'orMerge' | 'intersect' | 'union';
type MergeStrategyFunc = (x: any, y: any) => any; type MergeStrategyFunc = (x: any, y: any) => any;
@ -84,7 +84,7 @@ mergeStrategies.set('union', (x, y) => {
if (typeof y === 'string') { if (typeof y === 'string') {
y = y.split(','); y = y.split(',');
} }
return lodash.uniq((x || []).concat(y || [])); return lodash.uniq((x || []).concat(y || [])).filter(Boolean);
}); });
mergeStrategies.set('intersect', (x, y) => { mergeStrategies.set('intersect', (x, y) => {

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/sdk", "name": "@nocobase/sdk",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
{ {

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/server", "name": "@nocobase/server",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",
@ -13,10 +13,10 @@
"dependencies": { "dependencies": {
"@koa/cors": "^3.1.0", "@koa/cors": "^3.1.0",
"@koa/router": "^9.4.0", "@koa/router": "^9.4.0",
"@nocobase/acl": "0.7.1-alpha.5", "@nocobase/acl": "0.7.1-alpha.7",
"@nocobase/actions": "0.7.1-alpha.5", "@nocobase/actions": "0.7.1-alpha.7",
"@nocobase/database": "0.7.1-alpha.5", "@nocobase/database": "0.7.1-alpha.7",
"@nocobase/resourcer": "0.7.1-alpha.5", "@nocobase/resourcer": "0.7.1-alpha.7",
"chalk": "^4.1.1", "chalk": "^4.1.1",
"commander": "^9.2.0", "commander": "^9.2.0",
"find-package-json": "^1.2.0", "find-package-json": "^1.2.0",

View File

@ -15,12 +15,19 @@ export default (app: Application) => {
try { try {
await app.db.auth({ retry: opts.retry || 1 }); await app.db.auth({ retry: opts.retry || 1 });
} catch (error) { } 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; return;
} }
if (!opts?.clean && !opts?.force) { if (!opts?.clean && !opts?.force) {
if (await app.db.collectionExistsInDb('applicationVersion')) { if (
(await app.db.collectionExistsInDb('applicationVersion')) ||
(await app.db.collectionExistsInDb('collections'))
) {
installed = true; installed = true;
if (!opts.silent) { if (!opts.silent) {
console.log('NocoBase is already installed. To reinstall, please execute:'); console.log('NocoBase is already installed. To reinstall, please execute:');

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/test", "name": "@nocobase/test",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",
@ -11,7 +11,7 @@
} }
], ],
"dependencies": { "dependencies": {
"@nocobase/server": "0.7.1-alpha.5", "@nocobase/server": "0.7.1-alpha.7",
"@types/supertest": "^2.0.11", "@types/supertest": "^2.0.11",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"mysql2": "^2.3.3", "mysql2": "^2.3.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/utils", "name": "@nocobase/utils",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-acl", "name": "@nocobase/plugin-acl",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -12,9 +12,9 @@
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/acl": "0.7.1-alpha.5", "@nocobase/acl": "0.7.1-alpha.7",
"@nocobase/database": "0.7.1-alpha.5", "@nocobase/database": "0.7.1-alpha.7",
"@nocobase/server": "0.7.1-alpha.5" "@nocobase/server": "0.7.1-alpha.7"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-audit-logs", "name": "@nocobase/plugin-audit-logs",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "./lib/server/index.js", "main": "./lib/server/index.js",
"types": "./lib/server/index.d.ts", "types": "./lib/server/index.d.ts",
"license": "Apache-2.0", "license": "Apache-2.0",
@ -11,11 +11,11 @@
} }
], ],
"dependencies": { "dependencies": {
"@nocobase/client": "0.7.1-alpha.5", "@nocobase/client": "0.7.1-alpha.7",
"@nocobase/server": "0.7.1-alpha.5" "@nocobase/server": "0.7.1-alpha.7"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5" "@nocobase/test": "0.7.1-alpha.7"
}, },
"gitHead": "40d079ceb4dadfd6a021ab44a42ef7f52f241745" "gitHead": "40d079ceb4dadfd6a021ab44a42ef7f52f241745"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-china-region", "name": "@nocobase/plugin-china-region",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -10,12 +10,12 @@
} }
], ],
"dependencies": { "dependencies": {
"@nocobase/client": "0.7.1-alpha.5", "@nocobase/client": "0.7.1-alpha.7",
"@nocobase/server": "0.7.1-alpha.5", "@nocobase/server": "0.7.1-alpha.7",
"china-division": "^2.4.0" "china-division": "^2.4.0"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5" "@nocobase/test": "0.7.1-alpha.7"
}, },
"gitHead": "40d079ceb4dadfd6a021ab44a42ef7f52f241745" "gitHead": "40d079ceb4dadfd6a021ab44a42ef7f52f241745"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-client", "name": "@nocobase/plugin-client",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -10,10 +10,10 @@
} }
], ],
"dependencies": { "dependencies": {
"@nocobase/server": "0.7.1-alpha.5" "@nocobase/server": "0.7.1-alpha.7"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5" "@nocobase/test": "0.7.1-alpha.7"
}, },
"gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-collection-manager", "name": "@nocobase/plugin-collection-manager",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -10,7 +10,7 @@
} }
], ],
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5" "@nocobase/test": "0.7.1-alpha.7"
}, },
"gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-error-handler", "name": "@nocobase/plugin-error-handler",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"description": "", "description": "",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -13,7 +13,7 @@
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@formily/json-schema": "^2.0.15", "@formily/json-schema": "^2.0.15",
"@nocobase/server": "0.7.1-alpha.5" "@nocobase/server": "0.7.1-alpha.7"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,10 +1,10 @@
{ {
"name": "@nocobase/plugin-export", "name": "@nocobase/plugin-export",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/server/index.js", "main": "lib/server/index.js",
"dependencies": { "dependencies": {
"@nocobase/client": "0.7.1-alpha.5", "@nocobase/client": "0.7.1-alpha.7",
"@nocobase/server": "0.7.1-alpha.5", "@nocobase/server": "0.7.1-alpha.7",
"node-xlsx": "^0.16.1" "node-xlsx": "^0.16.1"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,28 +1,17 @@
import { Context, Next } from '@nocobase/actions'; import { Context, Next } from '@nocobase/actions';
import { Collection, Repository } from '@nocobase/database'; import { Repository } from '@nocobase/database';
import xlsx from 'node-xlsx'; import xlsx from 'node-xlsx';
import render from '../renders'; import render from '../renders';
export async function exportXlsx(ctx: Context, next: Next) { export async function exportXlsx(ctx: Context, next: Next) {
let { title, columns, associatedName, associatedIndex, resourceName, filter, fields, appends, except } = let { title, columns, filter, fields, except, appends } = ctx.action.params;
ctx.action.params; const { resourceName, resourceOf } = ctx.action;
if (typeof columns === 'string') { if (typeof columns === 'string') {
columns = JSON.parse(columns); columns = JSON.parse(columns);
} }
columns = columns?.filter((col) => col?.dataIndex?.length > 0); columns = columns?.filter((col) => col?.dataIndex?.length > 0);
const repository = ctx.db.getRepository<any>(resourceName, resourceOf) as Repository;
let repository: Repository; const collection = repository.collection;
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 data = await repository.find({ const data = await repository.find({
filter, filter,
fields, fields,

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-file-manager", "name": "@nocobase/plugin-file-manager",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -11,7 +11,7 @@
], ],
"dependencies": { "dependencies": {
"@koa/multer": "^3.0.0", "@koa/multer": "^3.0.0",
"@nocobase/server": "0.7.1-alpha.5", "@nocobase/server": "0.7.1-alpha.7",
"aws-sdk": "^2.2.32", "aws-sdk": "^2.2.32",
"koa-static": "^5.0.0", "koa-static": "^5.0.0",
"mime-match": "^1.0.2", "mime-match": "^1.0.2",
@ -21,7 +21,7 @@
"multer-s3": "^2.10.0" "multer-s3": "^2.10.0"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5", "@nocobase/test": "0.7.1-alpha.7",
"@types/koa-multer": "^1.0.1", "@types/koa-multer": "^1.0.1",
"@types/multer": "^1.4.5" "@types/multer": "^1.4.5"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-multi-app-manager", "name": "@nocobase/plugin-multi-app-manager",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -10,7 +10,7 @@
} }
], ],
"dependencies": { "dependencies": {
"@nocobase/server": "0.7.1-alpha.5" "@nocobase/server": "0.7.1-alpha.7"
}, },
"gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-notifications", "name": "@nocobase/plugin-notifications",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -13,7 +13,7 @@
"nodemailer": "^6.6.1" "nodemailer": "^6.6.1"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5", "@nocobase/test": "0.7.1-alpha.7",
"@types/nodemailer": "6.4.4", "@types/nodemailer": "6.4.4",
"nodemailer-mock": "^1.5.11" "nodemailer-mock": "^1.5.11"
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-system-settings", "name": "@nocobase/plugin-system-settings",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -10,7 +10,7 @@
} }
], ],
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5" "@nocobase/test": "0.7.1-alpha.7"
}, },
"gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-ui-routes-storage", "name": "@nocobase/plugin-ui-routes-storage",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -13,7 +13,7 @@
"flat-to-nested": "^1.1.1" "flat-to-nested": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5" "@nocobase/test": "0.7.1-alpha.7"
}, },
"gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-ui-schema-storage", "name": "@nocobase/plugin-ui-schema-storage",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -11,7 +11,7 @@
], ],
"devDependencies": { "devDependencies": {
"@formily/json-schema": "2.0.20", "@formily/json-schema": "2.0.20",
"@nocobase/test": "0.7.1-alpha.5" "@nocobase/test": "0.7.1-alpha.7"
}, },
"gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-users", "name": "@nocobase/plugin-users",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -13,7 +13,7 @@
"jsonwebtoken": "^8.5.1" "jsonwebtoken": "^8.5.1"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5", "@nocobase/test": "0.7.1-alpha.7",
"@types/jsonwebtoken": "^8.5.8" "@types/jsonwebtoken": "^8.5.8"
}, },
"gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53"

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/plugin-workflow", "name": "@nocobase/plugin-workflow",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"main": "lib/index.js", "main": "lib/index.js",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
@ -10,15 +10,15 @@
} }
], ],
"dependencies": { "dependencies": {
"@nocobase/actions": "0.7.1-alpha.5", "@nocobase/actions": "0.7.1-alpha.7",
"@nocobase/database": "0.7.1-alpha.5", "@nocobase/database": "0.7.1-alpha.7",
"@nocobase/server": "0.7.1-alpha.5", "@nocobase/server": "0.7.1-alpha.7",
"@nocobase/utils": "0.7.1-alpha.5", "@nocobase/utils": "0.7.1-alpha.7",
"cron-parser": "4.4.0", "cron-parser": "4.4.0",
"json-templates": "^4.2.0" "json-templates": "^4.2.0"
}, },
"devDependencies": { "devDependencies": {
"@nocobase/test": "0.7.1-alpha.5" "@nocobase/test": "0.7.1-alpha.7"
}, },
"gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53" "gitHead": "7e9556e489007577fc0ed89063b3a9ce2f9aae53"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@nocobase/preset-nocobase", "name": "@nocobase/preset-nocobase",
"version": "0.7.1-alpha.5", "version": "0.7.1-alpha.7",
"license": "Apache-2.0", "license": "Apache-2.0",
"licenses": [ "licenses": [
{ {
@ -11,20 +11,20 @@
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"dependencies": { "dependencies": {
"@nocobase/plugin-acl": "0.7.1-alpha.5", "@nocobase/plugin-acl": "0.7.1-alpha.7",
"@nocobase/plugin-audit-logs": "0.7.1-alpha.5", "@nocobase/plugin-audit-logs": "0.7.1-alpha.7",
"@nocobase/plugin-china-region": "0.7.1-alpha.5", "@nocobase/plugin-china-region": "0.7.1-alpha.7",
"@nocobase/plugin-client": "0.7.1-alpha.5", "@nocobase/plugin-client": "0.7.1-alpha.7",
"@nocobase/plugin-collection-manager": "0.7.1-alpha.5", "@nocobase/plugin-collection-manager": "0.7.1-alpha.7",
"@nocobase/plugin-error-handler": "0.7.1-alpha.5", "@nocobase/plugin-error-handler": "0.7.1-alpha.7",
"@nocobase/plugin-export": "0.7.1-alpha.5", "@nocobase/plugin-export": "0.7.1-alpha.7",
"@nocobase/plugin-file-manager": "0.7.1-alpha.5", "@nocobase/plugin-file-manager": "0.7.1-alpha.7",
"@nocobase/plugin-system-settings": "0.7.1-alpha.5", "@nocobase/plugin-system-settings": "0.7.1-alpha.7",
"@nocobase/plugin-ui-routes-storage": "0.7.1-alpha.5", "@nocobase/plugin-ui-routes-storage": "0.7.1-alpha.7",
"@nocobase/plugin-ui-schema-storage": "0.7.1-alpha.5", "@nocobase/plugin-ui-schema-storage": "0.7.1-alpha.7",
"@nocobase/plugin-users": "0.7.1-alpha.5", "@nocobase/plugin-users": "0.7.1-alpha.7",
"@nocobase/plugin-workflow": "0.7.1-alpha.5", "@nocobase/plugin-workflow": "0.7.1-alpha.7",
"@nocobase/server": "0.7.1-alpha.5" "@nocobase/server": "0.7.1-alpha.7"
}, },
"repository": { "repository": {
"type": "git", "type": "git",