adapt-authoring-adaptframework 2.5.6 → 2.6.0
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.
|
@@ -524,7 +524,7 @@ class AdaptFrameworkBuild {
|
|
|
524
524
|
async recordBuildAttempt () {
|
|
525
525
|
const [framework, jsonschema, mongodb] = await App.instance.waitForModule('adaptframework', 'jsonschema', 'mongodb')
|
|
526
526
|
const schema = await jsonschema.getSchema('adaptbuild')
|
|
527
|
-
const validatedData =
|
|
527
|
+
const validatedData = schema.validate({
|
|
528
528
|
action: this.action,
|
|
529
529
|
courseId: this.courseId,
|
|
530
530
|
location: this.location,
|
|
@@ -808,7 +808,7 @@ class AdaptFrameworkImport {
|
|
|
808
808
|
} catch (e) {
|
|
809
809
|
log('error', `failed to extract asset data for attribute '${e.attribute}' of schema '${schemaName}', ${e}`)
|
|
810
810
|
}
|
|
811
|
-
insertData =
|
|
811
|
+
insertData = schema.sanitise(insertData)
|
|
812
812
|
let doc
|
|
813
813
|
const opts = { schemaName, validate: true, useCache: false }
|
|
814
814
|
if (options.isUpdate) {
|
|
@@ -245,7 +245,7 @@ class AdaptFrameworkModule extends AbstractModule {
|
|
|
245
245
|
async loadSchemas () {
|
|
246
246
|
const jsonschema = await this.app.waitForModule('jsonschema')
|
|
247
247
|
const schemas = (await this.runCliCommand('getSchemaPaths')).filter(s => s.includes('/core/'))
|
|
248
|
-
|
|
248
|
+
schemas.forEach(s => jsonschema.registerSchema(s))
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapt-authoring-adaptframework",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Adapt framework integration for the Adapt authoring tool",
|
|
5
5
|
"homepage": "https://github.com/adapt-security/adapt-authoring-adaptframework",
|
|
6
6
|
"license": "GPL-3.0",
|