mirror of
https://github.com/certd/certd.git
synced 2026-04-14 12:30:54 +08:00
chore: change password
This commit is contained in:
@@ -20,9 +20,7 @@
|
||||
"axios": "^1.4.0",
|
||||
"node-forge": "^1.3.1",
|
||||
"nodemailer": "^6.9.3",
|
||||
"qs": "^6.11.2",
|
||||
"react-native-get-random-values": "^1.9.0",
|
||||
"uuid": "^8.3.2"
|
||||
"qs": "^6.11.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/acme-client": "^1.1.1",
|
||||
|
||||
@@ -7,10 +7,6 @@ import { IEmailService } from "../service";
|
||||
import { IContext } from "../core";
|
||||
import { AxiosInstance } from "axios";
|
||||
|
||||
//解决 uuid random-values not support 问题
|
||||
// https://github.com/uuidjs/uuid#getrandomvalues-not-supported
|
||||
import "react-native-get-random-values";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
export enum ContextScope {
|
||||
global,
|
||||
pipeline,
|
||||
@@ -82,16 +78,19 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
randomFileId() {
|
||||
return Math.random().toString(36).substring(2, 9);
|
||||
}
|
||||
linkFile(file: FileItem) {
|
||||
this._result.files!.push({
|
||||
...file,
|
||||
id: uuidv4(),
|
||||
id: this.randomFileId(),
|
||||
});
|
||||
}
|
||||
saveFile(filename: string, file: Buffer) {
|
||||
const filePath = this.ctx.fileStore.writeFile(filename, file);
|
||||
this._result.files!.push({
|
||||
id: uuidv4(),
|
||||
id: this.randomFileId(),
|
||||
filename,
|
||||
path: filePath,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user