refactor: update lint

This commit is contained in:
Mauricio Siu
2024-12-19 02:07:08 -06:00
parent c51b502116
commit 1ae96297e8
2 changed files with 249 additions and 249 deletions

View File

@@ -37,13 +37,13 @@ export type ApplicationNested = InferResultType<
export const buildApplication = async ( export const buildApplication = async (
application: ApplicationNested, application: ApplicationNested,
logPath: string logPath: string,
) => { ) => {
const writeStream = createWriteStream(logPath, { flags: "a" }); const writeStream = createWriteStream(logPath, { flags: "a" });
const { buildType, sourceType } = application; const { buildType, sourceType } = application;
try { try {
writeStream.write( writeStream.write(
`\nBuild ${buildType}: ✅\nSource Type: ${sourceType}: ✅\n` `\nBuild ${buildType}: ✅\nSource Type: ${sourceType}: ✅\n`,
); );
console.log(`Build ${buildType}: ✅`); console.log(`Build ${buildType}: ✅`);
if (buildType === "nixpacks") { if (buildType === "nixpacks") {
@@ -77,7 +77,7 @@ export const buildApplication = async (
export const getBuildCommand = ( export const getBuildCommand = (
application: ApplicationNested, application: ApplicationNested,
logPath: string logPath: string,
) => { ) => {
let command = ""; let command = "";
const { buildType, registry } = application; const { buildType, registry } = application;
@@ -106,7 +106,7 @@ export const getBuildCommand = (
}; };
export const mechanizeDockerContainer = async ( export const mechanizeDockerContainer = async (
application: ApplicationNested application: ApplicationNested,
) => { ) => {
const { const {
appName, appName,
@@ -144,7 +144,7 @@ export const mechanizeDockerContainer = async (
const filesMount = generateFileMounts(appName, application); const filesMount = generateFileMounts(appName, application);
const envVariables = prepareEnvironmentVariables( const envVariables = prepareEnvironmentVariables(
env, env,
application.project.env application.project.env,
); );
const image = getImageName(application); const image = getImageName(application);

View File

@@ -5,7 +5,7 @@ import { spawnAsync } from "../process/spawnAsync";
export const uploadImage = async ( export const uploadImage = async (
application: ApplicationNested, application: ApplicationNested,
writeStream: WriteStream writeStream: WriteStream,
) => { ) => {
const registry = application.registry; const registry = application.registry;
@@ -25,7 +25,7 @@ export const uploadImage = async (
try { try {
writeStream.write( writeStream.write(
`📦 [Enabled Registry] Uploading image to ${registry.registryType} | ${imageName} | ${finalURL}\n` `📦 [Enabled Registry] Uploading image to ${registry.registryType} | ${imageName} | ${finalURL}\n`,
); );
const loginCommand = spawnAsync( const loginCommand = spawnAsync(
"docker", "docker",
@@ -34,7 +34,7 @@ export const uploadImage = async (
if (writeStream.writable) { if (writeStream.writable) {
writeStream.write(data); writeStream.write(data);
} }
} },
); );
loginCommand.child?.stdin?.write(registry.password); loginCommand.child?.stdin?.write(registry.password);
loginCommand.child?.stdin?.end(); loginCommand.child?.stdin?.end();
@@ -59,7 +59,7 @@ export const uploadImage = async (
export const uploadImageRemoteCommand = ( export const uploadImageRemoteCommand = (
application: ApplicationNested, application: ApplicationNested,
logPath: string logPath: string,
) => { ) => {
const registry = application.registry; const registry = application.registry;