diff --git a/package.json b/package.json index 42ac68a9..02196cb2 100644 --- a/package.json +++ b/package.json @@ -65,9 +65,9 @@ "hooks": { "sf-doctor-@salesforce/plugin-trust": "./lib/hooks/diagnostics", "plugins:preinstall:verify:signature": [ - "./lib/hooks/verifyInstallSignature.js" + "./lib/hooks/verifyInstallSignature" ], - "jit_plugin_not_installed": "./lib/hooks/jitPluginInstall.js" + "jit_plugin_not_installed": "./lib/hooks/jitPluginInstall" }, "devPlugins": [ "@oclif/plugin-help", diff --git a/schemas/node-info.json b/schemas/node-info.json new file mode 100644 index 00000000..65c8d615 --- /dev/null +++ b/schemas/node-info.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/NodeInfoResult", + "definitions": { + "NodeInfoResult": { + "type": "object", + "properties": { + "nodePath": { + "type": "string" + }, + "npxPath": { + "type": "string" + } + }, + "required": ["nodePath", "npxPath"], + "additionalProperties": false + } + } +} diff --git a/schemas/plugins-trust-allowlist-add.json b/schemas/plugins-trust-allowlist-add.json new file mode 100644 index 00000000..1a62f167 --- /dev/null +++ b/schemas/plugins-trust-allowlist-add.json @@ -0,0 +1,26 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/AllowListResult", + "definitions": { + "AllowListResult": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Plugin": { + "type": "string" + }, + "Status": { + "type": "string", + "enum": ["added", "removed", "skipped"] + }, + "Reason": { + "type": "string" + } + }, + "required": ["Plugin"], + "additionalProperties": false + } + } + } +} diff --git a/schemas/plugins-trust-allowlist-list.json b/schemas/plugins-trust-allowlist-list.json new file mode 100644 index 00000000..1a62f167 --- /dev/null +++ b/schemas/plugins-trust-allowlist-list.json @@ -0,0 +1,26 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/AllowListResult", + "definitions": { + "AllowListResult": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Plugin": { + "type": "string" + }, + "Status": { + "type": "string", + "enum": ["added", "removed", "skipped"] + }, + "Reason": { + "type": "string" + } + }, + "required": ["Plugin"], + "additionalProperties": false + } + } + } +} diff --git a/schemas/plugins-trust-allowlist-remove.json b/schemas/plugins-trust-allowlist-remove.json new file mode 100644 index 00000000..1a62f167 --- /dev/null +++ b/schemas/plugins-trust-allowlist-remove.json @@ -0,0 +1,26 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/AllowListResult", + "definitions": { + "AllowListResult": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Plugin": { + "type": "string" + }, + "Status": { + "type": "string", + "enum": ["added", "removed", "skipped"] + }, + "Reason": { + "type": "string" + } + }, + "required": ["Plugin"], + "additionalProperties": false + } + } + } +} diff --git a/schemas/plugins-trust-verify.json b/schemas/plugins-trust-verify.json new file mode 100644 index 00000000..f871d2fa --- /dev/null +++ b/schemas/plugins-trust-verify.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$ref": "#/definitions/VerifyResponse", + "definitions": { + "VerifyResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "verified": { + "type": "boolean" + } + }, + "required": ["message", "verified"], + "additionalProperties": false + } + } +}