dce-reactkit 3.6.24 → 3.6.25

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.
package/dist/cjs/index.js CHANGED
@@ -42196,7 +42196,7 @@ const parseUserAgent = (userAgent) => {
42196
42196
  const genRouteHandler = (opts) => {
42197
42197
  // Return a route handler
42198
42198
  return (req, res, next) => __awaiter(void 0, void 0, void 0, function* () {
42199
- var _a, _b;
42199
+ var _a, _b, _c;
42200
42200
  // Output params
42201
42201
  const output = {};
42202
42202
  /*----------------------------------------*/
@@ -42407,6 +42407,9 @@ const genRouteHandler = (opts) => {
42407
42407
  output.userEmail = (launchInfo
42408
42408
  ? launchInfo.userEmail
42409
42409
  : undefined);
42410
+ output.userAvatarURL = (launchInfo
42411
+ ? ((_b = launchInfo.userImage) !== null && _b !== void 0 ? _b : 'http://www.gravatar.com/avatar/?d=identicon')
42412
+ : undefined);
42410
42413
  output.isLearner = (launchInfo
42411
42414
  ? !!launchInfo.isLearner
42412
42415
  : undefined);
@@ -42417,7 +42420,7 @@ const genRouteHandler = (opts) => {
42417
42420
  ? !!launchInfo.isAdmin
42418
42421
  : undefined);
42419
42422
  output.courseId = (launchInfo
42420
- ? ((_b = output.courseId) !== null && _b !== void 0 ? _b : launchInfo.courseId)
42423
+ ? ((_c = output.courseId) !== null && _c !== void 0 ? _c : launchInfo.courseId)
42421
42424
  : undefined);
42422
42425
  output.courseName = (launchInfo
42423
42426
  ? launchInfo.contextLabel
@@ -42495,7 +42498,7 @@ const genRouteHandler = (opts) => {
42495
42498
  * @author Gabe Abrams
42496
42499
  */
42497
42500
  const logServerEvent = (logOpts) => __awaiter(void 0, void 0, void 0, function* () {
42498
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
42501
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
42499
42502
  // NOTE: internally, we slip through an opts.overrideAsClientEvent boolean
42500
42503
  // that indicates that this is actually a client event, but we don't
42501
42504
  // include that in the LogFunction type because this is internal and
@@ -42527,24 +42530,24 @@ const genRouteHandler = (opts) => {
42527
42530
  timestamp,
42528
42531
  context: (typeof logOpts.context === 'string'
42529
42532
  ? logOpts.context
42530
- : ((_d = ((_c = logOpts.context) !== null && _c !== void 0 ? _c : {})._) !== null && _d !== void 0 ? _d : LogBuiltInMetadata.Context.Uncategorized)),
42531
- subcontext: ((_e = logOpts.subcontext) !== null && _e !== void 0 ? _e : LogBuiltInMetadata.Context.Uncategorized),
42532
- tags: ((_f = logOpts.tags) !== null && _f !== void 0 ? _f : []),
42533
- level: ((_g = logOpts.level) !== null && _g !== void 0 ? _g : LogLevel$1.Info),
42534
- metadata: ((_h = logOpts.metadata) !== null && _h !== void 0 ? _h : {}),
42533
+ : ((_e = ((_d = logOpts.context) !== null && _d !== void 0 ? _d : {})._) !== null && _e !== void 0 ? _e : LogBuiltInMetadata.Context.Uncategorized)),
42534
+ subcontext: ((_f = logOpts.subcontext) !== null && _f !== void 0 ? _f : LogBuiltInMetadata.Context.Uncategorized),
42535
+ tags: ((_g = logOpts.tags) !== null && _g !== void 0 ? _g : []),
42536
+ level: ((_h = logOpts.level) !== null && _h !== void 0 ? _h : LogLevel$1.Info),
42537
+ metadata: ((_j = logOpts.metadata) !== null && _j !== void 0 ? _j : {}),
42535
42538
  };
42536
42539
  // Type-specific info
42537
42540
  const typeSpecificInfo = (('error' in opts && opts.error)
42538
42541
  ? {
42539
42542
  type: LogType$1.Error,
42540
- errorMessage: (_j = logOpts.error.message) !== null && _j !== void 0 ? _j : 'Unknown message',
42541
- errorCode: (_k = logOpts.error.code) !== null && _k !== void 0 ? _k : ReactKitErrorCode$1.NoCode,
42542
- errorStack: (_l = logOpts.error.stack) !== null && _l !== void 0 ? _l : 'No stack',
42543
+ errorMessage: (_k = logOpts.error.message) !== null && _k !== void 0 ? _k : 'Unknown message',
42544
+ errorCode: (_l = logOpts.error.code) !== null && _l !== void 0 ? _l : ReactKitErrorCode$1.NoCode,
42545
+ errorStack: (_m = logOpts.error.stack) !== null && _m !== void 0 ? _m : 'No stack',
42543
42546
  }
42544
42547
  : {
42545
42548
  type: LogType$1.Action,
42546
- target: ((_m = logOpts.target) !== null && _m !== void 0 ? _m : LogBuiltInMetadata.Target.NoTarget),
42547
- action: ((_o = logOpts.action) !== null && _o !== void 0 ? _o : LogAction$1.Unknown),
42549
+ target: ((_o = logOpts.target) !== null && _o !== void 0 ? _o : LogBuiltInMetadata.Target.NoTarget),
42550
+ action: ((_p = logOpts.action) !== null && _p !== void 0 ? _p : LogAction$1.Unknown),
42548
42551
  });
42549
42552
  // Source-specific info
42550
42553
  const sourceSpecificInfo = (logOpts.overrideAsClientEvent