codify-plugin-lib 1.0.142 → 1.0.144

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.
@@ -71,7 +71,7 @@ export class MessageHandler {
71
71
  const result = await SupportedRequests[message.cmd].handler(this.plugin, message.data);
72
72
  const responseValidator = this.responseValidators.get(message.cmd);
73
73
  if (responseValidator && !responseValidator(result)) {
74
- throw new Error(`Plugin: ${this.plugin}. Malformed response data: ${JSON.stringify(responseValidator.errors, null, 2)}`);
74
+ throw new Error(`Plugin: ${this.plugin.name}. Malformed response data: ${JSON.stringify(responseValidator.errors, null, 2)}. Received ${JSON.stringify(result, null, 2)}`);
75
75
  }
76
76
  process.send({
77
77
  cmd: message.cmd + '_Response',
@@ -40,7 +40,7 @@ export class Plugin {
40
40
  const schema = resource.settings.schema;
41
41
  const requiredPropertyNames = (resource.settings.importAndDestroy?.requiredParameters
42
42
  ?? schema?.required
43
- ?? null);
43
+ ?? undefined);
44
44
  const allowMultiple = resource.settings.allowMultiple !== undefined
45
45
  ? (typeof resource.settings.allowMultiple === 'boolean'
46
46
  ? { identifyingParameters: schema?.required ?? [] }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codify-plugin-lib",
3
- "version": "1.0.142",
3
+ "version": "1.0.144",
4
4
  "description": "Library plugin library",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -106,7 +106,7 @@ export class MessageHandler {
106
106
 
107
107
  const responseValidator = this.responseValidators.get(message.cmd);
108
108
  if (responseValidator && !responseValidator(result)) {
109
- throw new Error(`Plugin: ${this.plugin}. Malformed response data: ${JSON.stringify(responseValidator.errors, null, 2)}`)
109
+ throw new Error(`Plugin: ${this.plugin.name}. Malformed response data: ${JSON.stringify(responseValidator.errors, null, 2)}. Received ${JSON.stringify(result, null, 2)}`);
110
110
  }
111
111
 
112
112
  process.send!({
@@ -69,8 +69,8 @@ export class Plugin {
69
69
  const requiredPropertyNames = (
70
70
  resource.settings.importAndDestroy?.requiredParameters
71
71
  ?? schema?.required
72
- ?? null
73
- ) as null | string[];
72
+ ?? undefined
73
+ ) as any;
74
74
 
75
75
  const allowMultiple = resource.settings.allowMultiple !== undefined
76
76
  ? (typeof resource.settings.allowMultiple === 'boolean'