feat: update dependencies (#1353)

* feat: update dependencies

* fix: import error
This commit is contained in:
chenos 2023-01-12 10:12:37 +08:00 committed by GitHub
parent 5d34d76784
commit c5238f5643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1004 additions and 377 deletions

View File

@ -30,6 +30,10 @@ RUN cd /app \
RUN cd /app \ RUN cd /app \
&& rm -rf my-nocobase-app/packages/app/client/src/.umi \ && rm -rf my-nocobase-app/packages/app/client/src/.umi \
&& rm -rf nocobase.tar.gz \ && rm -rf nocobase.tar.gz \
&& rm -rf ./my-nocobase-app/node_modules/@antv \
&& rm -rf ./my-nocobase-app/node_modules/antd \
&& rm -rf ./my-nocobase-app/node_modules/@ant-design \
&& rm -rf ./my-nocobase-app/node_modules/china-division/dist/villages.json \
&& find ./my-nocobase-app/node_modules/china-division/dist -name '*.csv' -delete \ && find ./my-nocobase-app/node_modules/china-division/dist -name '*.csv' -delete \
&& find ./my-nocobase-app/node_modules/china-division/dist -name '*.sqlite' -delete \ && find ./my-nocobase-app/node_modules/china-division/dist -name '*.sqlite' -delete \
&& tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app . && tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app .

View File

@ -30,6 +30,10 @@ RUN cd /app \
RUN cd /app \ RUN cd /app \
&& rm -rf my-nocobase-app/packages/app/client/src/.umi \ && rm -rf my-nocobase-app/packages/app/client/src/.umi \
&& rm -rf nocobase.tar.gz \ && rm -rf nocobase.tar.gz \
&& rm -rf ./my-nocobase-app/nocobase/node_modules/@antv \
&& rm -rf ./my-nocobase-app/nocobase/node_modules/antd \
&& rm -rf ./my-nocobase-app/nocobase/node_modules/@ant-design \
&& rm -rf ./my-nocobase-app/node_modules/china-division/dist/villages.json \
&& find ./my-nocobase-app/node_modules/china-division/dist -name '*.csv' -delete \ && find ./my-nocobase-app/node_modules/china-division/dist -name '*.csv' -delete \
&& find ./my-nocobase-app/node_modules/china-division/dist -name '*.sqlite' -delete \ && find ./my-nocobase-app/node_modules/china-division/dist -name '*.sqlite' -delete \
&& tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app . && tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app .

View File

@ -1,5 +1,4 @@
import { Plugin } from '@nocobase/server'; import { Plugin } from '@nocobase/server';
import { areas, cities, provinces } from 'china-division';
import { resolve } from 'path'; import { resolve } from 'path';
export class PluginChinaRegion extends Plugin { export class PluginChinaRegion extends Plugin {
@ -26,6 +25,10 @@ export class PluginChinaRegion extends Plugin {
} }
async importData() { async importData() {
const areas = require('china-division/dist/areas.json');
const cities = require('china-division/dist/cities.json');
const provinces = require('china-division/dist/provinces.json');
const timer = Date.now(); const timer = Date.now();
const ChinaRegion = this.db.getModel('chinaRegions'); const ChinaRegion = this.db.getModel('chinaRegions');

View File

@ -9,7 +9,7 @@
"@koa/multer": "^3.0.0", "@koa/multer": "^3.0.0",
"@nocobase/client": "0.9.0-alpha.1", "@nocobase/client": "0.9.0-alpha.1",
"@nocobase/server": "0.9.0-alpha.1", "@nocobase/server": "0.9.0-alpha.1",
"aws-sdk": "^2.2.32", "@aws-sdk/client-s3": "^3.245.0",
"cos-nodejs-sdk-v5": "^2.11.14", "cos-nodejs-sdk-v5": "^2.11.14",
"koa-static": "^5.0.0", "koa-static": "^5.0.0",
"mime-match": "^1.0.2", "mime-match": "^1.0.2",

View File

@ -4,7 +4,7 @@ import { cloudFilenameGetter } from '../utils';
export default { export default {
filenameKey: 'key', filenameKey: 'key',
make(storage) { make(storage) {
const S3Client = require('aws-sdk/clients/s3'); const { S3Client } = require('@aws-sdk/client-s3');
const multerS3 = require('multer-s3'); const multerS3 = require('multer-s3');
const { accessKeyId, secretAccessKey, bucket, acl = 'public-read', ...options } = storage.options; const { accessKeyId, secretAccessKey, bucket, acl = 'public-read', ...options } = storage.options;
const s3 = new S3Client({ const s3 = new S3Client({

View File

@ -11,11 +11,6 @@
}, },
"dependencies": { "dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1", "@amap/amap-jsapi-loader": "^1.0.1",
"@amap/amap-jsapi-types": "^0.0.10", "@amap/amap-jsapi-types": "^0.0.10"
"@emotion/css": "^11.7.1",
"@formily/react": "2.0.20",
"ahooks": "^3.7.2",
"antd": "~4.19.5",
"sequelize": "^6.26.0"
} }
} }

1357
yarn.lock

File diff suppressed because it is too large Load Diff