@instructure/quiz-core 20.29.2-snapshot.0 → 20.29.2-snapshot.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.
@@ -1,3 +1,4 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
4
  import { AwsClient } from 'aws4fetch';
@@ -98,9 +99,16 @@ var StreamQueue = /*#__PURE__*/function () {
98
99
  key: "_sendRecordsViaProxy",
99
100
  value: function _sendRecordsViaProxy(params) {
100
101
  if (!this.proxyDomain) return;
102
+ var encodedParams = _objectSpread(_objectSpread({}, params), {}, {
103
+ Records: params.Records.map(function (record) {
104
+ return _objectSpread(_objectSpread({}, record), {}, {
105
+ Data: btoa(record.Data)
106
+ });
107
+ })
108
+ });
101
109
  this.awsClient.fetch(this.proxyDomain, {
102
110
  method: 'PUT',
103
- body: JSON.stringify(params)
111
+ body: JSON.stringify(encodedParams)
104
112
  });
105
113
  }
106
114
  }, {
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
8
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
11
  var _aws4fetch = require("aws4fetch");
@@ -105,9 +106,16 @@ var StreamQueue = /*#__PURE__*/function () {
105
106
  key: "_sendRecordsViaProxy",
106
107
  value: function _sendRecordsViaProxy(params) {
107
108
  if (!this.proxyDomain) return;
109
+ var encodedParams = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params), {}, {
110
+ Records: params.Records.map(function (record) {
111
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, record), {}, {
112
+ Data: btoa(record.Data)
113
+ });
114
+ })
115
+ });
108
116
  this.awsClient.fetch(this.proxyDomain, {
109
117
  method: 'PUT',
110
- body: JSON.stringify(params)
118
+ body: JSON.stringify(encodedParams)
111
119
  });
112
120
  }
113
121
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.29.2-snapshot.0+2ccf01d31",
3
+ "version": "20.29.2-snapshot.1+4109522cb",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -44,11 +44,11 @@
44
44
  "@instructure/emotion": "^8.51.0",
45
45
  "@instructure/grading-utils": "^1.0.0",
46
46
  "@instructure/outcomes-ui": "^3.2.2",
47
- "@instructure/quiz-common": "20.29.2-snapshot.0+2ccf01d31",
48
- "@instructure/quiz-i18n": "20.29.2-snapshot.0+2ccf01d31",
49
- "@instructure/quiz-interactions": "20.29.2-snapshot.0+2ccf01d31",
50
- "@instructure/quiz-number-input": "20.29.2-snapshot.0+2ccf01d31",
51
- "@instructure/quiz-rce": "20.29.2-snapshot.0+2ccf01d31",
47
+ "@instructure/quiz-common": "20.29.2-snapshot.1+4109522cb",
48
+ "@instructure/quiz-i18n": "20.29.2-snapshot.1+4109522cb",
49
+ "@instructure/quiz-interactions": "20.29.2-snapshot.1+4109522cb",
50
+ "@instructure/quiz-number-input": "20.29.2-snapshot.1+4109522cb",
51
+ "@instructure/quiz-rce": "20.29.2-snapshot.1+4109522cb",
52
52
  "@instructure/ui-a11y-content": "^8.51.0",
53
53
  "@instructure/ui-alerts": "^8.51.0",
54
54
  "@instructure/ui-avatar": "^8.51.0",
@@ -112,7 +112,7 @@
112
112
  "file-saver": "~2.0.5",
113
113
  "humps": "^2.0.0",
114
114
  "immutable": "^3.8.1",
115
- "instructure-validations": "20.29.2-snapshot.0+2ccf01d31",
115
+ "instructure-validations": "20.29.2-snapshot.1+4109522cb",
116
116
  "ipaddr.js": "^1.5.4",
117
117
  "isomorphic-fetch": "^2.2.0",
118
118
  "isuuid": "^0.1.0",
@@ -161,7 +161,7 @@
161
161
  "jquery": "^2.2.3",
162
162
  "karma-junit-reporter": "^2.0.1",
163
163
  "most-subject": "^5.3.0",
164
- "quiz-presets": "20.29.2-snapshot.0+2ccf01d31",
164
+ "quiz-presets": "20.29.2-snapshot.1+4109522cb",
165
165
  "react": "^16.8.6",
166
166
  "react-addons-test-utils": "^15.6.2",
167
167
  "react-dom": "^16.8.6",
@@ -177,5 +177,5 @@
177
177
  "publishConfig": {
178
178
  "access": "public"
179
179
  },
180
- "gitHead": "2ccf01d31a242c36cb358b5b954a47f4c7b06da9"
180
+ "gitHead": "4109522cbe52fdda5394e0ed45fceeba34def8ea"
181
181
  }