codify-schemas 1.0.86-beta5 → 1.0.86-beta6
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.
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"type": "string",
|
|
10
10
|
"pattern": "^[a-zA-Z][\\w-]+$"
|
|
11
11
|
},
|
|
12
|
+
"os": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"enum": ["linux", "macOS", "windows"]
|
|
16
|
+
},
|
|
17
|
+
"uniqueItems": true
|
|
18
|
+
},
|
|
12
19
|
"name": {
|
|
13
20
|
"description": "Optional name. Useful for specifying multiple resources of the same type",
|
|
14
21
|
"type": "string",
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,9 +11,15 @@ export interface ProjectConfig extends Config {
|
|
|
11
11
|
plugins?: Record<string, string>;
|
|
12
12
|
description?: string;
|
|
13
13
|
}
|
|
14
|
+
export declare enum ResourceOs {
|
|
15
|
+
LINUX = "linux",
|
|
16
|
+
MACOS = "macOS",
|
|
17
|
+
WINDOWS = "windows"
|
|
18
|
+
}
|
|
14
19
|
export interface ResourceConfig extends Config {
|
|
15
20
|
name?: string;
|
|
16
21
|
dependsOn?: string[];
|
|
22
|
+
os: [ResourceOs.LINUX, ResourceOs.MACOS, ResourceOs.WINDOWS];
|
|
17
23
|
}
|
|
18
24
|
export declare enum MessageStatus {
|
|
19
25
|
SUCCESS = "success",
|
package/dist/types/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export var ResourceOs;
|
|
2
|
+
(function (ResourceOs) {
|
|
3
|
+
ResourceOs["LINUX"] = "linux";
|
|
4
|
+
ResourceOs["MACOS"] = "macOS";
|
|
5
|
+
ResourceOs["WINDOWS"] = "windows";
|
|
6
|
+
})(ResourceOs || (ResourceOs = {}));
|
|
1
7
|
export var MessageStatus;
|
|
2
8
|
(function (MessageStatus) {
|
|
3
9
|
MessageStatus["SUCCESS"] = "success";
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,6BAAe,CAAA;IACf,6BAAe,CAAA;IACf,iCAAmB,CAAA;AACrB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAQD,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;AACjB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AA6CD,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,kCAAa,CAAA;AACf,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B;AAED,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,mCAAa,CAAA;AACf,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AA4HD,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACjB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,MAAM,CAAN,IAAY,EAIX;AAJD,WAAY,EAAE;IACZ,uBAAiB,CAAA;IACjB,qBAAe,CAAA;IACf,4BAAsB,CAAA;AACxB,CAAC,EAJW,EAAE,KAAF,EAAE,QAIb"}
|
package/package.json
CHANGED
package/src/resource-schema.json
CHANGED
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
"type": "string",
|
|
10
10
|
"pattern": "^[a-zA-Z][\\w-]+$"
|
|
11
11
|
},
|
|
12
|
+
"os": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"enum": ["linux", "macOS", "windows"]
|
|
16
|
+
},
|
|
17
|
+
"uniqueItems": true
|
|
18
|
+
},
|
|
12
19
|
"name": {
|
|
13
20
|
"description": "Optional name. Useful for specifying multiple resources of the same type",
|
|
14
21
|
"type": "string",
|
|
@@ -36,4 +36,12 @@ describe("Resource schema tests", () => {
|
|
|
36
36
|
expect(validate({ type: "type", dependsOn: "item1" })).to.be.false;
|
|
37
37
|
expect(validate({ type: "type", dependsOn: [6] })).to.be.false;
|
|
38
38
|
})
|
|
39
|
+
|
|
40
|
+
it("os supports linux, macOS, and windows", () => {
|
|
41
|
+
const validate = ajv.compile(schema);
|
|
42
|
+
expect(validate({ type: "type", os: ["macOS", "windows", "linux"] })).to.be.true;
|
|
43
|
+
expect(validate({ type: "type", os: ["item1", "item1"] })).to.be.false;
|
|
44
|
+
expect(validate({ type: "type", os: ["macOS"] })).to.be.true;
|
|
45
|
+
expect(validate({ type: "type", os: ["macOS", "macOS"] })).to.be.false;
|
|
46
|
+
})
|
|
39
47
|
});
|
package/src/types/index.ts
CHANGED
|
@@ -15,9 +15,16 @@ export interface ProjectConfig extends Config {
|
|
|
15
15
|
description?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
export enum ResourceOs {
|
|
19
|
+
LINUX = 'linux',
|
|
20
|
+
MACOS = 'macOS',
|
|
21
|
+
WINDOWS = 'windows',
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
export interface ResourceConfig extends Config {
|
|
19
25
|
name?: string;
|
|
20
26
|
dependsOn?: string[];
|
|
27
|
+
os: [ResourceOs.LINUX, ResourceOs.MACOS, ResourceOs.WINDOWS];
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
export enum MessageStatus {
|