adapt-authoring-adaptframework 2.0.1 → 2.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.
@@ -25,7 +25,7 @@ jobs:
25
25
  - name: Update npm
26
26
  run: npm install -g npm@latest
27
27
  - name: Install dependencies
28
- run: npm install --legacy-peer-deps
28
+ run: npm install
29
29
  - name: Release
30
30
  env:
31
31
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -8,5 +8,5 @@ jobs:
8
8
  - uses: actions/setup-node@master
9
9
  with:
10
10
  node-version: 'lts/*'
11
- - run: npm install --legacy-peer-deps
11
+ - run: npm install
12
12
  - run: npx standard
@@ -10,5 +10,5 @@ jobs:
10
10
  - uses: actions/setup-node@v4
11
11
  with:
12
12
  node-version: 'lts/*'
13
- - run: npm install --legacy-peer-deps
13
+ - run: npm install
14
14
  - run: npm test
@@ -1,5 +1,6 @@
1
1
  import _ from 'lodash'
2
2
  import { App, Hook, ensureDir, writeJson } from 'adapt-authoring-core'
3
+ import { parse as parseObjectId } from 'adapt-authoring-mongodb'
3
4
  import { createWriteStream } from 'fs'
4
5
  import AdaptCli from 'adapt-cli'
5
6
  import { log, logDir, logMemory, copyFrameworkSource } from './utils.js'
@@ -254,10 +255,10 @@ class AdaptFrameworkBuild {
254
255
  * @return {Promise}
255
256
  */
256
257
  async loadAssetData () {
257
- const [assets, courseassets, mongodb, tags] = await App.instance.waitForModule('assets', 'courseassets', 'mongodb', 'tags')
258
+ const [assets, courseassets, tags] = await App.instance.waitForModule('assets', 'courseassets', 'tags')
258
259
 
259
260
  const caRecs = await courseassets.find({ courseId: this.courseId })
260
- const uniqueAssetIds = new Set(caRecs.map(c => mongodb.ObjectId.parse(c.assetId)))
261
+ const uniqueAssetIds = new Set(caRecs.map(c => parseObjectId(c.assetId)))
261
262
  const usedAssets = await assets.find({ _id: { $in: [...uniqueAssetIds] } })
262
263
 
263
264
  const usedTagIds = new Set(usedAssets.reduce((m, a) => [...m, ...(a.tags ?? [])], []))
@@ -1,4 +1,5 @@
1
1
  import { App, Hook, spawn, readJson, writeJson } from 'adapt-authoring-core'
2
+ import { parse as parseObjectId } from 'adapt-authoring-mongodb'
2
3
  import fs from 'fs/promises'
3
4
  import { glob } from 'glob'
4
5
  import octopus from 'adapt-octopus'
@@ -877,8 +878,7 @@ class AdaptFrameworkImport {
877
878
  }
878
879
  let _courseId
879
880
  try {
880
- const { ObjectId } = await App.instance.waitForModule('mongodb')
881
- _courseId = ObjectId.parse(this.idMap[this.contentJson.course._id])
881
+ _courseId = parseObjectId(this.idMap[this.contentJson.course._id])
882
882
  } catch (e) {}
883
883
  if (_courseId) {
884
884
  tasks.push(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-adaptframework",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
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,7 +11,7 @@
11
11
  "test": "node --test 'tests/**/*.spec.js'"
12
12
  },
13
13
  "dependencies": {
14
- "adapt-authoring-browserslist": "^1.2.1",
14
+ "adapt-authoring-browserslist": "^1.3.4",
15
15
  "adapt-authoring-content": "^2.0.0",
16
16
  "adapt-authoring-contentplugin": "^1.0.3",
17
17
  "adapt-authoring-core": "^2.0.0",
@@ -29,37 +29,14 @@
29
29
  "zipper": "github:adapt-security/zipper#v1.1.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "adapt-authoring-assets": "^1.3.1",
33
- "adapt-authoring-auth": "^1.0.3",
32
+ "adapt-authoring-assets": "^1.4.3",
33
+ "adapt-authoring-auth": "^2.0.0",
34
34
  "adapt-authoring-jsonschema": "^1.1.5",
35
35
  "adapt-authoring-middleware": "^1.0.1",
36
36
  "adapt-authoring-mongodb": "^2.0.0",
37
37
  "adapt-authoring-server": "^2.0.0",
38
38
  "adapt-authoring-tags": "^1.0.1"
39
39
  },
40
- "peerDependenciesMeta": {
41
- "adapt-authoring-assets": {
42
- "optional": true
43
- },
44
- "adapt-authoring-auth": {
45
- "optional": true
46
- },
47
- "adapt-authoring-jsonschema": {
48
- "optional": true
49
- },
50
- "adapt-authoring-middleware": {
51
- "optional": true
52
- },
53
- "adapt-authoring-mongodb": {
54
- "optional": true
55
- },
56
- "adapt-authoring-server": {
57
- "optional": true
58
- },
59
- "adapt-authoring-tags": {
60
- "optional": true
61
- }
62
- },
63
40
  "devDependencies": {
64
41
  "@semantic-release/git": "^10.0.1",
65
42
  "conventional-changelog-eslint": "^6.0.0",