@remotion/lambda 4.0.0-alpha13 → 4.0.0-alpha16

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.
Files changed (69) hide show
  1. package/dist/api/delete-function.d.ts +1 -1
  2. package/dist/api/delete-render.d.ts +1 -1
  3. package/dist/api/delete-site.d.ts +2 -2
  4. package/dist/api/deploy-function.d.ts +2 -2
  5. package/dist/api/deploy-site.d.ts +2 -2
  6. package/dist/api/download-media.d.ts +2 -2
  7. package/dist/api/estimate-price.d.ts +1 -1
  8. package/dist/api/get-aws-client.d.ts +3 -3
  9. package/dist/api/get-buckets.d.ts +1 -1
  10. package/dist/api/get-compositions-on-lambda.d.ts +2 -2
  11. package/dist/api/get-function-info.d.ts +2 -2
  12. package/dist/api/get-functions.d.ts +1 -1
  13. package/dist/api/get-or-create-bucket.d.ts +2 -2
  14. package/dist/api/get-regions.d.ts +1 -1
  15. package/dist/api/get-render-progress.d.ts +1 -1
  16. package/dist/api/get-sites.d.ts +3 -3
  17. package/dist/api/iam-validation/simulate-rule.d.ts +2 -2
  18. package/dist/api/iam-validation/simulate.d.ts +2 -2
  19. package/dist/api/iam-validation/simulate.js +1 -1
  20. package/dist/api/presign-url.d.ts +1 -1
  21. package/dist/api/render-media-on-lambda.d.ts +2 -2
  22. package/dist/api/render-still-on-lambda.d.ts +2 -2
  23. package/dist/api/speculate-function-name.d.ts +1 -1
  24. package/dist/api/upload-dir.d.ts +2 -2
  25. package/dist/cli/args.d.ts +1 -1
  26. package/dist/cli/commands/render/progress.d.ts +4 -4
  27. package/dist/cli/commands/render/render.js +9 -1
  28. package/dist/cli/commands/still.js +9 -1
  29. package/dist/cli/helpers/progress-bar.d.ts +4 -4
  30. package/dist/cli/log.d.ts +1 -0
  31. package/dist/functions/chunk-optimization/types.d.ts +2 -2
  32. package/dist/functions/compositions.d.ts +1 -1
  33. package/dist/functions/compositions.js +11 -7
  34. package/dist/functions/helpers/find-output-file-in-bucket.d.ts +1 -1
  35. package/dist/functions/helpers/get-browser-instance.d.ts +1 -2
  36. package/dist/functions/helpers/get-browser-instance.js +4 -1
  37. package/dist/functions/helpers/get-files-in-folder.d.ts +1 -1
  38. package/dist/functions/helpers/get-files-to-delete.d.ts +1 -1
  39. package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +1 -1
  40. package/dist/functions/helpers/get-retry-stats.d.ts +1 -1
  41. package/dist/functions/helpers/io.d.ts +3 -3
  42. package/dist/functions/helpers/read-with-progress.d.ts +1 -1
  43. package/dist/functions/helpers/validate-composition.d.ts +5 -5
  44. package/dist/functions/helpers/validate-composition.js +5 -3
  45. package/dist/functions/helpers/write-lambda-error.d.ts +2 -2
  46. package/dist/functions/index.js +1 -1
  47. package/dist/functions/launch.d.ts +1 -1
  48. package/dist/functions/launch.js +6 -8
  49. package/dist/functions/progress.d.ts +1 -1
  50. package/dist/functions/renderer.d.ts +1 -1
  51. package/dist/functions/renderer.js +13 -12
  52. package/dist/functions/start.d.ts +1 -1
  53. package/dist/functions/still.d.ts +1 -1
  54. package/dist/functions/still.js +25 -11
  55. package/dist/pricing/aws-regions.d.ts +1 -1
  56. package/dist/shared/await.d.ts +1 -1
  57. package/dist/shared/aws-clients.d.ts +3 -3
  58. package/dist/shared/constants.d.ts +18 -18
  59. package/dist/shared/content-disposition-header.d.ts +1 -1
  60. package/dist/shared/get-most-expensive-chunks.d.ts +1 -1
  61. package/dist/shared/hosted-layers.d.ts +1 -1
  62. package/dist/shared/invoke-webhook.d.ts +2 -2
  63. package/dist/shared/parse-lambda-timings-key.d.ts +1 -1
  64. package/dist/shared/return-values.d.ts +1 -1
  65. package/dist/shared/truthy.d.ts +1 -1
  66. package/dist/shared/validate-lambda-codec.d.ts +1 -1
  67. package/dist/shared/validate-outname.js +12 -12
  68. package/package.json +11 -11
  69. package/remotionlambda-arm64.zip +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- export declare type DeleteFunctionInput = {
2
+ export type DeleteFunctionInput = {
3
3
  region: AwsRegion;
4
4
  functionName: string;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import type { AwsRegion } from '../client';
2
2
  import type { CustomCredentials } from '../shared/aws-clients';
3
- export declare type DeleteRenderInput = {
3
+ export type DeleteRenderInput = {
4
4
  region: AwsRegion;
5
5
  bucketName: string;
6
6
  renderId: string;
@@ -1,5 +1,5 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- export declare type DeleteSiteInput = {
2
+ export type DeleteSiteInput = {
3
3
  bucketName: string;
4
4
  siteName: string;
5
5
  region: AwsRegion;
@@ -8,7 +8,7 @@ export declare type DeleteSiteInput = {
8
8
  itemName: string;
9
9
  }) => void;
10
10
  };
11
- export declare type DeleteSiteOutput = {
11
+ export type DeleteSiteOutput = {
12
12
  totalSizeInBytes: number;
13
13
  };
14
14
  /**
@@ -1,5 +1,5 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- export declare type DeployFunctionInput = {
2
+ export type DeployFunctionInput = {
3
3
  createCloudWatchLogGroup: boolean;
4
4
  cloudWatchLogRetentionPeriodInDays?: number;
5
5
  region: AwsRegion;
@@ -8,7 +8,7 @@ export declare type DeployFunctionInput = {
8
8
  diskSizeInMb?: number;
9
9
  customRoleArn?: string;
10
10
  };
11
- export declare type DeployFunctionOutput = {
11
+ export type DeployFunctionOutput = {
12
12
  functionName: string;
13
13
  alreadyExisted: boolean;
14
14
  };
@@ -1,7 +1,7 @@
1
1
  import type { WebpackOverrideFn } from '@remotion/bundler';
2
2
  import type { AwsRegion } from '../pricing/aws-regions';
3
3
  import type { UploadDirProgress } from './upload-dir';
4
- export declare type DeploySiteInput = {
4
+ export type DeploySiteInput = {
5
5
  entryPoint: string;
6
6
  bucketName: string;
7
7
  region: AwsRegion;
@@ -18,7 +18,7 @@ export declare type DeploySiteInput = {
18
18
  };
19
19
  privacy?: 'public' | 'no-acl';
20
20
  };
21
- export declare type DeploySiteOutput = Promise<{
21
+ export type DeploySiteOutput = Promise<{
22
22
  serveUrl: string;
23
23
  siteName: string;
24
24
  stats: {
@@ -1,7 +1,7 @@
1
1
  import type { LambdaReadFileProgress } from '../functions/helpers/read-with-progress';
2
2
  import type { AwsRegion } from '../pricing/aws-regions';
3
3
  import type { CustomCredentials } from '../shared/aws-clients';
4
- export declare type DownloadMediaInput = {
4
+ export type DownloadMediaInput = {
5
5
  region: AwsRegion;
6
6
  bucketName: string;
7
7
  renderId: string;
@@ -9,7 +9,7 @@ export declare type DownloadMediaInput = {
9
9
  onProgress?: LambdaReadFileProgress;
10
10
  customCredentials?: CustomCredentials;
11
11
  };
12
- export declare type DownloadMediaOutput = {
12
+ export type DownloadMediaOutput = {
13
13
  outputPath: string;
14
14
  sizeInBytes: number;
15
15
  };
@@ -1,5 +1,5 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- export declare type EstimatePriceInput = {
2
+ export type EstimatePriceInput = {
3
3
  region: AwsRegion;
4
4
  durationInMiliseconds: number;
5
5
  memorySizeInMb: number;
@@ -6,12 +6,12 @@ import * as ServiceQuotasSDK from '@aws-sdk/client-service-quotas';
6
6
  import * as StsSdk from '@aws-sdk/client-sts';
7
7
  import type { AwsRegion } from '../client';
8
8
  import type { CustomCredentials, ServiceMapping } from '../shared/aws-clients';
9
- export declare type GetAwsClientInput<T extends keyof ServiceMapping> = {
9
+ export type GetAwsClientInput<T extends keyof ServiceMapping> = {
10
10
  region: AwsRegion;
11
11
  service: T;
12
12
  customCredentials?: CustomCredentials | null;
13
13
  };
14
- declare type SdkMapping = {
14
+ type SdkMapping = {
15
15
  s3: typeof S3SDK;
16
16
  cloudwatch: typeof CloudWatchSDK;
17
17
  iam: typeof IamSdk;
@@ -19,7 +19,7 @@ declare type SdkMapping = {
19
19
  servicequotas: typeof ServiceQuotasSDK;
20
20
  sts: typeof StsSdk;
21
21
  };
22
- export declare type GetAwsClientOutput<T extends keyof ServiceMapping> = {
22
+ export type GetAwsClientOutput<T extends keyof ServiceMapping> = {
23
23
  client: ServiceMapping[T];
24
24
  sdk: SdkMapping[T];
25
25
  };
@@ -1,5 +1,5 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- export declare type BucketWithLocation = {
2
+ export type BucketWithLocation = {
3
3
  name: string;
4
4
  creationDate: number;
5
5
  region: AwsRegion;
@@ -1,7 +1,7 @@
1
1
  import type { ChromiumOptions, LogLevel } from '@remotion/renderer';
2
2
  import type { AnyCompMetadata } from 'remotion';
3
3
  import type { AwsRegion } from '../client';
4
- export declare type GetCompositionsOnLambdaInput = {
4
+ export type GetCompositionsOnLambdaInput = {
5
5
  chromiumOptions?: ChromiumOptions;
6
6
  region: AwsRegion;
7
7
  inputProps: Record<string, unknown>;
@@ -13,7 +13,7 @@ export declare type GetCompositionsOnLambdaInput = {
13
13
  forceBucketName?: string;
14
14
  dumpBrowserLogs?: boolean;
15
15
  };
16
- export declare type GetCompositionsOnLambdaOutput = AnyCompMetadata[];
16
+ export type GetCompositionsOnLambdaOutput = AnyCompMetadata[];
17
17
  /**
18
18
  * @description Returns the compositions from a serveUrl
19
19
  * @see [Documentation](https://remotion.dev/docs/lambda/getcompositionsonlambda)
@@ -1,12 +1,12 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- export declare type FunctionInfo = {
2
+ export type FunctionInfo = {
3
3
  functionName: string;
4
4
  timeoutInSeconds: number;
5
5
  memorySizeInMb: number;
6
6
  version: string | null;
7
7
  diskSizeInMb: number;
8
8
  };
9
- export declare type GetFunctionInfoInput = {
9
+ export type GetFunctionInfoInput = {
10
10
  region: AwsRegion;
11
11
  functionName: string;
12
12
  };
@@ -1,6 +1,6 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
2
  import type { FunctionInfo } from './get-function-info';
3
- export declare type GetFunctionsInput = {
3
+ export type GetFunctionsInput = {
4
4
  region: AwsRegion;
5
5
  compatibleOnly: boolean;
6
6
  };
@@ -1,8 +1,8 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- export declare type GetOrCreateBucketInput = {
2
+ export type GetOrCreateBucketInput = {
3
3
  region: AwsRegion;
4
4
  };
5
- export declare type GetOrCreateBucketOutput = {
5
+ export type GetOrCreateBucketOutput = {
6
6
  bucketName: string;
7
7
  alreadyExisted: boolean;
8
8
  };
@@ -1,5 +1,5 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- declare type Options = {
2
+ type Options = {
3
3
  enabledByDefaultOnly?: boolean;
4
4
  };
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
2
  import type { CustomCredentials } from '../shared/aws-clients';
3
3
  import type { RenderProgress } from '../shared/constants';
4
- export declare type GetRenderInput = {
4
+ export type GetRenderInput = {
5
5
  functionName: string;
6
6
  bucketName: string;
7
7
  renderId: string;
@@ -1,16 +1,16 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
2
  import type { BucketWithLocation } from './get-buckets';
3
- declare type Site = {
3
+ type Site = {
4
4
  sizeInBytes: number;
5
5
  lastModified: number | null;
6
6
  bucketName: string;
7
7
  id: string;
8
8
  serveUrl: string;
9
9
  };
10
- export declare type GetSitesInput = {
10
+ export type GetSitesInput = {
11
11
  region: AwsRegion;
12
12
  };
13
- export declare type GetSitesOutput = {
13
+ export type GetSitesOutput = {
14
14
  sites: Site[];
15
15
  buckets: BucketWithLocation[];
16
16
  };
@@ -1,6 +1,6 @@
1
1
  import type { AwsRegion } from '../../pricing/aws-regions';
2
- export declare type EvalDecision = 'allowed' | 'explicitDeny' | 'implicitDeny';
3
- export declare type SimulationResult = {
2
+ export type EvalDecision = 'allowed' | 'explicitDeny' | 'implicitDeny';
3
+ export type SimulationResult = {
4
4
  decision: EvalDecision;
5
5
  name: string;
6
6
  };
@@ -1,11 +1,11 @@
1
1
  import type { AwsRegion } from '../../pricing/aws-regions';
2
2
  import type { SimulationResult } from './simulate-rule';
3
3
  export declare const logPermissionOutput: (output: SimulationResult) => string;
4
- export declare type SimulatePermissionsInput = {
4
+ export type SimulatePermissionsInput = {
5
5
  region: AwsRegion;
6
6
  onSimulation?: (result: SimulationResult) => void;
7
7
  };
8
- export declare type SimulatePermissionsOutput = {
8
+ export type SimulatePermissionsOutput = {
9
9
  results: SimulationResult[];
10
10
  };
11
11
  /**
@@ -27,7 +27,7 @@ exports.logPermissionOutput = logPermissionOutput;
27
27
  const simulatePermissions = async (options) => {
28
28
  var _a;
29
29
  const callerIdentity = await (0, aws_clients_1.getStsClient)(options.region).send(new client_sts_1.GetCallerIdentityCommand({}));
30
- if (!callerIdentity || !callerIdentity.Arn) {
30
+ if (!(callerIdentity === null || callerIdentity === void 0 ? void 0 : callerIdentity.Arn)) {
31
31
  throw new Error('No valid AWS Caller Identity detected');
32
32
  }
33
33
  const callerIdentityArnComponents = callerIdentity.Arn.match(/arn:aws:([^:]+)::(\d+):([^/]+)(.*)/);
@@ -1,5 +1,5 @@
1
1
  import type { AwsRegion } from '../pricing/aws-regions';
2
- export declare type PresignUrlInput<CheckIfObjectExists extends boolean = boolean> = {
2
+ export type PresignUrlInput<CheckIfObjectExists extends boolean = boolean> = {
3
3
  region: AwsRegion;
4
4
  bucketName: string;
5
5
  objectKey: string;
@@ -3,7 +3,7 @@ import type { AwsRegion } from '../pricing/aws-regions';
3
3
  import type { OutNameInput, Privacy } from '../shared/constants';
4
4
  import type { DownloadBehavior } from '../shared/content-disposition-header';
5
5
  import type { LambdaCodec } from '../shared/validate-lambda-codec';
6
- export declare type RenderMediaOnLambdaInput = {
6
+ export type RenderMediaOnLambdaInput = {
7
7
  region: AwsRegion;
8
8
  functionName: string;
9
9
  serveUrl: string;
@@ -48,7 +48,7 @@ export declare type RenderMediaOnLambdaInput = {
48
48
  audioCodec?: AudioCodec | null;
49
49
  dumpBrowserLogs?: boolean;
50
50
  };
51
- export declare type RenderMediaOnLambdaOutput = {
51
+ export type RenderMediaOnLambdaOutput = {
52
52
  renderId: string;
53
53
  bucketName: string;
54
54
  cloudWatchLogs: string;
@@ -2,7 +2,7 @@ import type { ChromiumOptions, LogLevel, StillImageFormat } from '@remotion/rend
2
2
  import type { AwsRegion } from '../pricing/aws-regions';
3
3
  import type { CostsInfo, OutNameInput, Privacy } from '../shared/constants';
4
4
  import type { DownloadBehavior } from '../shared/content-disposition-header';
5
- export declare type RenderStillOnLambdaInput = {
5
+ export type RenderStillOnLambdaInput = {
6
6
  region: AwsRegion;
7
7
  functionName: string;
8
8
  serveUrl: string;
@@ -29,7 +29,7 @@ export declare type RenderStillOnLambdaInput = {
29
29
  forceBucketName?: string;
30
30
  dumpBrowserLogs?: boolean;
31
31
  };
32
- export declare type RenderStillOnLambdaOutput = {
32
+ export type RenderStillOnLambdaOutput = {
33
33
  estimatedPrice: CostsInfo;
34
34
  url: string;
35
35
  sizeInBytes: number;
@@ -1,4 +1,4 @@
1
- export declare type SpeculateFunctionNameInput = {
1
+ export type SpeculateFunctionNameInput = {
2
2
  memorySizeInMb: string | number;
3
3
  diskSizeInMb: string | number;
4
4
  timeoutInSeconds: string | number;
@@ -1,12 +1,12 @@
1
1
  import type { Privacy } from '../defaults';
2
2
  import type { AwsRegion } from '../pricing/aws-regions';
3
- export declare type UploadDirProgress = {
3
+ export type UploadDirProgress = {
4
4
  totalFiles: number;
5
5
  filesUploaded: number;
6
6
  totalSize: number;
7
7
  sizeUploaded: number;
8
8
  };
9
- export declare type MockFile = {
9
+ export type MockFile = {
10
10
  name: string;
11
11
  content: string;
12
12
  };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="minimist" />
2
2
  import type { AwsRegion } from '../pricing/aws-regions';
3
3
  import type { Privacy } from '../shared/constants';
4
- declare type LambdaCommandLineOptions = {
4
+ type LambdaCommandLineOptions = {
5
5
  help: boolean;
6
6
  region: AwsRegion;
7
7
  memory: number;
@@ -1,24 +1,24 @@
1
1
  import type { CleanupInfo, EncodingProgress, RenderProgress } from '../../../defaults';
2
2
  import type { ChunkRetry } from '../../../functions/helpers/get-retry-stats';
3
- declare type LambdaInvokeProgress = {
3
+ type LambdaInvokeProgress = {
4
4
  totalLambdas: number | null;
5
5
  lambdasInvoked: number;
6
6
  };
7
- declare type ChunkProgress = {
7
+ type ChunkProgress = {
8
8
  doneIn: number | null;
9
9
  framesRendered: number;
10
10
  totalFrames: number | null;
11
11
  totalChunks: number | null;
12
12
  chunksInvoked: number;
13
13
  };
14
- declare type MultiRenderProgress = {
14
+ type MultiRenderProgress = {
15
15
  lambdaInvokeProgress: LambdaInvokeProgress;
16
16
  chunkProgress: ChunkProgress;
17
17
  encodingProgress: EncodingProgress;
18
18
  cleanupInfo: CleanupInfo | null;
19
19
  };
20
20
  export declare const makeMultiProgressFromStatus: (status: RenderProgress) => MultiRenderProgress;
21
- declare type DownloadedInfo = {
21
+ type DownloadedInfo = {
22
22
  totalSize: number | null;
23
23
  downloaded: number;
24
24
  doneIn: number | null;
@@ -40,12 +40,19 @@ const renderCommand = async (args, remotionRoot) => {
40
40
  if (!composition) {
41
41
  log_1.Log.info('No compositions passed. Fetching compositions...');
42
42
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
43
+ const server = renderer_1.RenderInternals.prepareServer({
44
+ concurrency: 1,
45
+ indent: false,
46
+ port,
47
+ remotionRoot,
48
+ verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose'),
49
+ webpackConfigOrServeUrl: serveUrl,
50
+ });
43
51
  const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
44
52
  args,
45
53
  compositionIdFromUi: null,
46
54
  browserExecutable,
47
55
  chromiumOptions,
48
- downloadMap: undefined,
49
56
  envVariables,
50
57
  height,
51
58
  indent: false,
@@ -56,6 +63,7 @@ const renderCommand = async (args, remotionRoot) => {
56
63
  timeoutInMilliseconds: puppeteerTimeout,
57
64
  verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose'),
58
65
  width,
66
+ server: await server,
59
67
  });
60
68
  composition = compositionId;
61
69
  }
@@ -36,6 +36,14 @@ const stillCommand = async (args, remotionRoot) => {
36
36
  if (!composition) {
37
37
  log_1.Log.info('No compositions passed. Fetching compositions...');
38
38
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
39
+ const server = renderer_1.RenderInternals.prepareServer({
40
+ concurrency: 1,
41
+ indent: false,
42
+ port,
43
+ remotionRoot,
44
+ verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose'),
45
+ webpackConfigOrServeUrl: serveUrl,
46
+ });
39
47
  const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
40
48
  args,
41
49
  compositionIdFromUi: null,
@@ -44,7 +52,6 @@ const stillCommand = async (args, remotionRoot) => {
44
52
  verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose'),
45
53
  browserExecutable,
46
54
  chromiumOptions,
47
- downloadMap: undefined,
48
55
  envVariables,
49
56
  inputProps,
50
57
  port,
@@ -52,6 +59,7 @@ const stillCommand = async (args, remotionRoot) => {
52
59
  timeoutInMilliseconds: puppeteerTimeout,
53
60
  height,
54
61
  width,
62
+ server: await server,
55
63
  });
56
64
  composition = compositionId;
57
65
  }
@@ -1,18 +1,18 @@
1
- export declare type BundleProgress = {
1
+ export type BundleProgress = {
2
2
  progress: number;
3
3
  doneIn: number | null;
4
4
  };
5
5
  export declare const makeBundleProgress: ({ progress, doneIn }: BundleProgress) => string;
6
- export declare type BucketCreationProgress = {
6
+ export type BucketCreationProgress = {
7
7
  doneIn: number | null;
8
8
  };
9
9
  export declare const makeBucketProgress: ({ doneIn }: BucketCreationProgress) => string;
10
- declare type UploadStats = {
10
+ type UploadStats = {
11
11
  addedFiles: number;
12
12
  removedFiles: number;
13
13
  untouchedFiles: number;
14
14
  };
15
- export declare type DeployToS3Progress = {
15
+ export type DeployToS3Progress = {
16
16
  sizeUploaded: number;
17
17
  totalSize: number | null;
18
18
  doneIn: number | null;
package/dist/cli/log.d.ts CHANGED
@@ -5,6 +5,7 @@ export declare const Log: {
5
5
  logLevel: "warn" | "error" | "verbose" | "info";
6
6
  } & {
7
7
  tag?: string | undefined;
8
+ secondTag?: string | undefined;
8
9
  }, message?: any, ...optionalParams: any[]) => void;
9
10
  info: (message?: any, ...optionalParams: any[]) => void;
10
11
  infoAdvanced: (options: {
@@ -1,4 +1,4 @@
1
- export declare type ObjectChunkTimingData = {
1
+ export type ObjectChunkTimingData = {
2
2
  chunk: number;
3
3
  frameRange: [number, number];
4
4
  startDate: number;
@@ -6,6 +6,6 @@ export declare type ObjectChunkTimingData = {
6
6
  [key: number]: number;
7
7
  };
8
8
  };
9
- export declare type ChunkTimingData = Omit<ObjectChunkTimingData, 'timings'> & {
9
+ export type ChunkTimingData = Omit<ObjectChunkTimingData, 'timings'> & {
10
10
  timings: number[];
11
11
  };
@@ -1,5 +1,5 @@
1
1
  import type { LambdaPayload } from '../defaults';
2
- declare type Options = {
2
+ type Options = {
3
3
  expectedBucketOwner: string;
4
4
  };
5
5
  export declare const compositionsHandler: (lambdaParams: LambdaPayload, options: Options) => Promise<{
@@ -10,7 +10,7 @@ const deserialize_input_props_1 = require("../shared/deserialize-input-props");
10
10
  const get_browser_instance_1 = require("./helpers/get-browser-instance");
11
11
  const get_current_region_1 = require("./helpers/get-current-region");
12
12
  const compositionsHandler = async (lambdaParams, options) => {
13
- var _a, _b, _c;
13
+ var _a, _b, _c, _d;
14
14
  if (lambdaParams.type !== defaults_1.LambdaRoutines.compositions) {
15
15
  throw new TypeError('Expected info compositions');
16
16
  }
@@ -21,11 +21,12 @@ const compositionsHandler = async (lambdaParams, options) => {
21
21
  throw new Error(`Version mismatch: When calling getCompositionsOnLambda(), you passed ${process.env.AWS_LAMBDA_FUNCTION_NAME} as the function, which has the version ${version_1.VERSION}, but the @remotion/lambda package you used to invoke the function has version ${lambdaParams.version}. Deploy a new function and use it to call getCompositionsOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
22
22
  }
23
23
  const region = (0, get_current_region_1.getCurrentRegionInFunction)();
24
+ const verbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(lambdaParams.logLevel, 'verbose');
24
25
  const [bucketName, browserInstance] = await Promise.all([
25
26
  (_a = lambdaParams.bucketName) !== null && _a !== void 0 ? _a : (0, get_or_create_bucket_1.getOrCreateBucket)({
26
27
  region,
27
28
  }).then((b) => b.bucketName),
28
- (0, get_browser_instance_1.getBrowserInstance)((_b = lambdaParams.dumpBrowserLogs) !== null && _b !== void 0 ? _b : renderer_1.RenderInternals.isEqualOrBelowLogLevel(lambdaParams.logLevel, 'verbose'), (_c = lambdaParams.chromiumOptions) !== null && _c !== void 0 ? _c : {}),
29
+ (0, get_browser_instance_1.getBrowserInstance)((_b = lambdaParams.dumpBrowserLogs) !== null && _b !== void 0 ? _b : verbose, (_c = lambdaParams.chromiumOptions) !== null && _c !== void 0 ? _c : {}),
29
30
  ]);
30
31
  const inputProps = await (0, deserialize_input_props_1.deserializeInputProps)({
31
32
  bucketName,
@@ -38,17 +39,20 @@ const compositionsHandler = async (lambdaParams, options) => {
38
39
  region,
39
40
  bucketName,
40
41
  });
41
- const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
42
- const compositions = await (0, renderer_1.getCompositions)(realServeUrl, {
42
+ const compositions = await renderer_1.RenderInternals.internalGetCompositions({
43
+ serveUrlOrWebpackUrl: realServeUrl,
43
44
  puppeteerInstance: browserInstance,
44
45
  inputProps,
45
- envVariables: lambdaParams.envVariables,
46
+ envVariables: (_d = lambdaParams.envVariables) !== null && _d !== void 0 ? _d : {},
46
47
  timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
47
48
  chromiumOptions: lambdaParams.chromiumOptions,
48
49
  port: null,
49
- downloadMap,
50
+ server: undefined,
51
+ verbose,
52
+ indent: false,
53
+ browserExecutable: null,
54
+ onBrowserLog: null,
50
55
  });
51
- renderer_1.RenderInternals.cleanDownloadMap(downloadMap);
52
56
  return Promise.resolve({
53
57
  compositions,
54
58
  });
@@ -1,7 +1,7 @@
1
1
  import type { AwsRegion } from '../..';
2
2
  import type { CustomCredentials } from '../../shared/aws-clients';
3
3
  import type { RenderMetadata } from '../../shared/constants';
4
- export declare type OutputFileMetadata = {
4
+ export type OutputFileMetadata = {
5
5
  url: string;
6
6
  size: number;
7
7
  lastModified: number;
@@ -1,3 +1,2 @@
1
- import type { ChromiumOptions } from '@remotion/renderer';
2
- import { openBrowser } from '@remotion/renderer';
1
+ import type { ChromiumOptions, openBrowser } from '@remotion/renderer';
3
2
  export declare const getBrowserInstance: (shouldDumpIo: boolean, chromiumOptions: ChromiumOptions) => ReturnType<typeof openBrowser>;
@@ -38,11 +38,14 @@ const getBrowserInstance = async (shouldDumpIo, chromiumOptions) => {
38
38
  // Override the `null` value, which might come from CLI with swANGLE
39
39
  gl: (_a = chromiumOptions.gl) !== null && _a !== void 0 ? _a : 'swangle',
40
40
  };
41
- _browserInstance = await (0, renderer_1.openBrowser)('chrome', {
41
+ _browserInstance = await renderer_1.RenderInternals.internalOpenBrowser({
42
+ browser: 'chrome',
42
43
  browserExecutable: execPath,
43
44
  shouldDumpIo,
44
45
  chromiumOptions: actualChromiumOptions,
46
+ forceDeviceScaleFactor: undefined,
45
47
  indent: false,
48
+ viewport: null,
46
49
  });
47
50
  _browserInstance.on('disconnected', () => {
48
51
  console.log('Browser disconnected / crashed');
@@ -1,4 +1,4 @@
1
- export declare type FileNameAndSize = {
1
+ export type FileNameAndSize = {
2
2
  filename: string;
3
3
  size: number;
4
4
  };
@@ -1,4 +1,4 @@
1
- export declare type CleanupJob = {
1
+ export type CleanupJob = {
2
2
  name: string;
3
3
  type: 'exact' | 'prefix';
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import type { _Object } from '@aws-sdk/client-s3';
2
- export declare type LambdaInvokeStats = {
2
+ export type LambdaInvokeStats = {
3
3
  lambdasInvoked: number;
4
4
  };
5
5
  export declare const getLambdasInvokedStats: ({ contents, renderId, }: {
@@ -1,5 +1,5 @@
1
1
  import type { _Object } from '@aws-sdk/client-s3';
2
- export declare type ChunkRetry = {
2
+ export type ChunkRetry = {
3
3
  chunk: number;
4
4
  attempt: number;
5
5
  time: number;
@@ -6,14 +6,14 @@ import type { AwsRegion } from '../../pricing/aws-regions';
6
6
  import type { CustomCredentials } from '../../shared/aws-clients';
7
7
  import type { Privacy } from '../../shared/constants';
8
8
  import type { DownloadBehavior } from '../../shared/content-disposition-header';
9
- export declare type LambdaLSInput = {
9
+ export type LambdaLSInput = {
10
10
  bucketName: string;
11
11
  prefix: string;
12
12
  region: AwsRegion;
13
13
  expectedBucketOwner: string | null;
14
14
  continuationToken?: string;
15
15
  };
16
- export declare type LambdaLsReturnType = Promise<_Object[]>;
16
+ export type LambdaLsReturnType = Promise<_Object[]>;
17
17
  export declare const lambdaLs: ({ bucketName, prefix, region, expectedBucketOwner, continuationToken, }: LambdaLSInput) => LambdaLsReturnType;
18
18
  export declare const lambdaDeleteFile: ({ bucketName, key, region, customCredentials, }: {
19
19
  region: AwsRegion;
@@ -21,7 +21,7 @@ export declare const lambdaDeleteFile: ({ bucketName, key, region, customCredent
21
21
  key: string;
22
22
  customCredentials: CustomCredentials | null;
23
23
  }) => Promise<void>;
24
- declare type LambdaWriteFileInput = {
24
+ type LambdaWriteFileInput = {
25
25
  bucketName: string;
26
26
  key: string;
27
27
  body: ReadStream | string;
@@ -1,6 +1,6 @@
1
1
  import type { AwsRegion } from '../../pricing/aws-regions';
2
2
  import type { CustomCredentials } from '../../shared/aws-clients';
3
- export declare type LambdaReadFileProgress = (progress: {
3
+ export type LambdaReadFileProgress = (progress: {
4
4
  totalSize: number;
5
5
  downloaded: number;
6
6
  percent: number;