Skip to content

Commit a51cd24

Browse files
committed
Feat: p-limit is esm
1 parent 3fee284 commit a51cd24

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

apps/frontend/src/components/launches/ai.video.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { useT } from '@gitroom/react/translation/get.transation.service.client';
77
import { useLaunchStore } from '@gitroom/frontend/components/new-launch/store';
88
import useSWR from 'swr';
99
import { TopTitle } from '@gitroom/frontend/components/launches/helpers/top.title.component';
10-
import { Input } from '@gitroom/react/form/input';
11-
import { timer } from '@gitroom/helpers/utils/timer';
1210
import { VideoWrapper } from '@gitroom/frontend/components/videos/video.render.component';
1311
import { FormProvider, useForm } from 'react-hook-form';
1412

libraries/nestjs-libraries/src/openai/fal.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { Injectable } from '@nestjs/common';
22

3-
import pLimit from 'p-limit';
4-
const limit = pLimit(10);
3+
let limit: any;
4+
5+
(async () => {
6+
const pLimit = await import('p-limit');
7+
limit = pLimit.default(10);
8+
})();
59

610
@Injectable()
711
export class FalService {

libraries/nestjs-libraries/src/videos/images-slides/images.slides.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ import { UploadFactory } from '@gitroom/nestjs-libraries/upload/upload.factory';
1111
import { Readable } from 'stream';
1212
import { parseBuffer } from 'music-metadata';
1313
import { stringifySync } from 'subtitle';
14-
15-
import pLimit from 'p-limit';
1614
import { FalService } from '@gitroom/nestjs-libraries/openai/fal.service';
17-
const limit = pLimit(2);
15+
16+
let limit: any;
17+
18+
(async () => {
19+
const pLimit = await import('p-limit');
20+
limit = pLimit.default(2);
21+
})();
1822

1923
const transloadit = new Transloadit({
2024
authKey: process.env.TRANSLOADIT_AUTH,

0 commit comments

Comments
 (0)