mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 04:10:01 +00:00
refactor: Clean all instances of isNpmAvailable (#10891)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import type { FrontendSettings } from '@n8n/api-types';
|
||||
import { exec as callbackExec } from 'child_process';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import express from 'express';
|
||||
import { access as fsAccess } from 'fs/promises';
|
||||
@@ -7,7 +6,6 @@ import helmet from 'helmet';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { resolve } from 'path';
|
||||
import { Container, Service } from 'typedi';
|
||||
import { promisify } from 'util';
|
||||
|
||||
import { AbstractServer } from '@/abstract-server';
|
||||
import config from '@/config';
|
||||
@@ -67,8 +65,6 @@ import '@/workflows/workflow-history/workflow-history.controller.ee';
|
||||
import '@/workflows/workflows.controller';
|
||||
import { EventService } from './events/event.service';
|
||||
|
||||
const exec = promisify(callbackExec);
|
||||
|
||||
@Service()
|
||||
export class Server extends AbstractServer {
|
||||
private endpointPresetCredentials: string;
|
||||
@@ -174,9 +170,6 @@ export class Server extends AbstractServer {
|
||||
const { frontendService } = this;
|
||||
if (frontendService) {
|
||||
frontendService.addToSettings({
|
||||
isNpmAvailable: await exec('npm --version')
|
||||
.then(() => true)
|
||||
.catch(() => false),
|
||||
versionCli: N8N_VERSION,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user