Skip to content

Commit

Permalink
added env, sessionid, log to options
Browse files Browse the repository at this point in the history
  • Loading branch information
work933k committed Jan 24, 2024
1 parent 51feafd commit 3e3db5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node-src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ export async function run({
flags?: Flags;
options?: Partial<Options>;
}): Promise<Output> {
const sessionId = uuid();
const env = getEnv();
const log = createLogger();
const { sessionId = uuid(), env = getEnv(), log = createLogger() } = this.options;

const pkgInfo = await readPkgUp({ cwd: process.cwd() });
if (!pkgInfo) {
Expand Down Expand Up @@ -281,3 +279,5 @@ export async function getGitInfo(): Promise<GitInfo> {
}

export { getConfiguration } from './lib/getConfiguration';

export { Logger } from './lib/log';
9 changes: 9 additions & 0 deletions node-src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ export interface Options extends Configuration {

/** An AbortSignal that terminates the build if aborted */
experimental_abortSignal?: AbortSignal;

/** Logger object */
log?: Logger;

/** Sessiond Id */
sessionId?: string;

/** Environment variables */
env?: Env;
}

export { Configuration };
Expand Down

0 comments on commit 3e3db5d

Please sign in to comment.