@codifycli/plugin-core 1.1.0-beta11 → 1.1.0-beta13
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/pty/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export class SequentialPty {
|
|
|
32
32
|
throw new Error('Do not directly use sudo. Use the option { requiresRoot: true } instead');
|
|
33
33
|
}
|
|
34
34
|
// If sudo is required, we must delegate to the main codify process.
|
|
35
|
-
if (options?.stdin || options?.requiresRoot) {
|
|
35
|
+
if (options?.stdin || options?.requiresRoot || options?.requiresSudoAskpass) {
|
|
36
36
|
return this.externalSpawn(cmd, options);
|
|
37
37
|
}
|
|
38
38
|
console.log(`Running command: ${Array.isArray(cmd) ? cmd.join('\\\n') : cmd}` + (options?.cwd ? `(${options?.cwd})` : ''));
|
package/dist/utils/functions.js
CHANGED
|
@@ -6,9 +6,10 @@ export function splitUserConfig(config) {
|
|
|
6
6
|
...(config.name ? { name: config.name } : {}),
|
|
7
7
|
...(config.dependsOn ? { dependsOn: config.dependsOn } : {}),
|
|
8
8
|
...(config.os ? { os: config.os } : {}),
|
|
9
|
+
...(config.distro ? { distro: config.distro } : {})
|
|
9
10
|
};
|
|
10
11
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
|
-
const { type, name, dependsOn, os, ...parameters } = config;
|
|
12
|
+
const { type, name, dependsOn, os, distro, ...parameters } = config;
|
|
12
13
|
return {
|
|
13
14
|
parameters: parameters,
|
|
14
15
|
coreParameters,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codifycli/plugin-core",
|
|
3
|
-
"version": "1.1.0-
|
|
3
|
+
"version": "1.1.0-beta13",
|
|
4
4
|
"description": "TypeScript library for building Codify plugins to manage system resources (applications, CLI tools, settings) through infrastructure-as-code",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
package/src/pty/index.ts
CHANGED
|
@@ -46,7 +46,7 @@ export class SequentialPty implements IPty {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
// If sudo is required, we must delegate to the main codify process.
|
|
49
|
-
if (options?.stdin || options?.requiresRoot) {
|
|
49
|
+
if (options?.stdin || options?.requiresRoot || options?.requiresSudoAskpass) {
|
|
50
50
|
return this.externalSpawn(cmd, options);
|
|
51
51
|
}
|
|
52
52
|
|
package/src/utils/functions.ts
CHANGED
|
@@ -10,10 +10,11 @@ export function splitUserConfig<T extends StringIndexedObject>(
|
|
|
10
10
|
...(config.name ? { name: config.name } : {}),
|
|
11
11
|
...(config.dependsOn ? { dependsOn: config.dependsOn } : {}),
|
|
12
12
|
...(config.os ? { os: config.os } : {}),
|
|
13
|
+
...(config.distro ? { distro: config.distro } : {})
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
-
const { type, name, dependsOn, os, ...parameters } = config;
|
|
17
|
+
const { type, name, dependsOn, os, distro, ...parameters } = config;
|
|
17
18
|
|
|
18
19
|
return {
|
|
19
20
|
parameters: parameters as T,
|