pb-sxp-ui 1.15.22-alpha.3 → 1.15.22-alpha.4

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.
@@ -8,6 +8,7 @@ import { mountVideoPlayerAtNode } from './VideoPlayer';
8
8
  import { useSxpDataSource } from '../../../../core/hooks';
9
9
  import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../../../../core/utils/event';
10
10
  const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
11
+ var _a, _b, _c, _d, _e;
11
12
  const [isPauseVideo, setIsPauseVideo] = useState(false);
12
13
  const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
13
14
  const videoStartTime = useRef(0);
@@ -25,6 +26,11 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
25
26
  const isFirstPlayRef = useRef(true);
26
27
  const loopPlayRef = useRef(loopPlay);
27
28
  const scene = rec.video.scene;
29
+ const videoUrl = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl) || ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url);
30
+ const videoCover = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl) ? scene === null || scene === void 0 ? void 0 : scene.cover : (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
31
+ const videoPoster = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl)
32
+ ? (_c = scene === null || scene === void 0 ? void 0 : scene.cover) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image
33
+ : (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.cover) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image;
28
34
  useImperativeHandle(ref, () => {
29
35
  return {
30
36
  setLoopPlay(v) {
@@ -45,8 +51,7 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
45
51
  : 'translateY(-50%)';
46
52
  }, [videoPostConfig]);
47
53
  const blurBgSrc = useMemo(() => {
48
- var _a;
49
- return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
54
+ return videoCover || firstFrameSrc;
50
55
  }, [firstFrameSrc, rec]);
51
56
  const blurStyle = useMemo(() => {
52
57
  return blur
@@ -81,28 +86,27 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
81
86
  setIsLoadFinish(true);
82
87
  }, []);
83
88
  const handleStartPlay = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
84
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
89
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
85
90
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
86
91
  return;
87
92
  setIsPauseVideo(false);
88
93
  const item = data[index];
89
- if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
90
- videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
91
- const videoDuration = ((_d = (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
92
- const videoCurrentTime = ((_f = (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
94
+ if (item && ((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.duration)) {
95
+ videoStartTime.current = ((_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.currentTime) || 0;
96
+ const videoDuration = ((_j = (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.duration) !== null && _j !== void 0 ? _j : 0).toFixed(2);
97
+ const videoCurrentTime = ((_l = (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.currentTime) !== null && _l !== void 0 ? _l : 0).toFixed(2);
93
98
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
94
99
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
95
- eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '', contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []), position: index + '', contentFormat: 'video', traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
100
+ eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId) !== null && _o !== void 0 ? _o : '', contentName: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.title) !== null && _q !== void 0 ? _q : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.tags) !== null && _s !== void 0 ? _s : []), position: index + '', contentFormat: 'video', traceInfo: (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
96
101
  });
97
102
  isFirstPlayRef.current = false;
98
103
  }
99
104
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
100
105
  const handLoadeddata = useCallback(() => {
101
- var _a;
102
106
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
103
107
  return;
104
108
  videoRef.current.style.objectFit = 'contain';
105
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !canvasRef.current || isBgColor)
109
+ if (videoCover || !canvasRef || !canvasRef.current || isBgColor)
106
110
  return;
107
111
  const setFrameImg = () => {
108
112
  const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
@@ -218,7 +222,7 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
218
222
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
219
223
  if (!isActive)
220
224
  return;
221
- const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
225
+ const videoSrc = videoUrl;
222
226
  if (!videoSrc)
223
227
  return;
224
228
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
@@ -319,8 +323,7 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
319
323
  };
320
324
  }, [handleClickVideo, isActive]);
321
325
  const renderPoster = useMemo(() => {
322
- var _a, _b;
323
- if ((!((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) && !(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image)) || isLoadFinish) {
326
+ if (!videoPoster || isLoadFinish) {
324
327
  return null;
325
328
  }
326
329
  return (React.createElement("img", { style: {
@@ -330,8 +333,8 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
330
333
  width: '100%',
331
334
  height: '100%',
332
335
  objectFit: 'cover'
333
- }, src: ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover) || (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image), alt: 'placeholder image' }));
334
- }, [rec, isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
336
+ }, src: videoPoster, alt: 'placeholder image' }));
337
+ }, [isLoadFinish]);
335
338
  const renderLoading = useMemo(() => {
336
339
  if (!waiting || !isLoadFinish)
337
340
  return;
@@ -351,8 +354,7 @@ const VideoWidget = forwardRef(({ rec, index, height, data, muted, activeIndex,
351
354
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
352
355
  return;
353
356
  const handleBeforeUnload = () => {
354
- var _a;
355
- if (activeIndex === index && ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) && (videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) && !isPauseVideo) {
357
+ if (activeIndex === index && videoUrl && (videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) && !isPauseVideo) {
356
358
  handleClickVideo('pause')();
357
359
  }
358
360
  };
@@ -10,6 +10,7 @@ const VideoPlayer_1 = require("./VideoPlayer");
10
10
  const hooks_1 = require("../../../../core/hooks");
11
11
  const event_1 = tslib_1.__importStar(require("../../../../core/utils/event"));
12
12
  const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
13
+ var _a, _b, _c, _d, _e;
13
14
  const [isPauseVideo, setIsPauseVideo] = (0, react_1.useState)(false);
14
15
  const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = (0, hooks_1.useSxpDataSource)();
15
16
  const videoStartTime = (0, react_1.useRef)(0);
@@ -27,6 +28,11 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
27
28
  const isFirstPlayRef = (0, react_1.useRef)(true);
28
29
  const loopPlayRef = (0, react_1.useRef)(loopPlay);
29
30
  const scene = rec.video.scene;
31
+ const videoUrl = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl) || ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url);
32
+ const videoCover = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl) ? scene === null || scene === void 0 ? void 0 : scene.cover : (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover;
33
+ const videoPoster = (scene === null || scene === void 0 ? void 0 : scene.mediaUrl)
34
+ ? (_c = scene === null || scene === void 0 ? void 0 : scene.cover) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image
35
+ : (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.cover) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image;
30
36
  (0, react_1.useImperativeHandle)(ref, () => {
31
37
  return {
32
38
  setLoopPlay(v) {
@@ -47,8 +53,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
47
53
  : 'translateY(-50%)';
48
54
  }, [videoPostConfig]);
49
55
  const blurBgSrc = (0, react_1.useMemo)(() => {
50
- var _a;
51
- return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
56
+ return videoCover || firstFrameSrc;
52
57
  }, [firstFrameSrc, rec]);
53
58
  const blurStyle = (0, react_1.useMemo)(() => {
54
59
  return blur
@@ -83,28 +88,27 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
83
88
  setIsLoadFinish(true);
84
89
  }, []);
85
90
  const handleStartPlay = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
86
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
91
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
87
92
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
88
93
  return;
89
94
  setIsPauseVideo(false);
90
95
  const item = data[index];
91
- if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
92
- videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
93
- const videoDuration = ((_d = (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
94
- const videoCurrentTime = ((_f = (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
96
+ if (item && ((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.duration)) {
97
+ videoStartTime.current = ((_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.currentTime) || 0;
98
+ const videoDuration = ((_j = (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.duration) !== null && _j !== void 0 ? _j : 0).toFixed(2);
99
+ const videoCurrentTime = ((_l = (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.currentTime) !== null && _l !== void 0 ? _l : 0).toFixed(2);
95
100
  const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
96
101
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
97
- eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '', contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []), position: index + '', contentFormat: 'video', traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
102
+ eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId) !== null && _o !== void 0 ? _o : '', contentName: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.title) !== null && _q !== void 0 ? _q : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.tags) !== null && _s !== void 0 ? _s : []), position: index + '', contentFormat: 'video', traceInfo: (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
98
103
  });
99
104
  isFirstPlayRef.current = false;
100
105
  }
101
106
  }), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
102
107
  const handLoadeddata = (0, react_1.useCallback)(() => {
103
- var _a;
104
108
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
105
109
  return;
106
110
  videoRef.current.style.objectFit = 'contain';
107
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !canvasRef.current || isBgColor)
111
+ if (videoCover || !canvasRef || !canvasRef.current || isBgColor)
108
112
  return;
109
113
  const setFrameImg = () => {
110
114
  const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
@@ -220,7 +224,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
220
224
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
221
225
  if (!isActive)
222
226
  return;
223
- const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
227
+ const videoSrc = videoUrl;
224
228
  if (!videoSrc)
225
229
  return;
226
230
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
@@ -321,8 +325,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
321
325
  };
322
326
  }, [handleClickVideo, isActive]);
323
327
  const renderPoster = (0, react_1.useMemo)(() => {
324
- var _a, _b;
325
- if ((!((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) && !(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image)) || isLoadFinish) {
328
+ if (!videoPoster || isLoadFinish) {
326
329
  return null;
327
330
  }
328
331
  return (react_1.default.createElement("img", { style: {
@@ -332,8 +335,8 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
332
335
  width: '100%',
333
336
  height: '100%',
334
337
  objectFit: 'cover'
335
- }, src: ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.cover) || (sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image), alt: 'placeholder image' }));
336
- }, [rec, isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
338
+ }, src: videoPoster, alt: 'placeholder image' }));
339
+ }, [isLoadFinish]);
337
340
  const renderLoading = (0, react_1.useMemo)(() => {
338
341
  if (!waiting || !isLoadFinish)
339
342
  return;
@@ -353,8 +356,7 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
353
356
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
354
357
  return;
355
358
  const handleBeforeUnload = () => {
356
- var _a;
357
- if (activeIndex === index && ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) && (videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) && !isPauseVideo) {
359
+ if (activeIndex === index && videoUrl && (videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) && !isPauseVideo) {
358
360
  handleClickVideo('pause')();
359
361
  }
360
362
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.15.22-alpha.3",
3
+ "version": "1.15.22-alpha.4",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",