@maz-ui/node 4.2.1-beta.2 → 4.3.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -51,13 +51,14 @@ interface CustomLogger {
51
51
  warn: (message: string, ...args: any[]) => void;
52
52
  debug: (message: string, ...args: any[]) => void;
53
53
  }
54
- declare function execPromise(command: string, { logger, packageName, noSuccess, noStdout, noStderr, logLevel, }?: {
54
+ declare function execPromise(command: string, { logger, packageName, noSuccess, noStdout, noStderr, logLevel, cwd, }?: {
55
55
  logger?: CustomLogger;
56
56
  packageName?: string;
57
57
  noSuccess?: boolean;
58
58
  noStdout?: boolean;
59
59
  noStderr?: boolean;
60
60
  logLevel?: LogLevel;
61
+ cwd?: string;
61
62
  }): Promise<{
62
63
  stdout: string;
63
64
  stderr: string;
package/dist/index.d.ts CHANGED
@@ -51,13 +51,14 @@ interface CustomLogger {
51
51
  warn: (message: string, ...args: any[]) => void;
52
52
  debug: (message: string, ...args: any[]) => void;
53
53
  }
54
- declare function execPromise(command: string, { logger, packageName, noSuccess, noStdout, noStderr, logLevel, }?: {
54
+ declare function execPromise(command: string, { logger, packageName, noSuccess, noStdout, noStderr, logLevel, cwd, }?: {
55
55
  logger?: CustomLogger;
56
56
  packageName?: string;
57
57
  noSuccess?: boolean;
58
58
  noStdout?: boolean;
59
59
  noStderr?: boolean;
60
60
  logLevel?: LogLevel;
61
+ cwd?: string;
61
62
  }): Promise<{
62
63
  stdout: string;
63
64
  stderr: string;
package/dist/index.mjs CHANGED
@@ -55,7 +55,8 @@ async function execPromise(command, {
55
55
  noSuccess = false,
56
56
  noStdout = false,
57
57
  noStderr = false,
58
- logLevel
58
+ logLevel,
59
+ cwd
59
60
  } = {}) {
60
61
  if (logLevel) {
61
62
  logger.setLevel(logLevel);
@@ -63,7 +64,7 @@ async function execPromise(command, {
63
64
  const internalLogger = logger$1 ?? logger;
64
65
  const packageNameStr = packageName ? `[${packageName}]: ` : "";
65
66
  return await new Promise((resolve, reject) => {
66
- exec(command, (error, stdout, stderr) => {
67
+ exec(command, { cwd }, (error, stdout, stderr) => {
67
68
  if (stdout) {
68
69
  internalLogger.debug(`${command} - stdout output:`, stdout);
69
70
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/node",
3
3
  "type": "module",
4
- "version": "4.2.1-beta.2",
4
+ "version": "4.3.1-alpha.0",
5
5
  "description": "Node utilities for Maz-UI library",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",