Skip to content

Commit adc3c6e

Browse files
committed
feat: Added support for linux distros
1 parent cada61c commit adc3c6e

5 files changed

Lines changed: 40 additions & 2 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codify-schemas",
3-
"version": "1.0.86-beta10",
3+
"version": "1.0.86-beta11",
44
"description": "",
55
"type": "module",
66
"main": "dist/index.js",

src/messages/get-resource-info-response-data-schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
"enum": ["Darwin", "Linux", "Windows_NT"]
2929
}
3030
},
31+
"linuxDistros": {
32+
"type": "array",
33+
"items": {
34+
"type": "string",
35+
"description": "The Linux distros the resource is compatible with"
36+
}
37+
},
3138
"import": {
3239
"type": "object",
3340
"properties": {

src/messages/get-resource-info-response-data-schema.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import schema from './get-resource-info-response-data-schema.json';
22
import { describe, it, expect } from 'vitest'
33
import Ajv from 'ajv'
4-
import {GetResourceInfoResponseData} from "../types.js";
4+
import {GetResourceInfoResponseData} from "../types/index.js";
55

66
const ajv = new Ajv({
77
strict: true,

src/messages/initialize-response-data-schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@
3030
"items": {
3131
"enum": ["Darwin", "Linux", "Windows_NT"]
3232
}
33+
},
34+
"linuxDistros": {
35+
"type": "array",
36+
"items": {
37+
"type": "string"
38+
}
3339
}
40+
3441
},
3542
"required": [
3643
"type",

src/types/index.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export interface GetResourceInfoResponseData {
121121
requiredParameters: string[] | null;
122122
},
123123
operatingSystems?: OS[];
124+
linuxDistros?: LinuxDistro[];
124125
importAndDestroy?: {
125126
requiredParameters: string[] | null;
126127
preventImport?: boolean;
@@ -179,6 +180,7 @@ export interface ResourceDefinition {
179180
type: string;
180181
dependencies: string[];
181182
operatingSystems?: OS[];
183+
linuxDistros?: LinuxDistro[];
182184
sensitiveParameters?: string[];
183185
}
184186

@@ -228,3 +230,25 @@ export enum OS {
228230
Linux = 'Linux',
229231
Windows = 'Windows_NT',
230232
}
233+
234+
export enum LinuxDistro {
235+
DEBIAN_BASED = 'debian-based',
236+
RPM_BASED = 'rpm-based',
237+
ARCH = 'arch',
238+
CENTOS = 'centos',
239+
DEBIAN = 'debian',
240+
FEDORA = 'fedora',
241+
RHEL = 'rhel',
242+
UBUNTU = 'ubuntu',
243+
ALPINE = 'alpine',
244+
AMAZON_LINUX = 'amzn',
245+
OPENSUSE = 'opensuse',
246+
SUSE = 'sles',
247+
MANJARO = 'manjaro',
248+
MINT = 'linuxmint',
249+
POP_OS = 'pop',
250+
ELEMENTARY_OS = 'elementary',
251+
KALI = 'kali',
252+
GENTOO = 'gentoo',
253+
SLACKWARE = 'slackware',
254+
}

0 commit comments

Comments
 (0)