fix: app manager (#320)

* fix: bugfix

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

* docs: update readme.md
This commit is contained in:
chenos 2022-04-25 19:05:33 +08:00 committed by GitHub
parent 7d0087cbb3
commit 0bda80e323
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 121 additions and 85 deletions

View File

@ -66,8 +66,8 @@ Node:
Database:
- PostgreSQL 10.x+
- Mysql 8.x+
- Sqlite 3+
- MySQL 8.x+
- SQLite 3+
Installation
----------
@ -76,15 +76,33 @@ Installation
~~~shell
# 1. create project
yarn create nocobase-app my-nocobase-app
# SQLite
yarn create nocobase-app my-nocobase-app -d sqlite
# MySQL
yarn create nocobase-app my-nocobase-app -d mysql \
-e DB_HOST=mysql \
-e DB_PORT=3356 \
-e DB_DATABASE=nocobase \
-e DB_USER=nocobase \
-e DB_PASSWORD=nocobase
# PostgreSQL
yarn create nocobase-app my-nocobase-app -d postgres \
-e DB_HOST=postgres \
-e DB_PORT=5432 \
-e DB_DATABASE=postgres \
-e DB_USER=postgres \
-e DB_PASSWORD=postgres
# 2. switch to the project directory
cd my-nocobase-app
# 3. Install NocoBase
# 3. Install dependencies
yarn install
# 4. Install NocoBase
yarn nocobase install --lang=en-US
# 4. start project
# 5. start project
yarn start
~~~

View File

@ -68,8 +68,8 @@ Node:
Database:
- PostgreSQL 10.x+
- Mysql 8.x+
- Sqlite 3+
- MySQL 8.x+
- SQLite 3+
安装 & 运行
----------
@ -78,15 +78,33 @@ Database:
~~~shell
# 1. 创建项目
yarn create nocobase-app my-nocobase-app
# SQLite
yarn create nocobase-app my-nocobase-app -d sqlite
# MySQL
yarn create nocobase-app my-nocobase-app -d mysql \
-e DB_HOST=mysql \
-e DB_PORT=3356 \
-e DB_DATABASE=nocobase \
-e DB_USER=nocobase \
-e DB_PASSWORD=nocobase
# PostgreSQL
yarn create nocobase-app my-nocobase-app -d postgres \
-e DB_HOST=postgres \
-e DB_PORT=5432 \
-e DB_DATABASE=nocobase \
-e DB_USER=nocobase \
-e DB_PASSWORD=nocobase
# 2. 切换目录
cd my-nocobase-app
# 3. 安装
# 3. 安装依赖
yarn install
# 4. 安装 NocoBase
yarn nocobase install --lang=zh-CN
# 4. 启动
# 5. 启动
yarn start
~~~

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/app-client",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"license": "MIT",
"scripts": {
"start": "umi dev",
@ -10,7 +10,7 @@
"test:coverage": "umi-test --coverage"
},
"devDependencies": {
"@nocobase/client": "0.7.0-alpha.6",
"@nocobase/client": "0.7.0-alpha.7",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@umijs/test": "^3.5.20",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/app-server",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"description": "",
"license": "MIT",
"main": "./lib/index.js",
@ -11,19 +11,19 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/database": "0.7.0-alpha.6",
"@nocobase/plugin-acl": "0.7.0-alpha.6",
"@nocobase/plugin-china-region": "0.7.0-alpha.6",
"@nocobase/plugin-client": "0.7.0-alpha.6",
"@nocobase/plugin-collection-manager": "0.7.0-alpha.6",
"@nocobase/plugin-error-handler": "0.7.0-alpha.6",
"@nocobase/plugin-file-manager": "0.7.0-alpha.6",
"@nocobase/plugin-system-settings": "0.7.0-alpha.6",
"@nocobase/plugin-ui-routes-storage": "0.7.0-alpha.6",
"@nocobase/plugin-ui-schema-storage": "0.7.0-alpha.6",
"@nocobase/plugin-users": "0.7.0-alpha.6",
"@nocobase/plugin-workflow": "0.7.0-alpha.6",
"@nocobase/server": "0.7.0-alpha.6"
"@nocobase/database": "0.7.0-alpha.7",
"@nocobase/plugin-acl": "0.7.0-alpha.7",
"@nocobase/plugin-china-region": "0.7.0-alpha.7",
"@nocobase/plugin-client": "0.7.0-alpha.7",
"@nocobase/plugin-collection-manager": "0.7.0-alpha.7",
"@nocobase/plugin-error-handler": "0.7.0-alpha.7",
"@nocobase/plugin-file-manager": "0.7.0-alpha.7",
"@nocobase/plugin-system-settings": "0.7.0-alpha.7",
"@nocobase/plugin-ui-routes-storage": "0.7.0-alpha.7",
"@nocobase/plugin-ui-schema-storage": "0.7.0-alpha.7",
"@nocobase/plugin-users": "0.7.0-alpha.7",
"@nocobase/plugin-workflow": "0.7.0-alpha.7",
"@nocobase/server": "0.7.0-alpha.7"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/acl",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"description": "",
"license": "Apache-2.0",
"licenses": [
@ -17,7 +17,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/resourcer": "0.7.0-alpha.6",
"@nocobase/resourcer": "0.7.0-alpha.7",
"json-templates": "^4.2.0"
},
"repository": {

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/actions",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"description": "",
"license": "Apache-2.0",
"licenses": [
@ -17,8 +17,8 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/database": "0.7.0-alpha.6",
"@nocobase/resourcer": "0.7.0-alpha.6"
"@nocobase/database": "0.7.0-alpha.7",
"@nocobase/resourcer": "0.7.0-alpha.7"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/client",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"license": "Apache-2.0",
"licenses": [
{
@ -29,7 +29,7 @@
"@formily/antd": "^2.0.15",
"@formily/core": "^2.0.15",
"@formily/react": "^2.0.15",
"@nocobase/utils": "0.7.0-alpha.6",
"@nocobase/utils": "0.7.0-alpha.7",
"ahooks": "^3.0.5",
"antd": "~4.19.5",
"axios": "^0.24.0",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/database",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"description": "",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
@ -17,7 +17,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/utils": "0.7.0-alpha.6",
"@nocobase/utils": "0.7.0-alpha.7",
"async-mutex": "^0.3.2",
"deepmerge": "^4.2.2",
"flat": "^5.0.2",

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/test",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"types": "./lib/index.d.ts",
"license": "Apache-2.0",
@ -16,7 +16,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/server": "0.7.0-alpha.6",
"@nocobase/server": "0.7.0-alpha.7",
"@types/supertest": "^2.0.11",
"mockjs": "^1.1.0",
"mysql2": "^2.1.0",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-acl",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"description": "",
"license": "Apache-2.0",
"licenses": [
@ -17,9 +17,9 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/acl": "0.7.0-alpha.6",
"@nocobase/database": "0.7.0-alpha.6",
"@nocobase/server": "0.7.0-alpha.6"
"@nocobase/acl": "0.7.0-alpha.7",
"@nocobase/database": "0.7.0-alpha.7",
"@nocobase/server": "0.7.0-alpha.7"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-action-logs",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,7 +15,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.6"
"@nocobase/test": "0.7.0-alpha.7"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-china-region",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -18,7 +18,7 @@
"china-division": "^2.4.0"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.6"
"@nocobase/test": "0.7.0-alpha.7"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-client",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,10 +15,10 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/server": "0.7.0-alpha.6"
"@nocobase/server": "0.7.0-alpha.7"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.6"
"@nocobase/test": "0.7.0-alpha.7"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-collection-manager",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,7 +15,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.6"
"@nocobase/test": "0.7.0-alpha.7"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-error-handler",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"description": "",
"license": "Apache-2.0",
"licenses": [
@ -17,7 +17,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/server": "0.7.0-alpha.6"
"@nocobase/server": "0.7.0-alpha.7"
},
"repository": {
"type": "git",

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-multi-app-manager",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,7 +15,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/server": "0.7.0-alpha.6"
"@nocobase/server": "0.7.0-alpha.7"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -7,6 +7,7 @@ export default defineCollection({
title: '{{t("Applications")}}',
sortable: 'sort',
createdBy: true,
filterTargetKey: 'name',
fields: [
{
type: 'uid',

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-system-settings",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,7 +15,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.6"
"@nocobase/test": "0.7.0-alpha.7"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

@ -3,12 +3,11 @@ import { InstallOptions, Plugin } from '@nocobase/server';
import { resolve } from 'path';
export class SystemSettingsPlugin extends Plugin {
async install(options: InstallOptions) {
const { cliArgs } = options;
async install(options?: InstallOptions) {
await this.db.getRepository('systemSettings').create({
values: {
title: 'NocoBase',
appLang: cliArgs?.[0]?.opts?.lang || process.env.APP_LANG || 'en-US',
appLang: options?.cliArgs?.[0]?.opts?.lang || process.env.APP_LANG || 'en-US',
logo: {
title: 'nocobase-logo',
filename: '682e5ad037dd02a0fe4800a3e91c283b.png',

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-ui-schema-storage",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -16,7 +16,7 @@
},
"devDependencies": {
"@formily/json-schema": "^2.0.15",
"@nocobase/test": "0.7.0-alpha.6"
"@nocobase/test": "0.7.0-alpha.7"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@nocobase/plugin-workflow",
"version": "0.7.0-alpha.6",
"version": "0.7.0-alpha.7",
"main": "lib/index.js",
"license": "Apache-2.0",
"licenses": [
@ -15,14 +15,14 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
},
"dependencies": {
"@nocobase/actions": "0.7.0-alpha.6",
"@nocobase/database": "0.7.0-alpha.6",
"@nocobase/server": "0.7.0-alpha.6",
"@nocobase/utils": "0.7.0-alpha.6",
"@nocobase/actions": "0.7.0-alpha.7",
"@nocobase/database": "0.7.0-alpha.7",
"@nocobase/server": "0.7.0-alpha.7",
"@nocobase/utils": "0.7.0-alpha.7",
"json-templates": "^4.2.0"
},
"devDependencies": {
"@nocobase/test": "0.7.0-alpha.6"
"@nocobase/test": "0.7.0-alpha.7"
},
"gitHead": "a00b45a2686695c5f4824d074ac5e1aff210793a"
}