adapt-authoring-core 1.0.0 → 1.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.
@@ -0,0 +1,13 @@
1
+ name: Standard.js formatting check
2
+ on: push
3
+ jobs:
4
+ default:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@master
8
+ - uses: actions/setup-node@master
9
+ with:
10
+ node-version: 'lts/*'
11
+ cache: 'npm'
12
+ - run: npm ci
13
+ - run: npx standard
@@ -77,7 +77,7 @@ class AbstractModule {
77
77
  }
78
78
  this._isReady = true
79
79
  this.initTime = Math.round((Date.now() - this._startTime))
80
- this.log('debug', AbstractModule.MODULE_READY, this.initTime)
80
+ this.log('verbose', AbstractModule.MODULE_READY, this.initTime)
81
81
  }
82
82
 
83
83
  /**
package/lib/App.js CHANGED
@@ -60,10 +60,10 @@ class App extends AbstractModule {
60
60
  let startError
61
61
  try {
62
62
  await this.start()
63
- this.log('debug', 'GIT', 'INFO', this.git)
64
- this.log('debug', 'DIR', 'rootDir', this.rootDir)
65
- this.log('debug', 'DIR', 'dataDir', this.getConfig('dataDir'))
66
- this.log('debug', 'DIR', 'tempDir', this.getConfig('tempDir'))
63
+ this.log('verbose', 'GIT', 'INFO', this.git)
64
+ this.log('verbose', 'DIR', 'rootDir', this.rootDir)
65
+ this.log('verbose', 'DIR', 'dataDir', this.getConfig('dataDir'))
66
+ this.log('verbose', 'DIR', 'tempDir', this.getConfig('tempDir'))
67
67
  } catch (e) {
68
68
  startError = e
69
69
  }
@@ -154,7 +154,10 @@ class DependencyLoader {
154
154
  throw new Error('Module must define onReady function')
155
155
  }
156
156
  try {
157
- await instance.onReady()
157
+ await Promise.race([
158
+ instance.onReady(),
159
+ new Promise((resolve, reject) => setTimeout(() => reject(new Error(`${modName} load exceeded timeout (60000)`)), 60000))
160
+ ])
158
161
  this.instances[modName] = instance
159
162
  await this.moduleLoadedHook.invoke(null, instance)
160
163
  return instance
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A bundle of reusable 'core' functionality",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-core",
6
6
  "license": "GPL-3.0",
@@ -8,13 +8,12 @@
8
8
  "main": "index.js",
9
9
  "repository": "github:adapt-security/adapt-authoring-core",
10
10
  "dependencies": {
11
- "fs-extra": "11.3.0",
11
+ "fs-extra": "11.3.1",
12
12
  "glob": "^11.0.0",
13
13
  "lodash": "^4.17.21",
14
14
  "minimist": "^1.2.8"
15
15
  },
16
16
  "devDependencies": {
17
- "eslint": "^9.12.0",
18
17
  "standard": "^17.1.0",
19
18
  "@semantic-release/commit-analyzer": "^9.0.2",
20
19
  "@semantic-release/git": "^10.0.1",
package/.eslintignore DELETED
@@ -1 +0,0 @@
1
- node_modules
package/.eslintrc DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "env": {
3
- "browser": false,
4
- "node": true,
5
- "commonjs": false,
6
- "es2020": true
7
- },
8
- "extends": [
9
- "standard"
10
- ],
11
- "parserOptions": {
12
- "ecmaVersion": 2020
13
- }
14
- }