Feat: p-limit is esm

This commit is contained in:
Nevo David 2025-07-06 19:42:56 +07:00
parent 3fee284df7
commit a51cd245be
3 changed files with 13 additions and 7 deletions

View File

@ -7,8 +7,6 @@ import { useT } from '@gitroom/react/translation/get.transation.service.client';
import { useLaunchStore } from '@gitroom/frontend/components/new-launch/store';
import useSWR from 'swr';
import { TopTitle } from '@gitroom/frontend/components/launches/helpers/top.title.component';
import { Input } from '@gitroom/react/form/input';
import { timer } from '@gitroom/helpers/utils/timer';
import { VideoWrapper } from '@gitroom/frontend/components/videos/video.render.component';
import { FormProvider, useForm } from 'react-hook-form';

View File

@ -1,7 +1,11 @@
import { Injectable } from '@nestjs/common';
import pLimit from 'p-limit';
const limit = pLimit(10);
let limit: any;
(async () => {
const pLimit = await import('p-limit');
limit = pLimit.default(10);
})();
@Injectable()
export class FalService {

View File

@ -11,10 +11,14 @@ import { UploadFactory } from '@gitroom/nestjs-libraries/upload/upload.factory';
import { Readable } from 'stream';
import { parseBuffer } from 'music-metadata';
import { stringifySync } from 'subtitle';
import pLimit from 'p-limit';
import { FalService } from '@gitroom/nestjs-libraries/openai/fal.service';
const limit = pLimit(2);
let limit: any;
(async () => {
const pLimit = await import('p-limit');
limit = pLimit.default(2);
})();
const transloadit = new Transloadit({
authKey: process.env.TRANSLOADIT_AUTH,