codify-plugin-lib 1.0.149 → 1.0.150
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.
package/dist/plugin/plugin.js
CHANGED
|
@@ -121,12 +121,10 @@ export class Plugin {
|
|
|
121
121
|
return !controller.parsedSettings.allowMultiple && v > 1;
|
|
122
122
|
});
|
|
123
123
|
if (invalidMultipleConfigs.length > 0) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
isValid: false,
|
|
129
|
-
})));
|
|
124
|
+
throw new Error(`Multiples of the following configs were found but only 1 is allowed.
|
|
125
|
+
|
|
126
|
+
[${invalidMultipleConfigs.map(([k]) => k).join(', ')}]
|
|
127
|
+
`);
|
|
130
128
|
}
|
|
131
129
|
await this.crossValidateResources(data.configs);
|
|
132
130
|
return {
|
package/package.json
CHANGED
|
@@ -482,13 +482,12 @@ describe('Plugin tests', () => {
|
|
|
482
482
|
|
|
483
483
|
const testPlugin = Plugin.create('testPlugin', [resource as any]);
|
|
484
484
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
expect(validate1.resourceValidations.every((r) => r.isValid)).to.be.false;
|
|
485
|
+
await expect(() => testPlugin.validate({
|
|
486
|
+
configs: [{ core: { type: 'ssh-config' }, parameters: { propA: 'a' } }, {
|
|
487
|
+
core: { type: 'ssh-config' },
|
|
488
|
+
parameters: { propB: 'b' }
|
|
489
|
+
}]
|
|
490
|
+
})
|
|
491
|
+
).rejects.toThrowError();
|
|
493
492
|
})
|
|
494
493
|
});
|
package/src/plugin/plugin.ts
CHANGED
|
@@ -178,12 +178,11 @@ export class Plugin {
|
|
|
178
178
|
});
|
|
179
179
|
|
|
180
180
|
if (invalidMultipleConfigs.length > 0) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
})));
|
|
181
|
+
throw new Error(
|
|
182
|
+
`Multiples of the following configs were found but only 1 is allowed.
|
|
183
|
+
|
|
184
|
+
[${invalidMultipleConfigs.map(([k]) => k).join(', ')}]
|
|
185
|
+
`)
|
|
187
186
|
}
|
|
188
187
|
|
|
189
188
|
await this.crossValidateResources(data.configs);
|