codify-schemas 1.0.33 → 1.0.35

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.
Files changed (44) hide show
  1. package/dist/config-file-schema.json +1 -1
  2. package/dist/index.d.ts +4 -1
  3. package/dist/index.js +4 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/ipc-message-schema.json +1 -1
  6. package/dist/messages/apply-request-data-schema.json +1 -1
  7. package/dist/messages/apply-response-data-schema.json +1 -1
  8. package/dist/messages/commands.d.ts +7 -0
  9. package/dist/messages/commands.js +9 -0
  10. package/dist/messages/commands.js.map +1 -0
  11. package/dist/messages/error-response-data-schema.json +1 -1
  12. package/dist/messages/initialize-request-data-schema.json +1 -1
  13. package/dist/messages/initialize-response-data-schema.json +1 -1
  14. package/dist/messages/plan-request-data-schema.json +1 -1
  15. package/dist/messages/plan-response-data-schema.json +1 -1
  16. package/dist/messages/sudo-request-data-schema.json +15 -0
  17. package/dist/messages/sudo-response-data-schema.json +9 -0
  18. package/dist/messages/validate-request-data-schema.json +1 -1
  19. package/dist/messages/validate-response-data-schema.json +1 -1
  20. package/dist/project-schema.json +1 -1
  21. package/dist/resource-schema.json +1 -1
  22. package/dist/types/index.d.ts +5 -0
  23. package/package.json +1 -1
  24. package/src/config-file-schema.json +1 -1
  25. package/src/index.ts +5 -1
  26. package/src/ipc-message-schema.json +1 -1
  27. package/src/messages/apply-request-data-schema.json +1 -1
  28. package/src/messages/apply-response-data-schema.json +1 -1
  29. package/src/messages/commands.ts +7 -0
  30. package/src/messages/error-response-data-schema.json +1 -1
  31. package/src/messages/get-resources-response-data-schema.json +1 -1
  32. package/src/messages/initialize-request-data-schema.json +1 -1
  33. package/src/messages/initialize-response-data-schema.json +1 -1
  34. package/src/messages/plan-request-data-schema.json +1 -1
  35. package/src/messages/plan-response-data-schema.json +1 -1
  36. package/src/messages/sudo-request-data-schema.json +15 -0
  37. package/src/messages/sudo-request-data-schema.test.ts +21 -0
  38. package/src/messages/sudo-response-data-schema.json +9 -0
  39. package/src/messages/sudo-response-data-schema.test.ts +21 -0
  40. package/src/messages/validate-request-data-schema.json +1 -1
  41. package/src/messages/validate-response-data-schema.json +1 -1
  42. package/src/project-schema.json +1 -1
  43. package/src/resource-schema.json +1 -1
  44. package/src/types/index.ts +6 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/config-file-schema.json",
3
+ "$id": "https://www.codifycli.com/config-file-schema.json",
4
4
  "title": "Config file Schema",
5
5
  "type": "array",
6
6
  "items": {
package/dist/index.d.ts CHANGED
@@ -11,5 +11,8 @@ import ValidateRequestDataSchema from './messages/validate-request-data-schema.j
11
11
  import ValidateResponseDataSchema from './messages/validate-response-data-schema.json';
12
12
  import InitializeRequestDataSchema from './messages/initialize-request-data-schema.json';
13
13
  import InitializeResponseDataSchema from './messages/initialize-response-data-schema.json';
14
- export { ConfigFileSchema, ProjectSchema, ResourceSchema, IpcMessageSchema, ApplyRequestDataSchema, ApplyResponseDataSchema, ErrorResponseDataSchema, PlanRequestDataSchema, PlanResponseDataSchema, ValidateRequestDataSchema, ValidateResponseDataSchema, InitializeRequestDataSchema, InitializeResponseDataSchema, };
14
+ import SudoRequestData from './messages/sudo-request-data-schema.json';
15
+ import SudoRequestResponseData from './messages/sudo-response-data-schema.json';
16
+ export { ConfigFileSchema, ProjectSchema, ResourceSchema, IpcMessageSchema, ApplyRequestDataSchema, ApplyResponseDataSchema, ErrorResponseDataSchema, PlanRequestDataSchema, PlanResponseDataSchema, ValidateRequestDataSchema, ValidateResponseDataSchema, InitializeRequestDataSchema, InitializeResponseDataSchema, SudoRequestData, SudoRequestResponseData, };
15
17
  export * from './types/index.js';
18
+ export * from './messages/commands.js';
package/dist/index.js CHANGED
@@ -11,6 +11,9 @@ import ValidateRequestDataSchema from './messages/validate-request-data-schema.j
11
11
  import ValidateResponseDataSchema from './messages/validate-response-data-schema.json' assert { type: 'json' };
12
12
  import InitializeRequestDataSchema from './messages/initialize-request-data-schema.json' assert { type: 'json' };
13
13
  import InitializeResponseDataSchema from './messages/initialize-response-data-schema.json' assert { type: 'json' };
14
- export { ConfigFileSchema, ProjectSchema, ResourceSchema, IpcMessageSchema, ApplyRequestDataSchema, ApplyResponseDataSchema, ErrorResponseDataSchema, PlanRequestDataSchema, PlanResponseDataSchema, ValidateRequestDataSchema, ValidateResponseDataSchema, InitializeRequestDataSchema, InitializeResponseDataSchema, };
14
+ import SudoRequestData from './messages/sudo-request-data-schema.json';
15
+ import SudoRequestResponseData from './messages/sudo-response-data-schema.json';
16
+ export { ConfigFileSchema, ProjectSchema, ResourceSchema, IpcMessageSchema, ApplyRequestDataSchema, ApplyResponseDataSchema, ErrorResponseDataSchema, PlanRequestDataSchema, PlanResponseDataSchema, ValidateRequestDataSchema, ValidateResponseDataSchema, InitializeRequestDataSchema, InitializeResponseDataSchema, SudoRequestData, SudoRequestResponseData, };
15
17
  export * from './types/index.js';
18
+ export * from './messages/commands.js';
16
19
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9E,OAAO,aAAa,MAAM,uBAAuB,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACvE,OAAO,cAAc,MAAM,wBAAwB,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACzE,OAAO,gBAAgB,MAAM,2BAA2B,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9E,OAAO,sBAAsB,MAAM,2CAA2C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACpG,OAAO,uBAAuB,MAAM,4CAA4C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACtG,OAAO,uBAAuB,MAAM,4CAA4C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACtG,OAAO,qBAAqB,MAAM,0CAA0C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAClG,OAAO,sBAAsB,MAAM,2CAA2C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACpG,OAAO,yBAAyB,MAAM,8CAA8C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC1G,OAAO,0BAA0B,MAAM,+CAA+C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC5G,OAAO,2BAA2B,MAAM,gDAAgD,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9G,OAAO,4BAA4B,MAAM,iDAAiD,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAGhH,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,GAC7B,CAAA;AAED,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,2BAA2B,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9E,OAAO,aAAa,MAAM,uBAAuB,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACvE,OAAO,cAAc,MAAM,wBAAwB,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACzE,OAAO,gBAAgB,MAAM,2BAA2B,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9E,OAAO,sBAAsB,MAAM,2CAA2C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACpG,OAAO,uBAAuB,MAAM,4CAA4C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACtG,OAAO,uBAAuB,MAAM,4CAA4C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACtG,OAAO,qBAAqB,MAAM,0CAA0C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAClG,OAAO,sBAAsB,MAAM,2CAA2C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AACpG,OAAO,yBAAyB,MAAM,8CAA8C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC1G,OAAO,0BAA0B,MAAM,+CAA+C,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC5G,OAAO,2BAA2B,MAAM,gDAAgD,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAC9G,OAAO,4BAA4B,MAAM,iDAAiD,CAAC,SAAQ,IAAI,EAAE,MAAM,EAAC,CAAA;AAChH,OAAO,eAAe,MAAM,0CAA0C,CAAC;AACvE,OAAO,uBAAuB,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,eAAe,EACf,uBAAuB,GACxB,CAAA;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/ipc-message-schema.json",
3
+ "$id": "https://www.codifycli.com/ipc-message-schema.json",
4
4
  "title": "IPC Message Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/apply-request-data-schema.json",
3
+ "$id": "https://www.codifycli.com/apply-request-data-schema.json",
4
4
  "title": "Apply Request Schema Data",
5
5
  "description": "Apply the previously generated plan. The plan must already be generated in order for apply to work.",
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/apply-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/apply-response-data-schema.json",
4
4
  "title": "Apply Response Schema Data",
5
5
  "type": "null"
6
6
  }
@@ -0,0 +1,7 @@
1
+ export declare enum MessageCmd {
2
+ INITIALIZE = "initialize",
3
+ VALIDATE = "validate",
4
+ PLAN = "plan",
5
+ APPLY = "apply",
6
+ SUDO_REQUEST = "sudo_request"
7
+ }
@@ -0,0 +1,9 @@
1
+ export var MessageCmd;
2
+ (function (MessageCmd) {
3
+ MessageCmd["INITIALIZE"] = "initialize";
4
+ MessageCmd["VALIDATE"] = "validate";
5
+ MessageCmd["PLAN"] = "plan";
6
+ MessageCmd["APPLY"] = "apply";
7
+ MessageCmd["SUDO_REQUEST"] = "sudo_request";
8
+ })(MessageCmd || (MessageCmd = {}));
9
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/messages/commands.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,uCAAyB,CAAA;IACzB,mCAAqB,CAAA;IACrB,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,2CAA6B,CAAA;AAC/B,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/error-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/error-response-data-schema.json",
4
4
  "title": "Error Response Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/initialize-request-data-schema.json",
3
+ "$id": "https://www.codifycli.com/initialize-request-data-schema.json",
4
4
  "title": "Initialize Request Schema Data",
5
5
  "description": "Initialize the plugin",
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/initialize-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/initialize-response-data-schema.json",
4
4
  "title": "Initialize Request Schema Data",
5
5
  "description": "Initialize the plugin",
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/plan-request-data-schema.json",
3
+ "$id": "https://www.codifycli.com/plan-request-data-schema.json",
4
4
  "title": "Plan Request Schema Data",
5
5
  "$ref": "resource-schema.json"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/plan-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/plan-response-data-schema.json",
4
4
  "title": "Plan Response Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.codifycli.com/sudo-request.json",
4
+ "title": "Sudo request",
5
+ "description": "Request sudo from the core CLI",
6
+ "type": "object",
7
+ "properties": {
8
+ "command": {
9
+ "type": "string",
10
+ "description": "The command that is requesting sudo"
11
+ }
12
+ },
13
+ "required": ["command"],
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.codifycli.com/sudo-request-response.json",
4
+ "title": "Sudo request response",
5
+ "description": "Response for a sudo request",
6
+ "type": "object",
7
+ "properties": {},
8
+ "additionalProperties": false
9
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/validate-request-data-schema.json",
3
+ "$id": "https://www.codifycli.com/validate-request-data-schema.json",
4
4
  "title": "Validate Request Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/validate-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/validate-response-data-schema.json",
4
4
  "title": "Validate Response Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/project-schema.json",
3
+ "$id": "https://www.codifycli.com/project-schema.json",
4
4
  "title": "Project Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/resource-schema.json",
3
+ "$id": "https://www.codifycli.com/resource-schema.json",
4
4
  "title": "Resource Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -86,3 +86,8 @@ export interface InitializeResponseData {
86
86
  dependencies: string[];
87
87
  }>;
88
88
  }
89
+ export interface SudoRequestData {
90
+ command: string;
91
+ }
92
+ export interface SudoRequestResponseData {
93
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-schemas",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/config-file-schema.json",
3
+ "$id": "https://www.codifycli.com/config-file-schema.json",
4
4
  "title": "Config file Schema",
5
5
  "type": "array",
6
6
  "items": {
package/src/index.ts CHANGED
@@ -12,7 +12,8 @@ import ValidateRequestDataSchema from './messages/validate-request-data-schema.j
12
12
  import ValidateResponseDataSchema from './messages/validate-response-data-schema.json' assert {type: 'json'}
13
13
  import InitializeRequestDataSchema from './messages/initialize-request-data-schema.json' assert {type: 'json'}
14
14
  import InitializeResponseDataSchema from './messages/initialize-response-data-schema.json' assert {type: 'json'}
15
-
15
+ import SudoRequestData from './messages/sudo-request-data-schema.json';
16
+ import SudoRequestResponseData from './messages/sudo-response-data-schema.json';
16
17
 
17
18
  export {
18
19
  ConfigFileSchema,
@@ -28,6 +29,9 @@ export {
28
29
  ValidateResponseDataSchema,
29
30
  InitializeRequestDataSchema,
30
31
  InitializeResponseDataSchema,
32
+ SudoRequestData,
33
+ SudoRequestResponseData,
31
34
  }
32
35
 
33
36
  export * from './types/index.js';
37
+ export * from './messages/commands.js';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/ipc-message-schema.json",
3
+ "$id": "https://www.codifycli.com/ipc-message-schema.json",
4
4
  "title": "IPC Message Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/apply-request-data-schema.json",
3
+ "$id": "https://www.codifycli.com/apply-request-data-schema.json",
4
4
  "title": "Apply Request Schema Data",
5
5
  "description": "Apply the previously generated plan. The plan must already be generated in order for apply to work.",
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/apply-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/apply-response-data-schema.json",
4
4
  "title": "Apply Response Schema Data",
5
5
  "type": "null"
6
6
  }
@@ -0,0 +1,7 @@
1
+ export enum MessageCmd {
2
+ INITIALIZE = 'initialize',
3
+ VALIDATE = 'validate',
4
+ PLAN = 'plan',
5
+ APPLY = 'apply',
6
+ SUDO_REQUEST = 'sudo_request'
7
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/error-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/error-response-data-schema.json",
4
4
  "title": "Error Response Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/get-resources-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/get-resources-response-data-schema.json",
4
4
  "title": "Get Resources Response Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/initialize-request-data-schema.json",
3
+ "$id": "https://www.codifycli.com/initialize-request-data-schema.json",
4
4
  "title": "Initialize Request Schema Data",
5
5
  "description": "Initialize the plugin",
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/initialize-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/initialize-response-data-schema.json",
4
4
  "title": "Initialize Request Schema Data",
5
5
  "description": "Initialize the plugin",
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/plan-request-data-schema.json",
3
+ "$id": "https://www.codifycli.com/plan-request-data-schema.json",
4
4
  "title": "Plan Request Schema Data",
5
5
  "$ref": "resource-schema.json"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/plan-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/plan-response-data-schema.json",
4
4
  "title": "Plan Response Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.codifycli.com/sudo-request.json",
4
+ "title": "Sudo request",
5
+ "description": "Request sudo from the core CLI",
6
+ "type": "object",
7
+ "properties": {
8
+ "command": {
9
+ "type": "string",
10
+ "description": "The command that is requesting sudo"
11
+ }
12
+ },
13
+ "required": ["command"],
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,21 @@
1
+ import schema from './sudo-request-data-schema.json';
2
+ import {describe, expect, it} from 'vitest'
3
+ import Ajv2020 from 'ajv/dist/2020.js'
4
+
5
+ const ajv = new Ajv2020.default({
6
+ strict: true,
7
+ })
8
+
9
+ describe('Get resources response data schema', () => {
10
+ it('compiles', () => {
11
+ ajv.compile(schema);
12
+ })
13
+
14
+ it("requires an empty object", () => {
15
+ const validate = ajv.compile(schema);
16
+ expect(validate({
17
+ command: 'abc def'
18
+ })).to.be.true;
19
+ })
20
+
21
+ })
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.codifycli.com/sudo-request-response.json",
4
+ "title": "Sudo request response",
5
+ "description": "Response for a sudo request",
6
+ "type": "object",
7
+ "properties": {},
8
+ "additionalProperties": false
9
+ }
@@ -0,0 +1,21 @@
1
+ import schema from './sudo-request-data-schema.json';
2
+ import {describe, expect, it} from 'vitest'
3
+ import Ajv2020 from 'ajv/dist/2020.js'
4
+
5
+ const ajv = new Ajv2020.default({
6
+ strict: true,
7
+ })
8
+
9
+ describe('Get resources response data schema', () => {
10
+ it('compiles', () => {
11
+ ajv.compile(schema);
12
+ })
13
+
14
+ it("requires an empty object", () => {
15
+ const validate = ajv.compile(schema);
16
+ expect(validate({
17
+ command: 'abc def'
18
+ })).to.be.true;
19
+ })
20
+
21
+ })
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/validate-request-data-schema.json",
3
+ "$id": "https://www.codifycli.com/validate-request-data-schema.json",
4
4
  "title": "Validate Request Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/validate-response-data-schema.json",
3
+ "$id": "https://www.codifycli.com/validate-response-data-schema.json",
4
4
  "title": "Validate Response Schema Data",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/project-schema.json",
3
+ "$id": "https://www.codifycli.com/project-schema.json",
4
4
  "title": "Project Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://www.codify.com/resource-schema.json",
3
+ "$id": "https://www.codifycli.com/resource-schema.json",
4
4
  "title": "Resource Schema",
5
5
  "type": "object",
6
6
  "properties": {
@@ -99,3 +99,9 @@ export interface InitializeResponseData {
99
99
  dependencies: string[];
100
100
  }>;
101
101
  }
102
+
103
+ export interface SudoRequestData {
104
+ command: string;
105
+ }
106
+
107
+ export interface SudoRequestResponseData {}