scorm-again 1.6.1 → 1.7.0

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.
@@ -19,11 +19,6 @@ jobs:
19
19
  steps:
20
20
  - checkout
21
21
 
22
- # Update npm
23
- - run:
24
- name: update-npm
25
- command: 'sudo npm install -g npm@latest'
26
-
27
22
  # Download and cache dependencies
28
23
  - restore_cache:
29
24
  keys:
@@ -31,7 +26,7 @@ jobs:
31
26
  # fallback to using the latest cache if no exact match is found
32
27
  - v1-dependencies-
33
28
 
34
- - run: npm install
29
+ - run: yarn install
35
30
 
36
31
  - save_cache:
37
32
  paths:
@@ -42,7 +37,7 @@ jobs:
42
37
 
43
38
  # Run mocha
44
39
  - run:
45
- name: npm test
40
+ name: yarn test
46
41
  command: ./node_modules/.bin/nyc ./node_modules/.bin/mocha --require @babel/register --recursive --timeout=10000 --exit --reporter mocha-junit-reporter --reporter-options mochaFile=test-results/mocha/results.xml
47
42
  when: always
48
43
 
@@ -78,7 +73,7 @@ jobs:
78
73
 
79
74
  # run babel compile
80
75
  - run: git config user.email "jputney@noverant.com" && git config user.name "Jonathan Putney"
81
- - run: ./node_modules/.bin/grunt
76
+ - run: ./node_modules/.bin/webpack --bail --config webpack.js
82
77
  - run: git add --all dist/
83
78
 
84
79
  # run jsdoc
@@ -101,4 +96,4 @@ jobs:
101
96
 
102
97
  - store_artifacts: # upload test coverage as artifact
103
98
  path: ./coverage/lcov.info
104
- prefix: tests
99
+ prefix: tests
package/README.md CHANGED
@@ -59,7 +59,11 @@ The APIs include several settings to customize the functionality of each API:
59
59
  | `mastery_override` | false | true/false | (SCORM 1.2) Used to override a module's `cmi.core.lesson_status` so that a pass/fail is determined based on a mastery score and the user's raw score, rather than using whatever status is provided by the module. An example of this would be if a module is published using a `Complete/Incomplete` final status, but the LMS always wants to receive a `Passed/Failed` for quizzes, then we can use this setting to override the given final status. |
60
60
  | `selfReportSessionTime` | false | true/false | Should the API override the default `session_time` reported by the module? Useful when modules don't properly report time. |
61
61
  | `alwaysSendTotalTime` | false | true/false | Should the API always send `total_time` when committing to the LMS |
62
+ | `xhrWithCredentials` | false | true/false | Sets the withCredentials flag on the request to the LMS |
63
+ | `xhrHeaders` | {} | Object | This allows setting of additional headers on the request to the LMS where the key should be the header name and the value is the value of the header you want to send |
62
64
  | `responseHandler` | function | | A function to properly tranform the response from the LMS to the correct format. The APIs expect the result from the LMS to be in the following format (errorCode is optional): `{ "result": true, "errorCode": 0 }` |
65
+ | `requestHandler` | function | | A function to transform the commit object before sending it to `lmsCommitUrl`. By default it's the identity function (no transformation). |
66
+ | `onLogMessage` | function | | A function to be called whenever a message is logged. Defaults to console.{error,warn,info,debug,log} |
63
67
 
64
68
  ## Initial Values
65
69
 
@@ -266,8 +270,8 @@ I welcome any and all feedback and contributions to this project! I'm sure it wo
266
270
  #### Setup and Development
267
271
  You will need `node` installed on your local machine, and you'll have to run `npm install` in the repo directory before starting development.
268
272
 
269
- To run a build, you need to just run the `grunt` command in the root of the project.
273
+ To run a build, you need to just run the `yarn run compile` command in the root of the project.
270
274
 
271
- Similarly, to run the tests, you just run the `grunt test` or `npm test` command.
275
+ Similarly, to run the tests, you just run the `yarn test` command.
272
276
 
273
277
  Before submitting pull requests, please also run `eslint ./src --fix` against your code first, otherwise your pull request build could fail.