codify-schemas 1.0.63 → 1.0.65

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.
@@ -32,6 +32,29 @@
32
32
  }
33
33
  }
34
34
  }
35
+ },
36
+ "importAndDestroy": {
37
+ "type": "object",
38
+ "properties": {
39
+ "requiredProperties": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "allowMultiple": {
48
+ "type": "object",
49
+ "properties": {
50
+ "requiredProperties": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ }
56
+ },
57
+ "required": ["requiredProperties"]
35
58
  }
36
59
  },
37
60
  "required": ["type", "plugin"]
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { SpawnOptions } from "node:child_process";
3
2
  import { ErrorObject } from "ajv";
4
3
  export interface StringIndexedObject {
@@ -91,9 +90,12 @@ export interface GetResourceInfoResponseData {
91
90
  type: string;
92
91
  schema?: Record<string, unknown>;
93
92
  dependencies?: string[];
94
- import?: {
93
+ importAndDestroy?: {
95
94
  requiredParameters: string[] | null;
96
95
  };
96
+ allowMultiple?: {
97
+ requiredParameters: string[];
98
+ };
97
99
  }
98
100
  export interface ImportRequestData {
99
101
  core: ResourceConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAsBA,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;AA0ED,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACjB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAsBA,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;AA6ED,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;AACjB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-schemas",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -16,6 +16,7 @@
16
16
  "ajv": "^8.12.0"
17
17
  },
18
18
  "devDependencies": {
19
+ "@types/node": "20.17.14",
19
20
  "vitest": "^1.4.0",
20
21
  "typescript": "^5.3.3",
21
22
  "ajv-formats": "^3.0.1"
@@ -32,6 +32,29 @@
32
32
  }
33
33
  }
34
34
  }
35
+ },
36
+ "importAndDestroy": {
37
+ "type": "object",
38
+ "properties": {
39
+ "requiredProperties": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "allowMultiple": {
48
+ "type": "object",
49
+ "properties": {
50
+ "requiredProperties": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ }
56
+ },
57
+ "required": ["requiredProperties"]
35
58
  }
36
59
  },
37
60
  "required": ["type", "plugin"]
@@ -1,7 +1,7 @@
1
1
  import schema from './get-resource-info-response-data-schema.json';
2
2
  import { describe, it, expect } from 'vitest'
3
3
  import Ajv from 'ajv'
4
- import {GetResourceInfoResponseData} from "../types";
4
+ import {GetResourceInfoResponseData} from "../types.js";
5
5
 
6
6
  const ajv = new Ajv({
7
7
  strict: true,
@@ -45,7 +45,17 @@ describe('Get resources response data schema', () => {
45
45
  dependencies: [
46
46
  "typeA",
47
47
  "typeB"
48
- ]
48
+ ],
49
+
50
+ },
51
+ import: {
52
+ requiredParameters: ['plugin'],
53
+ },
54
+ importAndDestroy: {
55
+ requiredProperties: ['plugin']
56
+ },
57
+ allowMultiple: {
58
+ requiredProperties: ['plugin']
49
59
  }
50
60
  })).to.be.true;
51
61
 
@@ -87,6 +97,15 @@ describe('Get resources response data schema', () => {
87
97
  "typeA",
88
98
  "typeB"
89
99
  ]
100
+ },
101
+ import: {
102
+ requiredParameters: ['plugin'],
103
+ },
104
+ importAndDestroy: {
105
+ requiredParameters: ['plugin'],
106
+ },
107
+ allowMultiple: {
108
+ requiredParameters: ['plugin']
90
109
  }
91
110
  }
92
111
  })
@@ -106,8 +106,11 @@ export interface GetResourceInfoResponseData {
106
106
  type: string;
107
107
  schema?: Record<string, unknown>,
108
108
  dependencies?: string[],
109
- import?: {
109
+ importAndDestroy?: {
110
110
  requiredParameters: string[] | null,
111
+ },
112
+ allowMultiple?: {
113
+ requiredParameters: string[]
111
114
  }
112
115
  }
113
116