codify-plugin-lib 1.0.11 → 1.0.12
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/utils/utils.d.ts +1 -1
- package/dist/utils/utils.js +1 -1
- package/package.json +1 -1
- package/src/utils/utils.ts +3 -3
package/dist/utils/utils.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ type CodifySpawnOptions = {
|
|
|
12
12
|
cwd?: string;
|
|
13
13
|
stdioString?: boolean;
|
|
14
14
|
} & SpawnOptions;
|
|
15
|
-
export declare function codifySpawn(cmd: string, args
|
|
15
|
+
export declare function codifySpawn(cmd: string, args?: string[], opts?: Omit<CodifySpawnOptions, 'stdio' | 'stdioString' | 'shell'>, extras?: Record<any, any>): Promise<SpawnResult>;
|
|
16
16
|
export declare function isDebug(): boolean;
|
|
17
17
|
export {};
|
package/dist/utils/utils.js
CHANGED
|
@@ -13,7 +13,7 @@ var SpawnStatus;
|
|
|
13
13
|
async function codifySpawn(cmd, args, opts, extras) {
|
|
14
14
|
try {
|
|
15
15
|
const stdio = isDebug() ? 'inherit' : 'pipe';
|
|
16
|
-
const result = await (0, promise_spawn_1.default)(cmd, args, { ...opts, stdio, stdioString: true, shell: true }, extras);
|
|
16
|
+
const result = await (0, promise_spawn_1.default)(cmd, args ?? [], { ...opts, stdio, stdioString: true, shell: true }, extras);
|
|
17
17
|
const status = (result.code === 0 && !result.stderr)
|
|
18
18
|
? SpawnStatus.SUCCESS
|
|
19
19
|
: SpawnStatus.ERROR;
|
package/package.json
CHANGED
package/src/utils/utils.ts
CHANGED
|
@@ -18,15 +18,15 @@ type CodifySpawnOptions = {
|
|
|
18
18
|
|
|
19
19
|
export async function codifySpawn(
|
|
20
20
|
cmd: string,
|
|
21
|
-
args
|
|
22
|
-
opts?: CodifySpawnOptions,
|
|
21
|
+
args?: string[],
|
|
22
|
+
opts?: Omit<CodifySpawnOptions, 'stdio' | 'stdioString' | 'shell'>,
|
|
23
23
|
extras?: Record<any, any>,
|
|
24
24
|
): Promise<SpawnResult> {
|
|
25
25
|
try {
|
|
26
26
|
const stdio = isDebug() ? 'inherit' : 'pipe';
|
|
27
27
|
const result = await promiseSpawn(
|
|
28
28
|
cmd,
|
|
29
|
-
args,
|
|
29
|
+
args ?? [],
|
|
30
30
|
{ ...opts, stdio, stdioString: true, shell: true },
|
|
31
31
|
extras
|
|
32
32
|
);
|