adapt-authoring-contentplugin 1.0.2 → 1.0.3
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.
|
@@ -190,13 +190,16 @@ class ContentPluginModule extends AbstractApiModule {
|
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
192
|
* Loads and processes all installed content plugin schemas
|
|
193
|
-
* @param {Array} pluginInfo Plugin info data
|
|
193
|
+
* @param {Array|Object} pluginInfo Plugin info data
|
|
194
194
|
* @return {Promise}
|
|
195
195
|
*/
|
|
196
196
|
async processPluginSchemas (pluginInfo) {
|
|
197
197
|
if (!pluginInfo) {
|
|
198
198
|
pluginInfo = await this.framework.runCliCommand('getPluginUpdateInfos')
|
|
199
199
|
}
|
|
200
|
+
if (!Array.isArray(pluginInfo)) {
|
|
201
|
+
pluginInfo = [pluginInfo]
|
|
202
|
+
}
|
|
200
203
|
const jsonschema = await this.app.waitForModule('jsonschema')
|
|
201
204
|
return Promise.all(pluginInfo.map(async plugin => {
|
|
202
205
|
const name = plugin.name
|
|
@@ -319,7 +322,7 @@ class ContentPluginModule extends AbstractApiModule {
|
|
|
319
322
|
throw this.app.errors.CONTENTPLUGIN_ATTR_MISSING
|
|
320
323
|
.setData({ name })
|
|
321
324
|
}
|
|
322
|
-
await this.processPluginSchemas(
|
|
325
|
+
await this.processPluginSchemas(data)
|
|
323
326
|
return info
|
|
324
327
|
}
|
|
325
328
|
|
package/package.json
CHANGED