codify-schemas 1.0.33 → 1.0.34

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 (32) hide show
  1. package/dist/config-file-schema.json +1 -1
  2. package/dist/ipc-message-schema.json +1 -1
  3. package/dist/messages/apply-request-data-schema.json +1 -1
  4. package/dist/messages/apply-response-data-schema.json +1 -1
  5. package/dist/messages/error-response-data-schema.json +1 -1
  6. package/dist/messages/initialize-request-data-schema.json +1 -1
  7. package/dist/messages/initialize-response-data-schema.json +1 -1
  8. package/dist/messages/plan-request-data-schema.json +1 -1
  9. package/dist/messages/plan-response-data-schema.json +1 -1
  10. package/dist/messages/validate-request-data-schema.json +1 -1
  11. package/dist/messages/validate-response-data-schema.json +1 -1
  12. package/dist/project-schema.json +1 -1
  13. package/dist/resource-schema.json +1 -1
  14. package/package.json +1 -1
  15. package/src/config-file-schema.json +1 -1
  16. package/src/ipc-message-schema.json +1 -1
  17. package/src/messages/apply-request-data-schema.json +1 -1
  18. package/src/messages/apply-response-data-schema.json +1 -1
  19. package/src/messages/error-response-data-schema.json +1 -1
  20. package/src/messages/get-resources-response-data-schema.json +1 -1
  21. package/src/messages/initialize-request-data-schema.json +1 -1
  22. package/src/messages/initialize-response-data-schema.json +1 -1
  23. package/src/messages/plan-request-data-schema.json +1 -1
  24. package/src/messages/plan-response-data-schema.json +1 -1
  25. package/src/messages/sudo-request-data-schema.json +15 -0
  26. package/src/messages/sudo-request-data-schema.test.ts +21 -0
  27. package/src/messages/sudo-response-data-schema.json +9 -0
  28. package/src/messages/sudo-response-data-schema.test.ts +21 -0
  29. package/src/messages/validate-request-data-schema.json +1 -1
  30. package/src/messages/validate-response-data-schema.json +1 -1
  31. package/src/project-schema.json +1 -1
  32. package/src/resource-schema.json +1 -1
@@ -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": {
@@ -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
  }
@@ -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": {
@@ -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": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-schemas",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
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": {
@@ -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
  }
@@ -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": {