mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
feat: migrate to esm
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import Dockerode from 'dockerode';
|
||||
import isCidr from 'is-cidr';
|
||||
import {render} from 'mustache';
|
||||
import mustache from 'mustache';
|
||||
import path from 'path';
|
||||
import * as semver from 'semver';
|
||||
import {
|
||||
@@ -28,14 +28,13 @@ import {
|
||||
sslHardeningParameters,
|
||||
SupportedLogFormats,
|
||||
TemplateView,
|
||||
} from './common';
|
||||
} from './common.js';
|
||||
// @ts-expect-error missing type defs
|
||||
import nodePortScanner from 'node-port-scanner';
|
||||
|
||||
/* eslint-disable unicorn/prefer-module */
|
||||
/* eslint-disable unicorn/no-await-expression-member */
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const nodePortScanner = require('node-port-scanner');
|
||||
|
||||
/**
|
||||
* Checks if a ContainerInfo matches a name and version regex
|
||||
*
|
||||
@@ -263,7 +262,7 @@ export async function generateMetricsServer(logFormat: string, enableMetrics?: b
|
||||
async function renderTemplate(path: string, view: unknown): Promise<string> {
|
||||
const content = await asyncReadFile(path, 'utf8');
|
||||
|
||||
return render(content, view);
|
||||
return mustache.render(content, view);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user