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:
parent
c9159c6cf4
commit
a8f951dfab
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.7.1-alpha.5",
|
||||
"version": "0.7.1-alpha.7",
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"npmClientArgs": [
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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": {
|
||||
|
@ -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",
|
||||
|
@ -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": {
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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": [
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dumi-theme-nocobase",
|
||||
"version": "0.7.1-alpha.5",
|
||||
"version": "0.7.1-alpha.7",
|
||||
"private": true,
|
||||
"files": [
|
||||
"es",
|
||||
|
@ -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",
|
||||
|
@ -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) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nocobase/sdk",
|
||||
"version": "0.7.1-alpha.5",
|
||||
"version": "0.7.1-alpha.7",
|
||||
"license": "Apache-2.0",
|
||||
"licenses": [
|
||||
{
|
||||
|
@ -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",
|
||||
|
@ -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:');
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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": {
|
||||
|
@ -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<any>(resourceName, resourceOf) as Repository;
|
||||
const collection = repository.collection;
|
||||
const data = await repository.find({
|
||||
filter,
|
||||
fields,
|
||||
|
@ -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"
|
||||
},
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
},
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user