Skip to content

Commit

Permalink
fix: node.js 17+, add openssl-legacy-provider (#1434)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
semmywong authored Feb 9, 2023
1 parent 71dcabe commit d79143e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/core/database/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/import/src/server/actions/importXlsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit d79143e

Please sign in to comment.