From e27fb155631f7f480aee0eecad8014a90ee2b99f Mon Sep 17 00:00:00 2001 From: "Jan T. Sott" Date: Sat, 23 Mar 2024 00:39:06 +0100 Subject: [PATCH] improve types --- src/commands.ts | 3 ++- src/util.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands.ts b/src/commands.ts index d0c5764..14f91f0 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -1,6 +1,7 @@ import { mapArguments, objectify, spawnMakensis, splitCommands } from './util'; import type { SpawnOptions } from 'node:child_process'; +import type Makensis from '../types'; /** * Returns usage information for a command, or list all commands @@ -74,7 +75,7 @@ export async function license(compilerOptions: Makensis.CompilerOptions = {}, sp * @param compilerOptions - compiler options * @returns - NSIS directory */ -export async function nsisDir(compilerOptions: Makensis.CompilerOptions = {}): Promise { +export async function nsisDir(compilerOptions: Makensis.CompilerOptions = {}): Promise { const hdrOptions: Makensis.CompilerOptions = { ...compilerOptions, json: true }; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/util.ts b/src/util.ts index 3def4a2..334aa0e 100644 --- a/src/util.ts +++ b/src/util.ts @@ -3,6 +3,7 @@ import { platform } from 'node:os'; import { spawn } from 'node:child_process'; import type { ChildProcess, SpawnOptions } from 'node:child_process'; +import type Makensis from '../types'; function detectOutfile(str: string): null | string { if (str.includes('Output: "')) { @@ -347,6 +348,7 @@ export function spawnMakensis(cmd: string, args: Array, compilerOptions: child.stdout?.on('data', (data: Buffer) => { const line = data.toString(); + stream.stdout += line; const warnings = hasWarnings(line);