diff --git a/demo/client/package.json b/demo/client/package.json index 0141f38..3ead5d5 100644 --- a/demo/client/package.json +++ b/demo/client/package.json @@ -11,6 +11,7 @@ "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "axios": "^0.21.1", + "easy-file-uploader-client": "^1.0.3", "file-uploader-client": "file:../../package/fileUploaderClient/dist", "http-proxy-middleware": "^2.0.1", "react": "^17.0.2", @@ -42,4 +43,4 @@ "last 1 safari version" ] } -} \ No newline at end of file +} diff --git a/demo/client/src/App.tsx b/demo/client/src/App.tsx index d86e7e2..c7fc2b4 100644 --- a/demo/client/src/App.tsx +++ b/demo/client/src/App.tsx @@ -1,7 +1,9 @@ import { useRef, useState } from 'react' import './App.css' -import { FileUploaderClient } from 'file-uploader-client' import axios from 'axios' +import { FileUploaderClient } from 'file-uploader-client' +// import { FileUploaderClient } from 'easy-file-uploader-client' //or you can use easy-file-uploader-client on npm + const HOST = 'http://localhost:10001/' diff --git a/demo/server/package.json b/demo/server/package.json index 6fcf8d9..9adae67 100644 --- a/demo/server/package.json +++ b/demo/server/package.json @@ -11,6 +11,7 @@ "dependencies": { "@koa/cors": "^3.1.0", "@koa/multer": "^3.0.0", + "easy-file-uploader-server": "^1.0.3", "file-uploader-server": "file:../../package/fileUploaderServer/dist", "koa": "^2.13.1", "koa-body": "^4.2.0", @@ -20,4 +21,4 @@ "multer": "^1.4.2", "multistream": "^4.1.0" } -} \ No newline at end of file +} diff --git a/demo/server/router.js b/demo/server/router.js index 0323ac0..5c84777 100644 --- a/demo/server/router.js +++ b/demo/server/router.js @@ -2,6 +2,7 @@ const KoaRouter = require('koa-router') const multer = require('@koa/multer') const path = require('path') const { FileUploaderServer } = require('file-uploader-server') +// const { FileUploaderServer } = require('easy-file-uploader-server') // or you can use easy-file-uploader-server on npm const upload = multer() const router = KoaRouter() diff --git a/package/fileUploaderClient/package.json b/package/fileUploaderClient/package.json index 1a8db9c..b573860 100644 --- a/package/fileUploaderClient/package.json +++ b/package/fileUploaderClient/package.json @@ -1,9 +1,20 @@ { "name": "easy-file-uploader-client", - "version": "1.0.0", + "version": "1.0.3", "description": "前端通用文件分片上传组件", "author": "shadowingszy", "license": "ISC", + "repository": "shadowings-zy/easy-file-uploader", + "main": "dist/index.js", + "keywords": [ + "file-upload", + "upload-client" + ], + "files": [ + "dist/*", + "package.json", + "README.md" + ], "devDependencies": { "@types/spark-md5": "^3.0.2", "typescript": "^4.3.4" diff --git a/package/fileUploaderServer/package.json b/package/fileUploaderServer/package.json index 8bd148b..3d1775b 100644 --- a/package/fileUploaderServer/package.json +++ b/package/fileUploaderServer/package.json @@ -1,9 +1,20 @@ { "name": "easy-file-uploader-server", - "version": "1.0.0", + "version": "1.0.4", "description": "后端通用文件分片上传组件", "author": "shadowingszy", "license": "ISC", + "repository": "shadowings-zy/easy-file-uploader", + "main": "dist/index.js", + "keywords": [ + "file-upload", + "upload-server" + ], + "files": [ + "dist/*", + "package.json", + "README.md" + ], "devDependencies": { "@types/fs-extra": "^9.0.11", "typescript": "^4.3.4" diff --git a/yarn.lock b/yarn.lock index fab407a..6846f97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4418,6 +4418,29 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +easy-file-uploader-client@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/easy-file-uploader-client/-/easy-file-uploader-client-1.0.3.tgz#2a7ec8676027e690a25073020118766f589d3719" + integrity sha512-UMlnvimSAYfeT4ZatzSMfzdC4xqYPSZZsRad3tP/1h4CkvaYR7PX8jujlDZsbqPeYD5Rp4pquzyhzGQvVbcUEQ== + dependencies: + spark-md5 "^3.0.1" + +easy-file-uploader-server@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/easy-file-uploader-server/-/easy-file-uploader-server-1.0.3.tgz#36aced47d4305fcd7a992da3eba1fb39fd448805" + integrity sha512-1U4zv3r0wrbMrm2+Ok2OmOjY3u95BB2GRYSIXb4xVkzoOBPw3y6WtczXwywoDIh/XnX6W9gXePwd4UKjOGJcqA== + dependencies: + fs-extra "^10.0.0" + multistream "^4.1.0" + +easy-file-uploader-server@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/easy-file-uploader-server/-/easy-file-uploader-server-1.0.4.tgz#630e1408a8a76a311302dc0c0b8a53fb9a2718d7" + integrity sha512-uZ2LYYwlgSDt16Nq/mL5V0ZbJfTJytHCraTPOPThK7Qo/WJYDorLbmKWiKNLUiE7vWpCbqEvo9hKXffGW3oJrg== + dependencies: + fs-extra "^10.0.0" + multistream "^4.1.0" + ee-first@1.1.1: version "1.1.1" resolved "https://r.cnpmjs.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -10872,6 +10895,8 @@ to-object-path@^0.3.0: version "0.3.0" resolved "https://r.cnpmjs.org/to-object-path/download/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" to-regex-range@^2.1.0: version "2.1.1"