doomistorage 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/file.js CHANGED
@@ -7,7 +7,7 @@ exports.FileBase = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const moment_1 = __importDefault(require("moment"));
10
- const node_uuid_1 = require("node-uuid");
10
+ const uuid_1 = require("uuid");
11
11
  class FileBase {
12
12
  /**
13
13
  * 根据DoomiSoft框架生成的唯一文件名,用户上传后的文件存储后名称,防止重复
@@ -41,7 +41,7 @@ class FileBase {
41
41
  break;
42
42
  ///用自己的id(当前登录的id)建造目录
43
43
  case 'identity':
44
- subFolder = (_a = userInfo.id) !== null && _a !== void 0 ? _a : (0, node_uuid_1.v4)();
44
+ subFolder = (_a = userInfo.id) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)();
45
45
  break;
46
46
  }
47
47
  let saveFolder = path_1.default.join(saveOption.saveDir, subFolder + '');
@@ -78,11 +78,11 @@ class FileBase {
78
78
  break;
79
79
  ///随机命名,但后缀必须一致
80
80
  case "random":
81
- _fileName = (0, node_uuid_1.v4)() + path_1.default.extname(fileName);
81
+ _fileName = (0, uuid_1.v4)() + path_1.default.extname(fileName);
82
82
  break;
83
83
  ///使用当前账号的id命名
84
84
  case "identity":
85
- _fileName = ((_a = userInfo.id) !== null && _a !== void 0 ? _a : (0, node_uuid_1.v4)()) + path_1.default.extname(fileName);
85
+ _fileName = ((_a = userInfo.id) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)()) + path_1.default.extname(fileName);
86
86
  break;
87
87
  }
88
88
  return _fileName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doomistorage",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -17,10 +17,10 @@
17
17
  "typescript": "^5.0.2"
18
18
  },
19
19
  "dependencies": {
20
- "axios": "^1.3.4",
21
- "cos-nodejs-sdk-v5": "^2.12.1",
20
+ "axios": "^1.8.4",
21
+ "cos-nodejs-sdk-v5": "^2.16.0-beta.8",
22
22
  "moment": "^2.29.4",
23
23
  "multer": "^1.4.5-lts.1",
24
- "node-uuid": "^1.4.8"
24
+ "uuid": "^11.1.0"
25
25
  }
26
26
  }
package/src/file.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import Moment from 'moment';
4
- import { v4 as UUIDV4 } from 'node-uuid';
4
+ import { v4 as UUIDV4 } from 'uuid'
5
5
  import { FileConfig, FileResult } from './declare';
6
6
  export abstract class FileBase {
7
7
  /**