chore: update npm packages

This commit is contained in:
chenos 2021-04-07 09:50:00 +08:00
parent c808c5b602
commit 49f71420ed
32 changed files with 151 additions and 62 deletions

View File

@ -8,14 +8,10 @@ services:
networks: networks:
- node-network - node-network
environment: environment:
- VERDACCIO_PORT=${VERDACCIO_PORT} VERDACCIO_PORT: ${VERDACCIO_PORT}
restart: always restart: always
ports: ports:
- "${VERDACCIO_PORT}:4873" - "${VERDACCIO_PORT}:${VERDACCIO_PORT}"
# volumes:
# - "./verdaccio/storage:/verdaccio/storage"
# - "./verdaccio/config:/verdaccio/conf"
# - "./verdaccio/plugins:/verdaccio/plugins"
mysql: mysql:
image: mysql:5.7 image: mysql:5.7
environment: environment:

6
nodemon.json Normal file
View File

@ -0,0 +1,6 @@
{
"watch": ["packages/"],
"ignore": ["packages/app"],
"ext": "ts",
"exec": "ts-node ./packages/api/src/dev.ts"
}

View File

@ -3,7 +3,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"start": "cd packages/app && npm start", "start": "cd packages/app && npm start",
"start-server": "cd packages/api && npm start", "start-server": "nodemon",
"start-client": "cd packages/app && npx umi dev", "start-client": "cd packages/app && npx umi dev",
"pm2-start": "npx pm2 start packages/api/lib/index.js", "pm2-start": "npx pm2 start packages/api/lib/index.js",
"build-app": "cd packages/app && npm run build", "build-app": "cd packages/app && npm run build",
@ -15,7 +15,9 @@
"lint": "eslint --ext .ts,.tsx,.js \"packages/*/src/**.@(ts|tsx|js)\" --fix", "lint": "eslint --ext .ts,.tsx,.js \"packages/*/src/**.@(ts|tsx|js)\" --fix",
"test": "npm run lint && jest", "test": "npm run lint && jest",
"debug": "node --inspect-brk node_modules/.bin/jest --runInBand", "debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
"release": "npm run build && lerna publish --yes --registry https://npm.pkg.github.com" "version:alpha": "lerna version prerelease --preid alpha --force-publish=* --no-git-tag-version -m \"chore(versions): publish packages %s\"",
"release:force": "lerna publish from-package --yes",
"release": "lerna publish"
}, },
"devDependencies": { "devDependencies": {
"@koa/router": "^9.3.1", "@koa/router": "^9.3.1",

View File

@ -0,0 +1,8 @@
node_modules
*.log
docs
__tests__
jest.config.js
tsconfig.json
src
.fatherrc.ts

View File

@ -2,11 +2,11 @@
"name": "@nocobase/actions", "name": "@nocobase/actions",
"version": "0.4.0-alpha.0", "version": "0.4.0-alpha.0",
"description": "", "description": "",
"license": "MIT",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"scripts": { "scripts": {
}, },
"license": "MIT",
"dependencies": { "dependencies": {
"@nocobase/database": "^0.4.0-alpha.0", "@nocobase/database": "^0.4.0-alpha.0",
"@nocobase/resourcer": "^0.4.0-alpha.0" "@nocobase/resourcer": "^0.4.0-alpha.0"

7
packages/api/.npmignore Normal file
View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -1,6 +0,0 @@
{
"watch": ["src", "../"],
"ignore": ["../app"],
"ext": "ts",
"exec": "ts-node ./src/index.ts"
}

View File

@ -1,7 +1,9 @@
{ {
"name": "@nocobase/api", "name": "@nocobase/api",
"version": "0.4.0-alpha.0", "version": "0.4.0-alpha.0",
"main": "lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts",
"license": "MIT",
"scripts": { "scripts": {
"start": "nodemon", "start": "nodemon",
"db-migrate": "ts-node ./src/migrate.ts" "db-migrate": "ts-node ./src/migrate.ts"
@ -20,9 +22,5 @@
"@nocobase/plugin-users": "^0.4.0-alpha.0", "@nocobase/plugin-users": "^0.4.0-alpha.0",
"@nocobase/server": "^0.4.0-alpha.0", "@nocobase/server": "^0.4.0-alpha.0",
"koa-static": "^5.0.0" "koa-static": "^5.0.0"
},
"devDependencies": {
"nodemon": "^2.0.6",
"typescript": "^3.9.6"
} }
} }

View File

@ -1,5 +1,3 @@
import path from 'path';
import dotenv from 'dotenv';
import Api from '@nocobase/server'; import Api from '@nocobase/server';
// @ts-ignore // @ts-ignore
@ -12,11 +10,6 @@ const sync = global.sync || {
console.log('process.env.NOCOBASE_ENV', process.env.NOCOBASE_ENV); console.log('process.env.NOCOBASE_ENV', process.env.NOCOBASE_ENV);
// TODO: env 需要换种方式加载
dotenv.config({
path: path.resolve(__dirname, '../../../.env'),
});
const api = Api.create({ const api = Api.create({
database: { database: {
username: process.env.DB_USER, username: process.env.DB_USER,

8
packages/api/src/dev.ts Normal file
View File

@ -0,0 +1,8 @@
import path from 'path';
import dotenv from 'dotenv';
dotenv.config({
path: path.resolve(__dirname, '../../../.env'),
});
import './index';

View File

@ -1,19 +0,0 @@
DB_DIALECT=postgres
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=nocobase
DB_USER=test
DB_PASSWORD=test
# DB_DIALECT=mysql
# DB_PORT=3306
DB_MYSQL_PORT=3306
DB_POSTGRES_PORT=5432
API_PORT=23000
VERDACCIO_PORT=4873
LOCAL_STORAGE_BASE_URL=http://localhost:23000/uploads
USE_STATIC_SERVER=true

12
packages/app/.npmignore Normal file
View File

@ -0,0 +1,12 @@
lib
mock
node_modules
*.log
docs
__tests__
jest.config.js
tsconfig.json
src
.fatherrc.ts
.umirc.ts
nodemon.json

View File

@ -2,5 +2,5 @@
"watch": ["../"], "watch": ["../"],
"ignore": ["../app"], "ignore": ["../app"],
"ext": "ts", "ext": "ts",
"exec": "ts-node ../api/src/index.ts" "exec": "ts-node ../api/src/dev.ts"
} }

View File

@ -20,7 +20,7 @@
"prettier --parser=typescript --write" "prettier --parser=typescript --write"
] ]
}, },
"dependencies": { "devDependencies": {
"@ant-design/pro-layout": "^5.0.12", "@ant-design/pro-layout": "^5.0.12",
"@formily/antd-components": "^1.3.6", "@formily/antd-components": "^1.3.6",
"@lourenci/react-kanban": "^2.1.0", "@lourenci/react-kanban": "^2.1.0",

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -4,17 +4,14 @@
"description": "", "description": "",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"scripts": {},
"license": "MIT", "license": "MIT",
"scripts": {},
"dependencies": { "dependencies": {
"bcrypt": "^5.0.0", "bcrypt": "^5.0.0",
"deepmerge": "^4.2.2", "deepmerge": "^4.2.2",
"glob": "^7.1.6", "glob": "^7.1.6",
"sequelize": "^6.3.3" "sequelize": "^6.3.3"
}, },
"devDependencies": {
"typescript": "^3.9.6"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/nocobase/nocobase.git", "url": "git+https://github.com/nocobase/nocobase.git",

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -3,6 +3,7 @@
"version": "0.4.0-alpha.0", "version": "0.4.0-alpha.0",
"main": "lib/index.js", "main": "lib/index.js",
"license": "MIT", "license": "MIT",
"private": false,
"dependencies": { "dependencies": {
"@nocobase/server": "^0.4.0-alpha.0", "@nocobase/server": "^0.4.0-alpha.0",
"crypto-random-string": "^3.3.1", "crypto-random-string": "^3.3.1",

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -5,11 +5,11 @@
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@nocobase/actions": "^0.4.0-alpha.0", "@nocobase/actions": "^0.4.0-alpha.0",
"@nocobase/server": "^0.4.0-alpha.0", "@nocobase/server": "^0.4.0-alpha.0"
"crypto-random-string": "^3.3.0"
}, },
"dependencies": { "dependencies": {
"@nocobase/database": "^0.4.0-alpha.0", "@nocobase/database": "^0.4.0-alpha.0",
"@nocobase/resourcer": "^0.4.0-alpha.0" "@nocobase/resourcer": "^0.4.0-alpha.0",
"crypto-random-string": "^3.3.0"
} }
} }

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -4,8 +4,8 @@
"description": "", "description": "",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"scripts": {},
"license": "MIT", "license": "MIT",
"scripts": {},
"dependencies": { "dependencies": {
"deepmerge": "^4.2.2", "deepmerge": "^4.2.2",
"koa-compose": "^4.1.0", "koa-compose": "^4.1.0",
@ -13,9 +13,6 @@
"path-to-regexp": "^6.1.0", "path-to-regexp": "^6.1.0",
"qs": "^6.9.4" "qs": "^6.9.4"
}, },
"devDependencies": {
"typescript": "^3.9.6"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/nocobase/nocobase.git", "url": "git+https://github.com/nocobase/nocobase.git",

View File

@ -0,0 +1,7 @@
node_modules
*.log
docs
__tests__
tsconfig.json
src
.fatherrc.ts

View File

@ -11,14 +11,12 @@
"@nocobase/actions": "^0.4.0-alpha.0", "@nocobase/actions": "^0.4.0-alpha.0",
"@nocobase/database": "^0.4.0-alpha.0", "@nocobase/database": "^0.4.0-alpha.0",
"@nocobase/resourcer": "^0.4.0-alpha.0", "@nocobase/resourcer": "^0.4.0-alpha.0",
"@types/koa": "^2.11.6",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"koa": "^2.13.0", "koa": "^2.13.0",
"koa-bodyparser": "^4.3.0", "koa-bodyparser": "^4.3.0",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"mysql2": "^2.1.0", "mysql2": "^2.1.0",
"pg": "^8.3.3", "pg": "^8.3.3",
"pg-hstore": "^2.3.3", "pg-hstore": "^2.3.3"
"typescript": "^4.0.2"
} }
} }