mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Replace promisify-d node calls with native promises (no-changelog) (#8464)
This commit is contained in:
committed by
GitHub
parent
238b54c77b
commit
5cb55270b7
@@ -4,17 +4,12 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { Command } from '@oclif/core';
|
||||
import * as changeCase from 'change-case';
|
||||
import * as fs from 'fs';
|
||||
import { access } from 'fs/promises';
|
||||
import * as inquirer from 'inquirer';
|
||||
import { join } from 'path';
|
||||
|
||||
import { createTemplate } from '../src';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const { promisify } = require('util');
|
||||
|
||||
const fsAccess = promisify(fs.access);
|
||||
|
||||
export class New extends Command {
|
||||
static description = 'Create new credentials/node';
|
||||
|
||||
@@ -113,7 +108,7 @@ export class New extends Command {
|
||||
// Check if node with the same name already exists in target folder
|
||||
// to not overwrite it by accident
|
||||
try {
|
||||
await fsAccess(destinationFilePath);
|
||||
await access(destinationFilePath);
|
||||
|
||||
// File does already exist. So ask if it should be overwritten.
|
||||
const overwriteQuestion: inquirer.QuestionCollection = [
|
||||
|
||||
Reference in New Issue
Block a user