adapt-authoring-adaptframework 3.0.0 → 3.0.1
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.
|
@@ -304,9 +304,13 @@ class AdaptFrameworkImport {
|
|
|
304
304
|
}
|
|
305
305
|
// find and store the course data path
|
|
306
306
|
const courseDirs = await glob(`${this.path}/*/course`)
|
|
307
|
+
if (courseDirs.length === 0) {
|
|
308
|
+
this.framework.log('error', 'NO_COURSE_DIR', this.path)
|
|
309
|
+
throw App.instance.errors.FW_IMPORT_INVALID_COURSE.setData({ reason: 'no source course directory found in archive; expected a course folder nested one level deep' })
|
|
310
|
+
}
|
|
307
311
|
if (courseDirs.length > 1) {
|
|
308
312
|
this.framework.log('error', 'MULTIPLE_COURSE_DIRS', courseDirs)
|
|
309
|
-
throw App.instance.errors.FW_IMPORT_INVALID_COURSE
|
|
313
|
+
throw App.instance.errors.FW_IMPORT_INVALID_COURSE.setData({ reason: 'multiple course directories found in archive; expected exactly one' })
|
|
310
314
|
}
|
|
311
315
|
this.coursePath = courseDirs[0]
|
|
312
316
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapt-authoring-adaptframework",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
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",
|