Skip to content

Commit 64176ce

Browse files
committed
feat: Added operating systems parameter to resources
1 parent 5cbdfdd commit 64176ce

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"ajv": "^8.12.0",
2323
"ajv-formats": "^2.1.1",
2424
"clean-deep": "^3.4.0",
25-
"codify-schemas": "1.0.83",
25+
"codify-schemas": "1.0.86",
2626
"lodash.isequal": "^4.5.0",
2727
"nanoid": "^5.0.9",
2828
"strip-ansi": "^7.1.0",

src/plugin/plugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export class Plugin {
7676
dependencies: r.dependencies,
7777
type: r.typeId,
7878
sensitiveParameters,
79+
operatingSystems: r.settings.operatingSystems,
7980
}
8081
})
8182
}
@@ -122,6 +123,7 @@ export class Plugin {
122123
import: {
123124
requiredParameters: requiredPropertyNames,
124125
},
126+
operatingSystems: resource.settings.operatingSystems,
125127
sensitiveParameters,
126128
allowMultiple
127129
}

src/pty/seqeuntial-pty.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class SequentialPty implements IPty {
6464
output.push(data.toString());
6565
})
6666

67-
const stdinListener = (data) => {
67+
const stdinListener = (data: any) => {
6868
mPty.write(data.toString());
6969
};
7070

src/resource/resource-settings.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { JSONSchemaType } from 'ajv';
2-
import { StringIndexedObject } from 'codify-schemas';
2+
import { OS, StringIndexedObject } from 'codify-schemas';
33
import isObjectsEqual from 'lodash.isequal'
44
import path from 'node:path';
55

@@ -28,6 +28,11 @@ export interface ResourceSettings<T extends StringIndexedObject> {
2828
*/
2929
id: string;
3030

31+
/**
32+
* List of supported operating systems
33+
*/
34+
operatingSystems: Array<OS>;
35+
3136
/**
3237
* Schema to validate user configs with. Must be in the format JSON Schema draft07
3338
*/

src/utils/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { OS } from 'codify-schemas';
12
import os from 'node:os';
23
import path from 'node:path';
34

@@ -11,7 +12,7 @@ export enum Shell {
1112
}
1213

1314
export interface SystemInfo {
14-
os: 'Darwin' | 'Linux' | 'Windows_NT';
15+
os: OS;
1516
shell: Shell;
1617
}
1718

0 commit comments

Comments
 (0)