fix: node.js 17+, add openssl-legacy-provider (#1434)

* fix: node upgrade 17+, add openssl-legacy-provider

* fix: node upgrade 17+, add openssl-legacy-provider

* fix: param NODE_OPTIONS_OPENSSL_LEGACY_PROVIDER change to NODE_OPTIONS
This commit is contained in:
SemmyWong 2023-02-09 17:04:32 +08:00 committed by GitHub
parent 71dcabec25
commit d79143e3ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -77,3 +77,6 @@ INIT_ALI_SMS_VERIFY_CODE_SIGN=
# use any string name (no space)
DEFAULT_SMS_VERIFY_CODE_PROVIDER=
# in nodejs 17+ that SSL v3 causes some ecosystem libraries to become incompatible. Configuring this option can prevent upgrading SSL V3
# NODE_OPTIONS=--openssl-legacy-provider

View File

@ -534,7 +534,7 @@ export class Database extends EventEmitter implements AsyncEmitter {
return this.sequelize.getDialect() === 'sqlite' && lodash.get(this.options, 'storage') == ':memory:';
}
async auth(options: QueryOptions & { retry?: number } = {}) {
async auth(options: Omit<QueryOptions, 'retry'> & { retry?: number | Pick<QueryOptions, 'retry'> } = {}) {
const { retry = 10, ...others } = options;
const delay = (ms) => new Promise((yea) => setTimeout(yea, ms));
let count = 1;

View File

@ -7,7 +7,7 @@ import { transform } from '../utils';
const IMPORT_LIMIT_COUNT = 10000;
export async function importXlsx(ctx: Context, next: Next) {
let { columns } = ctx.request.body;
let { columns } = ctx.request.body as any;
const { ['file']: file } = ctx;
const { resourceName, resourceOf } = ctx.action;
if (typeof columns === 'string') {