@applicaster/zapp-react-native-utils 15.0.0-rc.44 → 15.0.0-rc.46

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.
@@ -27,7 +27,7 @@ function makeMultiSelect(feed: ZappFeed, key, decoratedFeed) {
27
27
  );
28
28
 
29
29
  const behavior = {
30
- ...feed.extensions?.["behavior"],
30
+ ...feed.extensions?.behavior,
31
31
  select_mode: "multi",
32
32
  current_selection: `@{${scope}/${key}}`,
33
33
  };
@@ -75,7 +75,7 @@ function makeSingleSelect(feed: ZappFeed, key, decoratedFeed) {
75
75
  );
76
76
 
77
77
  const behavior = {
78
- ...feed.extensions?.["behavior"],
78
+ ...feed.extensions?.behavior,
79
79
  select_mode: "single",
80
80
  current_selection: `@{${scope}/${key}}`,
81
81
  };
@@ -141,11 +141,11 @@ function makeSingleSelect(feed: ZappFeed, key, decoratedFeed) {
141
141
  }
142
142
 
143
143
  export const decorateFeed = (feed: ZappFeed) => {
144
- if (!(feed.extensions?.["role"] === "preference_editor")) {
144
+ if (!(feed.extensions?.role === "preference_editor")) {
145
145
  return feed;
146
146
  }
147
147
 
148
- const key = feed.extensions?.["preference_editor_options"]?.["key"];
148
+ const key = feed.extensions?.preference_editor_options?.key;
149
149
 
150
150
  if (!key) {
151
151
  log_error(
@@ -160,8 +160,8 @@ export const decorateFeed = (feed: ZappFeed) => {
160
160
  const decoratedFeed = R.clone(feed);
161
161
 
162
162
  const isSingleSelect =
163
- (feed.extensions?.["preference_editor_options"]?.select_mode ||
164
- feed.extensions?.["behavior"]?.select_mode) === "single";
163
+ (feed.extensions?.preference_editor_options?.select_mode ||
164
+ feed.extensions?.behavior?.select_mode) === "single";
165
165
 
166
166
  if (isSingleSelect) {
167
167
  return makeSingleSelect(feed, key, decoratedFeed);
package/adsUtils/index.ts CHANGED
@@ -33,10 +33,10 @@ function convertOffset(offset: any): string {
33
33
  }
34
34
 
35
35
  function createAdBreak(ad: AdMap): string {
36
- const offset = ad["offset"];
36
+ const offset = ad.offset;
37
37
  const id = offset.toString();
38
38
  const timestamp = convertOffset(offset);
39
- const url = ad["ad_url"].toString().trim();
39
+ const url = ad.ad_url.toString().trim();
40
40
 
41
41
  return `
42
42
  <vmap:AdBreak timeOffset="${timestamp}" breakType="linear" breakId="break-${id}">
@@ -230,7 +230,7 @@ export function HooksManager({
230
230
  function completeHook(hookPlugin, payload, callback) {
231
231
  logHookEvent(
232
232
  hooksManagerLogger.info,
233
- `completeHook: hook sequence completed successfully: ${hookPlugin["identifier"]}`,
233
+ `completeHook: hook sequence completed successfully: ${hookPlugin.identifier}`,
234
234
  {
235
235
  payload,
236
236
  hook: hookPlugin,
@@ -276,7 +276,7 @@ export function HooksManager({
276
276
  if (hookPlugin.isCancelled()) {
277
277
  logHookEvent(
278
278
  hooksManagerLogger.info,
279
- `hookCallback: hook was cancelled: ${hookPlugin["identifier"]}`,
279
+ `hookCallback: hook was cancelled: ${hookPlugin.identifier}`,
280
280
  {}
281
281
  );
282
282
 
@@ -305,7 +305,7 @@ export function HooksManager({
305
305
  if (!success) {
306
306
  logHookEvent(
307
307
  hooksManagerLogger.info,
308
- `hookCallback: hook was cancelled: ${hookPlugin["identifier"]}`,
308
+ `hookCallback: hook was cancelled: ${hookPlugin.identifier}`,
309
309
  {
310
310
  payload,
311
311
  hook: hookPlugin,
@@ -334,7 +334,7 @@ export function HooksManager({
334
334
  if (isHookInHomescreen && isHookFlowBlocker && cancelled) {
335
335
  logHookEvent(
336
336
  hooksManagerLogger.info,
337
- `hookCallback: send app to background, cancelled flow blocker hook ${hookPlugin["identifier"]} on home screen`,
337
+ `hookCallback: send app to background, cancelled flow blocker hook ${hookPlugin.identifier} on home screen`,
338
338
  {
339
339
  payload,
340
340
  hook: hookPlugin,
@@ -349,7 +349,7 @@ export function HooksManager({
349
349
  } else {
350
350
  logHookEvent(
351
351
  hooksManagerLogger.info,
352
- `hookCallback: hook successfully finished: ${hookPlugin["identifier"]}`,
352
+ `hookCallback: hook successfully finished: ${hookPlugin.identifier}`,
353
353
  {
354
354
  payload,
355
355
  hook: hookPlugin,
@@ -359,7 +359,7 @@ export function HooksManager({
359
359
  if (!callback) {
360
360
  logHookEvent(
361
361
  hooksManagerLogger.warn,
362
- `hookCallback: ${hookPlugin["identifier"]} is missing \`callback\`, using hookCallback(default one)`,
362
+ `hookCallback: ${hookPlugin.identifier} is missing \`callback\`, using hookCallback(default one)`,
363
363
  {
364
364
  hookPlugin,
365
365
  }
@@ -401,7 +401,7 @@ export function HooksManager({
401
401
 
402
402
  logHookEvent(
403
403
  hooksManagerLogger.info,
404
- `presentScreenHook: Presenting screen hook: ${hookPlugin["identifier"]}`,
404
+ `presentScreenHook: Presenting screen hook: ${hookPlugin.identifier}`,
405
405
  {
406
406
  hook: hookPlugin,
407
407
  payload,
@@ -421,7 +421,7 @@ export function HooksManager({
421
421
  hooksManager.executeHook = function (hookPlugin, payload, callback) {
422
422
  logHookEvent(
423
423
  hooksManagerLogger.info,
424
- `executeHook: ${hookPlugin["identifier"]}`,
424
+ `executeHook: ${hookPlugin.identifier}`,
425
425
  {
426
426
  hook: hookPlugin,
427
427
  payload,
@@ -433,7 +433,7 @@ export function HooksManager({
433
433
  } catch (error) {
434
434
  logHookEvent(
435
435
  hooksManagerLogger.error,
436
- `executeHook: error executing hook: ${hookPlugin["identifier"]} error: ${error.message}`,
436
+ `executeHook: error executing hook: ${hookPlugin.identifier} error: ${error.message}`,
437
437
  {
438
438
  hook: hookPlugin,
439
439
  payload,
@@ -460,7 +460,7 @@ export function HooksManager({
460
460
  try {
461
461
  logHookEvent(
462
462
  hooksManagerLogger.info,
463
- `runInBackground: Executing hook: ${hookPlugin["identifier"]}`,
463
+ `runInBackground: Executing hook: ${hookPlugin.identifier}`,
464
464
  {
465
465
  hook: hookPlugin,
466
466
  payload,
@@ -10,10 +10,7 @@ import { Platform } from "react-native";
10
10
  * platformKeys[Platform.OS] should only include keys
11
11
  * that are unique to that platform, i.e. Exit: { keyCode: 10182 }
12
12
  */
13
- export const KEYS = Object.assign(
14
- platformKeys["web"],
15
- platformKeys[Platform.OS]
16
- );
13
+ export const KEYS = Object.assign(platformKeys.web, platformKeys[Platform.OS]);
17
14
 
18
15
  export const ARROW_KEYS = [
19
16
  KEYS.ArrowUp,
@@ -79,7 +79,7 @@ export class ClosedCaptioningManager {
79
79
  private constructor() {
80
80
  this.initialize();
81
81
 
82
- window["vizioDebug"] = {
82
+ window.vizioDebug = {
83
83
  setCCEnabled: (isCCEnabled: boolean) => {
84
84
  this.ccState$.next(isCCEnabled);
85
85
  },
@@ -15,6 +15,22 @@ const logger = createLogger({
15
15
 
16
16
  const { log_warning } = logger;
17
17
 
18
+ interface PlayerMethods {
19
+ seeking?: (position: number) => void;
20
+ forward?: (deltaTime: number) => void;
21
+ rewind?: (deltaTime: number) => void;
22
+ startSleepTimer?: (sleepTimestamp: number) => void;
23
+ selectTrack?: (
24
+ selected: QuickBrickPlayer.TextTrack | QuickBrickPlayer.AudioTrack
25
+ ) => void;
26
+ setPlaybackRate?: (rate: number) => void;
27
+ appStateChange?: (appState: string, previousAppState: string) => void;
28
+ closeNativePlayer?: () => void;
29
+ togglePlayPause?: () => void;
30
+ }
31
+
32
+ type PlayerComponent = ReactComponent<PlayerRefProps> & PlayerMethods;
33
+
18
34
  type PlayerPlugnId = "QuickBrickPlayerPlugin" | "KalturaPlayerPlugin";
19
35
 
20
36
  type Props = {
@@ -62,7 +78,7 @@ export class PlayerNative extends Player {
62
78
  return this.playerState.contentPosition;
63
79
  };
64
80
 
65
- currentPlayerComponent = (): ReactComponent<PlayerRefProps> =>
81
+ currentPlayerComponent = (): PlayerComponent | null =>
66
82
  this.playerComponent?.current;
67
83
 
68
84
  getState = () => this.playerState;
@@ -121,7 +137,7 @@ export class PlayerNative extends Player {
121
137
 
122
138
  this.playerState.seekPosition = newPosition;
123
139
 
124
- this.currentPlayerComponent()?.["seeking"](this.playerState.seekPosition);
140
+ this.currentPlayerComponent()?.seeking?.(this.playerState.seekPosition);
125
141
  }
126
142
 
127
143
  this.logState(PlayerModuleFuncNames.seekTo, { position });
@@ -135,7 +151,7 @@ export class PlayerNative extends Player {
135
151
  if (!this.invokeNativeFunction(PlayerModuleFuncNames.forward, deltaTime)) {
136
152
  // Kaltura does not have yet this implementation, use legacy code
137
153
 
138
- this.currentPlayerComponent()?.["forward"](deltaTime);
154
+ this.currentPlayerComponent()?.forward?.(deltaTime);
139
155
  }
140
156
 
141
157
  this.notifyPlayHeadPositionUpdate();
@@ -151,7 +167,7 @@ export class PlayerNative extends Player {
151
167
  if (!this.invokeNativeFunction(PlayerModuleFuncNames.rewind, deltaTime)) {
152
168
  // Kaltura does not have yet this implementation, use legacy code
153
169
 
154
- this.currentPlayerComponent()?.["rewind"](deltaTime);
170
+ this.currentPlayerComponent()?.rewind?.(deltaTime);
155
171
  }
156
172
 
157
173
  this.notifyPlayHeadPositionUpdate();
@@ -178,7 +194,7 @@ export class PlayerNative extends Player {
178
194
  sleepTimestamp
179
195
  )
180
196
  ) {
181
- this.currentPlayerComponent()?.["startSleepTimer"](sleepTimestamp);
197
+ this.currentPlayerComponent()?.startSleepTimer?.(sleepTimestamp);
182
198
  }
183
199
  };
184
200
 
@@ -195,11 +211,11 @@ export class PlayerNative extends Player {
195
211
  selectTrack = (
196
212
  selected: QuickBrickPlayer.TextTrack | QuickBrickPlayer.AudioTrack
197
213
  ) => {
198
- this.currentPlayerComponent()?.["selectTrack"]?.(selected);
214
+ this.currentPlayerComponent()?.selectTrack?.(selected);
199
215
  };
200
216
 
201
217
  setPlaybackRate = (rate: number) => {
202
- this.currentPlayerComponent()?.["setPlaybackRate"]?.(rate);
218
+ this.currentPlayerComponent()?.setPlaybackRate?.(rate);
203
219
  };
204
220
 
205
221
  getPluginConfiguration = () => {
@@ -209,19 +225,16 @@ export class PlayerNative extends Player {
209
225
  getProps = () => (this.currentPlayerComponent() as any)?.props;
210
226
 
211
227
  appStateChange = (appState, previousAppState) => {
212
- this.currentPlayerComponent()?.["appStateChange"]?.(
213
- appState,
214
- previousAppState
215
- );
228
+ this.currentPlayerComponent()?.appStateChange?.(appState, previousAppState);
216
229
  };
217
230
 
218
231
  closeNativePlayer = () => {
219
232
  // TODO: Delete does not work
220
- this.currentPlayerComponent()?.["closeNativePlayer"]?.();
233
+ this.currentPlayerComponent()?.closeNativePlayer?.();
221
234
  };
222
235
 
223
236
  togglePlayPause = () => {
224
- this.currentPlayerComponent()?.["togglePlayPause"]?.();
237
+ this.currentPlayerComponent()?.togglePlayPause?.();
225
238
  };
226
239
 
227
240
  onVideoLoad = (event) => {
@@ -289,19 +302,19 @@ export class PlayerNative extends Player {
289
302
  isFullScreenSupported = (): boolean => {
290
303
  const config = this.getConfig();
291
304
 
292
- const disableFullScreen = config?.["disable_fullscreen"];
305
+ const disableFullScreen = config?.disable_fullscreen;
293
306
 
294
307
  if (disableFullScreen) {
295
308
  return false;
296
309
  }
297
310
 
298
- const isFullScreenAudioPlayer = config?.["full_screen_audio_player"];
311
+ const isFullScreenAudioPlayer = config?.full_screen_audio_player;
299
312
 
300
313
  return !(isFullScreenAudioPlayer && this.isAudioItem());
301
314
  };
302
315
 
303
316
  supportsNativeControls = (): boolean =>
304
- toBooleanWithDefaultFalse(this.getConfig()?.["supports_native_controls"]);
317
+ toBooleanWithDefaultFalse(this.getConfig()?.supports_native_controls);
305
318
 
306
319
  supportNativeCast = (): boolean =>
307
320
  toBooleanWithDefaultFalse(
@@ -50,7 +50,7 @@ describe("getAllSpecificStyles", () => {
50
50
  });
51
51
 
52
52
  expect(outStyles).toHaveProperty("default");
53
- expect(outStyles["default"]).toEqual({});
53
+ expect(outStyles.default).toEqual({});
54
54
  });
55
55
 
56
56
  it("should handle empty configuration", () => {
@@ -83,7 +83,7 @@ describe("getAllSpecificStyles", () => {
83
83
  outStyles,
84
84
  });
85
85
 
86
- expect(outStyles["default"]).toEqual({
86
+ expect(outStyles.default).toEqual({
87
87
  backgroundColor: "#FF0000",
88
88
  borderWidth: 2,
89
89
  });
@@ -104,7 +104,7 @@ describe("getAllSpecificStyles", () => {
104
104
  outStyles,
105
105
  });
106
106
 
107
- expect(outStyles["default"]).toEqual({
107
+ expect(outStyles.default).toEqual({
108
108
  backgroundColor: "#FF0000",
109
109
  textSize: 16,
110
110
  });
@@ -126,7 +126,7 @@ describe("getAllSpecificStyles", () => {
126
126
  outStyles,
127
127
  });
128
128
 
129
- expect(outStyles["default"]).toEqual({
129
+ expect(outStyles.default).toEqual({
130
130
  backgroundColor: "#FF0000",
131
131
  });
132
132
  });
@@ -148,11 +148,11 @@ describe("getAllSpecificStyles", () => {
148
148
  outStyles,
149
149
  });
150
150
 
151
- expect(outStyles["default"]).toEqual({
151
+ expect(outStyles.default).toEqual({
152
152
  backgroundColor: "#FF0000",
153
153
  });
154
154
 
155
- expect(outStyles["pressed"]).toEqual({
155
+ expect(outStyles.pressed).toEqual({
156
156
  backgroundColor: "#00FF00",
157
157
  });
158
158
  });
@@ -171,7 +171,7 @@ describe("getAllSpecificStyles", () => {
171
171
  outStyles,
172
172
  });
173
173
 
174
- expect(outStyles["focused"]).toEqual({
174
+ expect(outStyles.focused).toEqual({
175
175
  borderWidth: 3,
176
176
  });
177
177
  });
@@ -190,7 +190,7 @@ describe("getAllSpecificStyles", () => {
190
190
  outStyles,
191
191
  });
192
192
 
193
- expect(outStyles["selected"]).toEqual({
193
+ expect(outStyles.selected).toEqual({
194
194
  opacity: 0.5,
195
195
  });
196
196
  });
@@ -209,7 +209,7 @@ describe("getAllSpecificStyles", () => {
209
209
  outStyles,
210
210
  });
211
211
 
212
- expect(outStyles["focused_selected"]).toEqual({
212
+ expect(outStyles.focused_selected).toEqual({
213
213
  scale: 1.2,
214
214
  });
215
215
  });
@@ -232,21 +232,21 @@ describe("getAllSpecificStyles", () => {
232
232
  outStyles,
233
233
  });
234
234
 
235
- expect(outStyles["default"]).toEqual({
235
+ expect(outStyles.default).toEqual({
236
236
  backgroundColor: "#FF0000",
237
237
  borderWidth: 1,
238
238
  opacity: 1,
239
239
  });
240
240
 
241
241
  // Pressed should have default styles merged with its specific override
242
- expect(outStyles["pressed"]).toEqual({
242
+ expect(outStyles.pressed).toEqual({
243
243
  backgroundColor: "#00FF00", // Override
244
244
  borderWidth: 1, // From default
245
245
  opacity: 1, // From default
246
246
  });
247
247
 
248
248
  // Focused should have default styles merged with its specific override
249
- expect(outStyles["focused"]).toEqual({
249
+ expect(outStyles.focused).toEqual({
250
250
  backgroundColor: "#FF0000", // From default
251
251
  borderWidth: 1, // From default
252
252
  opacity: 0.8, // Override
@@ -270,7 +270,7 @@ describe("getAllSpecificStyles", () => {
270
270
  outStyles,
271
271
  });
272
272
 
273
- expect(outStyles["pressed"]).toEqual({
273
+ expect(outStyles.pressed).toEqual({
274
274
  existingKey: "existingValue", // Should be preserved
275
275
  backgroundColor: "#FF0000", // From default
276
276
  textColor: "#FFFFFF", // New pressed style
@@ -294,7 +294,7 @@ describe("getAllSpecificStyles", () => {
294
294
  outStyles,
295
295
  });
296
296
 
297
- expect(outStyles["default"]).toEqual({
297
+ expect(outStyles.default).toEqual({
298
298
  backgroundColor: "#FF0000", // Samsung-specific should be included
299
299
  });
300
300
  });
@@ -317,7 +317,7 @@ describe("getAllSpecificStyles", () => {
317
317
  outStyles,
318
318
  });
319
319
 
320
- expect(outStyles["default"]).toEqual({
320
+ expect(outStyles.default).toEqual({
321
321
  backgroundColor: "#FFFFFF", // Only non-platform specific
322
322
  });
323
323
  });
@@ -336,7 +336,7 @@ describe("getAllSpecificStyles", () => {
336
336
  outStyles,
337
337
  });
338
338
 
339
- expect(outStyles["default"]).toEqual({
339
+ expect(outStyles.default).toEqual({
340
340
  color: "#FF0000",
341
341
  });
342
342
  });
@@ -356,7 +356,7 @@ describe("getAllSpecificStyles", () => {
356
356
  outStyles,
357
357
  });
358
358
 
359
- expect(outStyles["pressed"]).toEqual({
359
+ expect(outStyles.pressed).toEqual({
360
360
  backgroundColor: "#FF0000", // Only samsung style
361
361
  });
362
362
  });
@@ -377,7 +377,7 @@ describe("getAllSpecificStyles", () => {
377
377
  outStyles,
378
378
  });
379
379
 
380
- expect(outStyles["default"]).toEqual({
380
+ expect(outStyles.default).toEqual({
381
381
  backgroundColor: "#00FF00", // Samsung-specific should win
382
382
  });
383
383
  });
@@ -412,14 +412,14 @@ describe("getAllSpecificStyles", () => {
412
412
  outStyles,
413
413
  });
414
414
 
415
- expect(outStyles["default"]).toEqual({
415
+ expect(outStyles.default).toEqual({
416
416
  backgroundColor: "#FFFFFF",
417
417
  textColor: "#000000",
418
418
  borderWidth: 1,
419
419
  padding: 10,
420
420
  });
421
421
 
422
- expect(outStyles["pressed"]).toEqual({
422
+ expect(outStyles.pressed).toEqual({
423
423
  backgroundColor: "#EEEEEE",
424
424
  textColor: "#000000",
425
425
  borderWidth: 1,
@@ -427,7 +427,7 @@ describe("getAllSpecificStyles", () => {
427
427
  opacity: 0.8,
428
428
  });
429
429
 
430
- expect(outStyles["focused"]).toEqual({
430
+ expect(outStyles.focused).toEqual({
431
431
  backgroundColor: "#FFFFFF",
432
432
  textColor: "#000000",
433
433
  borderWidth: 1,
@@ -453,7 +453,7 @@ describe("getAllSpecificStyles", () => {
453
453
  outStyles,
454
454
  });
455
455
 
456
- expect(outStyles["default"]).toEqual({
456
+ expect(outStyles.default).toEqual({
457
457
  validKey: "included",
458
458
  });
459
459
  });
@@ -474,11 +474,11 @@ describe("getAllSpecificStyles", () => {
474
474
  outStyles,
475
475
  });
476
476
 
477
- expect(outStyles["focused_selected"]).toEqual({
477
+ expect(outStyles.focused_selected).toEqual({
478
478
  test: "focused_selected_value",
479
479
  });
480
480
 
481
- expect(outStyles["focused"]).toEqual({
481
+ expect(outStyles.focused).toEqual({
482
482
  another: "focused_value",
483
483
  });
484
484
  });
@@ -517,7 +517,7 @@ describe("getAllSpecificStyles", () => {
517
517
  outStyles,
518
518
  });
519
519
 
520
- expect(outStyles["pressed"]["backgroundColor"]).toBe("#222222");
520
+ expect(outStyles.pressed.backgroundColor).toBe("#222222");
521
521
  });
522
522
 
523
523
  it("should handle frozen outStyles properties", () => {
@@ -537,7 +537,7 @@ describe("getAllSpecificStyles", () => {
537
537
  });
538
538
 
539
539
  // Should create new object instead of mutating frozen one
540
- expect(outStyles["default"]).toEqual({
540
+ expect(outStyles.default).toEqual({
541
541
  existingProp: "value",
542
542
  backgroundColor: "#FF0000",
543
543
  });
@@ -3487,6 +3487,22 @@ function getPlayerConfiguration({ platform, version }) {
3487
3487
  label_tooltip:
3488
3488
  "This field allows you to override the player configuration / initialization options. i.e. html5: { vhs: { limitRenditionByPlayerDimensions: false } } Please ensure your configuration matches the player you are targeting, and that it is a valid json. See config options here: https://videojs.com/guides/options/",
3489
3489
  },
3490
+ {
3491
+ key: "advanced_player_styles",
3492
+ label: "Advanced Player Styles",
3493
+ type: "text_input",
3494
+ multiline: true,
3495
+ initial_value: `.vjs-text-track-cue {
3496
+ inset: unset !important;
3497
+ top: 94% !important;
3498
+ bottom: 0 !important;
3499
+ left: 0 !important;
3500
+ right: 0 !important;
3501
+ width: 100% !important;
3502
+ }`,
3503
+ label_tooltip:
3504
+ "This field allows you to inject custom CSS styles to override default player styles. The styles will be injected into the document head and can be used to customize the appearance of the player. Leave empty to use only default styles.",
3505
+ },
3490
3506
  {
3491
3507
  key: "use_dashjs_player",
3492
3508
  label: "Use Enhanced Player for DASH streams",
@@ -38,7 +38,7 @@ function tvActionButtonsContainer({ label, description, defaults }) {
38
38
  generateFieldsFromDefaultsWithoutPrefixedLabel(
39
39
  label,
40
40
  defaults,
41
- tvActionButtonContainerFields(defaults["position"])
41
+ tvActionButtonContainerFields(defaults.position)
42
42
  )
43
43
  );
44
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "15.0.0-rc.44",
3
+ "version": "15.0.0-rc.46",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/applicaster-types": "15.0.0-rc.44",
30
+ "@applicaster/applicaster-types": "15.0.0-rc.46",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",
@@ -27,20 +27,20 @@ describe("Debug utils", () => {
27
27
  it("should create new timer if timer with a label does not exist", () => {
28
28
  performanceNowMock.mockReturnValue(1000);
29
29
  time("timer1");
30
- expect(timers["timer1"]).toBeDefined();
31
- expect(timers["timer1"].startTime).toBe(1000);
30
+ expect(timers.timer1).toBeDefined();
31
+ expect(timers.timer1.startTime).toBe(1000);
32
32
  });
33
33
 
34
34
  it("should update start time of timer if timer with a label exists", () => {
35
35
  // First call to time()
36
36
  performanceNowMock.mockReturnValue(1000);
37
37
  time("timer1");
38
- const previousStartTime = timers["timer1"].startTime;
38
+ const previousStartTime = timers.timer1.startTime;
39
39
 
40
40
  // Second call to time()
41
41
  performanceNowMock.mockReturnValue(2000);
42
42
  time("timer1");
43
- const currentStartTime = timers["timer1"].startTime;
43
+ const currentStartTime = timers.timer1.startTime;
44
44
 
45
45
  expect(previousStartTime).toBe(1000);
46
46
  expect(currentStartTime).toBe(2000);
package/utils/index.ts CHANGED
@@ -41,4 +41,5 @@ export {
41
41
  flowRight as compose,
42
42
  partial,
43
43
  reverse,
44
+ set,
44
45
  } from "lodash";