adapt-authoring-jsonschema 1.4.3 → 1.4.4

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.
@@ -1,6 +1,6 @@
1
1
  export default class SchemasReference {
2
- constructor (app, config, dir, utils) {
3
- this.app = app
2
+ constructor (appData, config, dir, utils) {
3
+ this.appData = appData
4
4
  this.utils = utils
5
5
  }
6
6
 
@@ -12,10 +12,10 @@ export default class SchemasReference {
12
12
  }
13
13
 
14
14
  async loadSchemas () {
15
- const schema = await this.app.waitForModule('jsonschema')
16
- return Object.keys(schema.schemas)
15
+ const { schemas, raw } = this.appData.schemas
16
+ return Object.keys(schemas)
17
17
  .sort((a, b) => a.localeCompare(b))
18
- .reduce((schemas, s) => Object.assign(schemas, { [s]: schema.schemas[s].raw }), {})
18
+ .reduce((m, s) => Object.assign(m, { [s]: raw[s] }), {})
19
19
  }
20
20
 
21
21
  generateList () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-jsonschema",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Module to add support for the JSON schema specification",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-jsonschema",
6
6
  "license": "GPL-3.0",