adapt-authoring-adaptframework 1.9.4 → 1.9.6
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.
|
@@ -452,7 +452,6 @@ class AdaptFrameworkBuild {
|
|
|
452
452
|
const zipPath = path.join(this.dir, this.isPublish ? 'build' : '')
|
|
453
453
|
const outputPath = `${this.dir}.zip`
|
|
454
454
|
await zipper.zip(zipPath, outputPath, { removeSource: true })
|
|
455
|
-
await fs.rm(this.dir, { recursive: true })
|
|
456
455
|
return outputPath
|
|
457
456
|
}
|
|
458
457
|
|
|
@@ -426,6 +426,7 @@ class AdaptFrameworkImport {
|
|
|
426
426
|
FWUtils.log('debug', 'found plugin', name)
|
|
427
427
|
this.usedContentPlugins[path.basename(p)] = { name, path: p, version, targetAttribute, type: getPluginType(bowerJson) }
|
|
428
428
|
}))
|
|
429
|
+
this.contentJson.config._enabledPlugins = Object.keys(this.usedContentPlugins)
|
|
429
430
|
}
|
|
430
431
|
|
|
431
432
|
/**
|
|
@@ -454,7 +455,6 @@ class AdaptFrameworkImport {
|
|
|
454
455
|
this.contentJson.config = {
|
|
455
456
|
_id: 'config',
|
|
456
457
|
_type: 'config',
|
|
457
|
-
_enabledPlugins: Object.keys(this.usedContentPlugins),
|
|
458
458
|
...contents
|
|
459
459
|
}
|
|
460
460
|
return
|
|
@@ -246,7 +246,7 @@ class AdaptFrameworkUtils {
|
|
|
246
246
|
}
|
|
247
247
|
if (action === 'publish' || action === 'export') {
|
|
248
248
|
res.set('content-disposition', `attachment; filename="${await AdaptFrameworkUtils.slugifyTitle(buildData)}.zip"`)
|
|
249
|
-
return res.sendFile(path.resolve(buildData.location), next)
|
|
249
|
+
return res.sendFile(path.resolve(buildData.location), e => e && next(e))
|
|
250
250
|
}
|
|
251
251
|
if (action === 'preview') {
|
|
252
252
|
if (!req.auth.user) {
|
|
@@ -254,7 +254,8 @@ class AdaptFrameworkUtils {
|
|
|
254
254
|
}
|
|
255
255
|
const filePath = path.resolve(buildData.location, req.path.slice(req.path.indexOf(id) + id.length + 1) || 'index.html')
|
|
256
256
|
await res.sendFile(filePath, e => {
|
|
257
|
-
if (e
|
|
257
|
+
if (!e) return
|
|
258
|
+
if (e.code === 'ENOENT') e = App.instance.errors.NOT_FOUND.setData({ type: 'file', id: filePath })
|
|
258
259
|
next(e)
|
|
259
260
|
})
|
|
260
261
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapt-authoring-adaptframework",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.6",
|
|
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",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"adapt-authoring-browserslist": "^1.2.1",
|
|
12
12
|
"adapt-authoring-content": "^1.2.3",
|
|
13
13
|
"adapt-authoring-contentplugin": "^1.0.3",
|
|
14
|
+
"adapt-authoring-core": "^1.7.0",
|
|
14
15
|
"adapt-authoring-courseassets": "^1.0.3",
|
|
15
16
|
"adapt-authoring-coursetheme": "^1.0.2",
|
|
16
17
|
"adapt-authoring-spoortracking": "^1.0.2",
|
|
@@ -78,7 +79,14 @@
|
|
|
78
79
|
],
|
|
79
80
|
"@semantic-release/npm",
|
|
80
81
|
"@semantic-release/github",
|
|
81
|
-
|
|
82
|
+
[
|
|
83
|
+
"@semantic-release/git",
|
|
84
|
+
{
|
|
85
|
+
"assets": [
|
|
86
|
+
"package.json"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
]
|
|
82
90
|
]
|
|
83
91
|
}
|
|
84
92
|
}
|