@remotion/lambda-client 4.0.363 → 4.0.365

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 (168) hide show
  1. package/dist/cjs/app-router-webhook.d.ts +10 -0
  2. package/dist/cjs/apply-lifecycle.d.ts +8 -0
  3. package/dist/cjs/aws-clients.d.ts +12 -0
  4. package/dist/cjs/aws-provider.d.ts +27 -0
  5. package/dist/cjs/bucket-exists.d.ts +3 -0
  6. package/dist/cjs/call-lambda-async.d.ts +2 -0
  7. package/dist/cjs/call-lambda-streaming.d.ts +6 -0
  8. package/dist/cjs/call-lambda-sync.d.ts +2 -0
  9. package/dist/cjs/check-credentials.d.ts +1 -0
  10. package/dist/cjs/clean-items.d.ts +17 -0
  11. package/dist/cjs/constants.d.ts +25 -0
  12. package/dist/cjs/constants.js +75 -0
  13. package/dist/cjs/content-disposition-header.d.ts +2 -0
  14. package/dist/cjs/convert-to-serve-url.d.ts +6 -0
  15. package/dist/cjs/create-bucket.d.ts +3 -0
  16. package/dist/cjs/delete-file.d.ts +3 -0
  17. package/dist/cjs/delete-function.d.ts +7 -0
  18. package/dist/cjs/delete-render.d.ts +22 -0
  19. package/dist/cjs/encode-aws-url-params.d.ts +1 -0
  20. package/dist/cjs/estimate-price.d.ts +17 -0
  21. package/dist/cjs/express-webhook.d.ts +3 -0
  22. package/dist/cjs/get-account-id.d.ts +3 -0
  23. package/dist/cjs/get-aws-client.d.ts +32 -0
  24. package/dist/cjs/get-aws-urls.d.ts +25 -0
  25. package/dist/cjs/get-buckets.d.ts +9 -0
  26. package/dist/cjs/get-compositions-on-lambda.d.ts +20 -0
  27. package/dist/cjs/get-credentials.d.ts +9 -0
  28. package/dist/cjs/get-env-variable.d.ts +1 -0
  29. package/dist/cjs/get-function-name.d.ts +8 -0
  30. package/dist/cjs/get-function-version.d.ts +9 -0
  31. package/dist/cjs/get-functions.d.ts +10 -0
  32. package/dist/cjs/get-output-url-from-metadata.d.ts +3 -0
  33. package/dist/cjs/get-render-progress.d.ts +17 -0
  34. package/dist/cjs/get-s3-client.d.ts +11 -0
  35. package/dist/cjs/get-service-client.d.ts +25 -0
  36. package/dist/cjs/get-sites.d.ts +31 -0
  37. package/dist/cjs/head-file.d.ts +3 -0
  38. package/dist/cjs/index.d.ts +129 -0
  39. package/dist/cjs/index.js +72692 -0
  40. package/dist/cjs/is-cli.d.ts +2 -0
  41. package/dist/cjs/is-flaky-error.d.ts +1 -0
  42. package/dist/cjs/is-in-lambda.d.ts +1 -0
  43. package/dist/cjs/is-likely-to-have-aws-profile.d.ts +1 -0
  44. package/dist/cjs/lambda-version-string.d.ts +1 -0
  45. package/dist/cjs/lifecycle-rules.d.ts +12 -0
  46. package/dist/cjs/lifecycle.d.ts +7 -0
  47. package/dist/cjs/list-objects.d.ts +3 -0
  48. package/dist/cjs/make-lambda-payload.d.ts +59 -0
  49. package/dist/cjs/make-s3-url.d.ts +6 -0
  50. package/dist/cjs/p-limit.d.ts +1 -0
  51. package/dist/cjs/pages-router-webhook.d.ts +5 -0
  52. package/dist/cjs/parse-function-name.d.ts +8 -0
  53. package/dist/cjs/presign-url.d.ts +17 -0
  54. package/dist/cjs/price-per-1s.d.ts +37 -0
  55. package/dist/cjs/random-hash.d.ts +1 -0
  56. package/dist/cjs/read-file.d.ts +11 -0
  57. package/dist/cjs/regions.d.ts +3 -0
  58. package/dist/cjs/regions.js +80 -0
  59. package/dist/cjs/render-media-on-lambda.d.ts +66 -0
  60. package/dist/cjs/render-still-on-lambda.d.ts +61 -0
  61. package/dist/cjs/runtime-preference.d.ts +2 -0
  62. package/dist/cjs/speculate-function-name.d.ts +7 -0
  63. package/dist/cjs/types.d.ts +4 -0
  64. package/dist/cjs/validate-aws-region.d.ts +2 -0
  65. package/dist/cjs/validate-bucketname.d.ts +4 -0
  66. package/dist/cjs/validate-disk-size-in-mb.d.ts +1 -0
  67. package/dist/cjs/validate-lambda-codec.d.ts +2 -0
  68. package/dist/cjs/validate-memory-size.d.ts +1 -0
  69. package/dist/cjs/validate-presign-expiration.d.ts +1 -0
  70. package/dist/cjs/validate-serveurl.d.ts +1 -0
  71. package/dist/cjs/validate-webhook-signature.d.ts +5 -0
  72. package/dist/cjs/write-file.d.ts +5 -0
  73. package/dist/esm/index.mjs +64284 -13659
  74. package/package.json +15 -16
  75. package/.turbo/turbo-formatting.log +0 -4
  76. package/.turbo/turbo-lint.log +0 -25
  77. package/.turbo/turbo-make.log +0 -3
  78. package/bundle.ts +0 -24
  79. package/dist/test/concurrency-payload.test.d.ts +0 -1
  80. package/dist/test/concurrency-payload.test.js +0 -119
  81. package/dist/test/encode-aws-url.test.d.ts +0 -1
  82. package/dist/test/encode-aws-url.test.js +0 -8
  83. package/dist/test/price-calculation.test.d.ts +0 -1
  84. package/dist/test/price-calculation.test.js +0 -62
  85. package/dist/test/pricing.test.d.ts +0 -1
  86. package/dist/test/pricing.test.js +0 -27
  87. package/dist/test/request-handler.test.d.ts +0 -1
  88. package/dist/test/request-handler.test.js +0 -36
  89. package/dist/test/validate-disk-size-in-mb.test.d.ts +0 -1
  90. package/dist/test/validate-disk-size-in-mb.test.js +0 -14
  91. package/eslint.config.mjs +0 -5
  92. package/src/app-router-webhook.ts +0 -73
  93. package/src/apply-lifecycle.ts +0 -30
  94. package/src/aws-clients.ts +0 -75
  95. package/src/aws-provider.ts +0 -139
  96. package/src/bucket-exists.ts +0 -35
  97. package/src/call-lambda-async.ts +0 -43
  98. package/src/call-lambda-streaming.ts +0 -226
  99. package/src/call-lambda-sync.ts +0 -59
  100. package/src/check-credentials.ts +0 -51
  101. package/src/clean-items.ts +0 -50
  102. package/src/constants.ts +0 -38
  103. package/src/content-disposition-header.ts +0 -64
  104. package/src/convert-to-serve-url.ts +0 -24
  105. package/src/create-bucket.ts +0 -87
  106. package/src/delete-file.ts +0 -38
  107. package/src/delete-function.ts +0 -28
  108. package/src/delete-render.ts +0 -114
  109. package/src/encode-aws-url-params.ts +0 -3
  110. package/src/estimate-price.ts +0 -95
  111. package/src/express-webhook.ts +0 -57
  112. package/src/get-account-id.ts +0 -22
  113. package/src/get-aws-client.ts +0 -63
  114. package/src/get-aws-urls.ts +0 -85
  115. package/src/get-buckets.ts +0 -84
  116. package/src/get-compositions-on-lambda.ts +0 -111
  117. package/src/get-credentials.ts +0 -81
  118. package/src/get-env-variable.ts +0 -15
  119. package/src/get-function-name.ts +0 -24
  120. package/src/get-function-version.ts +0 -49
  121. package/src/get-functions.ts +0 -114
  122. package/src/get-output-url-from-metadata.ts +0 -23
  123. package/src/get-render-progress.ts +0 -66
  124. package/src/get-s3-client.ts +0 -26
  125. package/src/get-service-client.ts +0 -195
  126. package/src/get-sites.ts +0 -136
  127. package/src/head-file.ts +0 -30
  128. package/src/index.ts +0 -152
  129. package/src/is-cli.ts +0 -7
  130. package/src/is-flaky-error.ts +0 -104
  131. package/src/is-in-lambda.ts +0 -5
  132. package/src/is-likely-to-have-aws-profile.ts +0 -55
  133. package/src/lambda-version-string.ts +0 -5
  134. package/src/lifecycle-rules.ts +0 -119
  135. package/src/lifecycle.ts +0 -44
  136. package/src/list-objects.ts +0 -87
  137. package/src/make-lambda-payload.ts +0 -328
  138. package/src/make-s3-url.ts +0 -13
  139. package/src/p-limit.ts +0 -75
  140. package/src/pages-router-webhook.ts +0 -68
  141. package/src/parse-function-name.ts +0 -24
  142. package/src/presign-url.ts +0 -121
  143. package/src/price-per-1s.ts +0 -863
  144. package/src/random-hash.ts +0 -10
  145. package/src/read-file.ts +0 -35
  146. package/src/regions.ts +0 -48
  147. package/src/render-media-on-lambda.ts +0 -227
  148. package/src/render-still-on-lambda.ts +0 -209
  149. package/src/runtime-preference.ts +0 -7
  150. package/src/speculate-function-name.ts +0 -60
  151. package/src/test/concurrency-payload.test.ts +0 -121
  152. package/src/test/encode-aws-url.test.ts +0 -7
  153. package/src/test/price-calculation.test.ts +0 -62
  154. package/src/test/pricing.test.ts +0 -32
  155. package/src/test/request-handler.test.ts +0 -42
  156. package/src/test/validate-disk-size-in-mb.test.ts +0 -15
  157. package/src/types.ts +0 -7
  158. package/src/validate-aws-region.ts +0 -14
  159. package/src/validate-bucketname.ts +0 -24
  160. package/src/validate-disk-size-in-mb.ts +0 -37
  161. package/src/validate-lambda-codec.ts +0 -28
  162. package/src/validate-memory-size.ts +0 -31
  163. package/src/validate-presign-expiration.ts +0 -46
  164. package/src/validate-serveurl.ts +0 -9
  165. package/src/validate-webhook-signature.ts +0 -42
  166. package/src/write-file.ts +0 -108
  167. package/tsconfig.json +0 -9
  168. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,2 @@
1
+ export declare const getIsCli: () => boolean;
2
+ export declare const setIsCli: (cli: boolean) => void;
@@ -0,0 +1 @@
1
+ export declare const isFlakyError: (err: Error) => boolean;
@@ -0,0 +1 @@
1
+ export declare const isInsideLambda: () => boolean;
@@ -0,0 +1 @@
1
+ export declare const isLikelyToHaveAwsProfile: () => boolean;
@@ -0,0 +1 @@
1
+ export declare const LAMBDA_VERSION_STRING: string;
@@ -0,0 +1,12 @@
1
+ import type { CustomCredentials } from '@remotion/serverless-client';
2
+ import type { AwsProvider } from './aws-provider';
3
+ import type { AwsRegion } from './regions';
4
+ import type { RequestHandler } from './types';
5
+ export declare const applyLifeCyleOperation: ({ enableFolderExpiry, bucketName, region, customCredentials, forcePathStyle, requestHandler, }: {
6
+ enableFolderExpiry: boolean | null;
7
+ bucketName: string;
8
+ region: AwsRegion;
9
+ customCredentials: CustomCredentials<AwsProvider> | null;
10
+ forcePathStyle: boolean;
11
+ requestHandler: RequestHandler | null;
12
+ }) => Promise<void>;
@@ -0,0 +1,7 @@
1
+ import type { LifecycleRule } from '@aws-sdk/client-s3';
2
+ import type { CloudProvider, DeleteAfter, ProviderSpecifics } from '@remotion/serverless-client';
3
+ export declare const getLifeCycleRules: () => LifecycleRule[];
4
+ export declare const generateRandomHashWithLifeCycleRule: <Provider extends CloudProvider>({ deleteAfter, randomHashFn, }: {
5
+ deleteAfter: DeleteAfter | null;
6
+ randomHashFn: ProviderSpecifics<Provider>["randomHash"];
7
+ }) => string;
@@ -0,0 +1,3 @@
1
+ import type { ProviderSpecifics } from '@remotion/serverless-client';
2
+ import type { AwsProvider } from './aws-provider';
3
+ export declare const lambdaLsImplementation: ProviderSpecifics<AwsProvider>['listObjects'];
@@ -0,0 +1,59 @@
1
+ import type { AudioCodec, BrowserSafeApis, ChromiumOptions, ColorSpace, DeleteAfter, DownloadBehavior, FrameRange, LogLevel, OutNameInput, PixelFormat, Privacy, ProResProfile, ServerlessCodec, ServerlessPayloads, ServerlessStartPayload, ServerlessStatusPayload, ToOptions, VideoImageFormat, WebhookOption, X264Preset } from '@remotion/serverless-client';
2
+ import { ServerlessRoutines } from '@remotion/serverless-client';
3
+ import type { AwsProvider } from './aws-provider';
4
+ import type { StorageClass } from '@aws-sdk/client-s3';
5
+ import type { GetRenderProgressInput } from './get-render-progress';
6
+ import type { AwsRegion } from './regions';
7
+ import type { RenderStillOnLambdaNonNullInput } from './render-still-on-lambda';
8
+ import type { RequestHandler } from './types';
9
+ export type InnerRenderMediaOnLambdaInput = {
10
+ region: AwsRegion;
11
+ functionName: string;
12
+ serveUrl: string;
13
+ composition: string;
14
+ inputProps: Record<string, unknown>;
15
+ codec: ServerlessCodec;
16
+ imageFormat: VideoImageFormat;
17
+ crf: number | undefined;
18
+ envVariables: Record<string, string>;
19
+ pixelFormat: PixelFormat | undefined;
20
+ proResProfile: ProResProfile | undefined;
21
+ x264Preset: X264Preset | null;
22
+ privacy: Privacy;
23
+ jpegQuality: number;
24
+ maxRetries: number;
25
+ framesPerLambda: number | null;
26
+ concurrency: number | null;
27
+ logLevel: LogLevel;
28
+ frameRange: FrameRange | null;
29
+ outName: OutNameInput<AwsProvider> | null;
30
+ timeoutInMilliseconds: number;
31
+ chromiumOptions: ChromiumOptions;
32
+ scale: number;
33
+ everyNthFrame: number;
34
+ numberOfGifLoops: number | null;
35
+ concurrencyPerLambda: number;
36
+ downloadBehavior: DownloadBehavior;
37
+ muted: boolean;
38
+ overwrite: boolean;
39
+ audioBitrate: string | null;
40
+ videoBitrate: string | null;
41
+ encodingMaxRate: string | null;
42
+ encodingBufferSize: string | null;
43
+ webhook: WebhookOption | null;
44
+ forceWidth: number | null;
45
+ forceHeight: number | null;
46
+ rendererFunctionName: string | null;
47
+ forceBucketName: string | null;
48
+ audioCodec: AudioCodec | null;
49
+ colorSpace: ColorSpace | null;
50
+ deleteAfter: DeleteAfter | null;
51
+ indent: boolean;
52
+ forcePathStyle: boolean;
53
+ metadata: Record<string, string> | null;
54
+ storageClass: StorageClass | null;
55
+ requestHandler: RequestHandler | null;
56
+ } & ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>;
57
+ export declare const makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, concurrency, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, mediaCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, forcePathStyle, metadata, apiKey, offthreadVideoThreads, storageClass, requestHandler, }: InnerRenderMediaOnLambdaInput) => Promise<ServerlessStartPayload<AwsProvider>>;
58
+ export declare const getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, forcePathStyle, }: GetRenderProgressInput) => ServerlessStatusPayload<AwsProvider>;
59
+ export declare const makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, apiKey, storageClass, requestHandler, offthreadVideoThreads, mediaCacheSizeInBytes, }: RenderStillOnLambdaNonNullInput) => Promise<ServerlessPayloads<AwsProvider>[ServerlessRoutines.still]>;
@@ -0,0 +1,6 @@
1
+ import type { AwsRegion } from './regions';
2
+ export declare const makeS3ServeUrl: ({ bucketName, subFolder, region, }: {
3
+ bucketName: string;
4
+ subFolder: string;
5
+ region: AwsRegion;
6
+ }) => string;
@@ -0,0 +1 @@
1
+ export declare const pLimit: (concurrency: number) => <Arguments extends unknown[], ReturnType>(fn: (..._arguments: Arguments) => PromiseLike<ReturnType> | ReturnType, ...args: Arguments) => Promise<ReturnType>;
@@ -0,0 +1,5 @@
1
+ import type { Response } from 'express';
2
+ import type { NextApiRequest, NextApiResponse } from 'next';
3
+ import type { NextWebhookArgs } from './app-router-webhook';
4
+ export declare const addHeaders: (res: NextApiResponse | Response, headers: Record<string, string>) => void;
5
+ export declare const pagesRouterWebhook: (options: NextWebhookArgs) => (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ type ReturnType = {
2
+ version: string;
3
+ memorySizeInMb: number;
4
+ diskSizeInMb: number;
5
+ timeoutInSeconds: number;
6
+ };
7
+ export declare const parseFunctionName: (functionName: string) => ReturnType | null;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { AwsRegion } from './regions';
2
+ import type { RequestHandler } from './types';
3
+ type MandatoryParameters = {
4
+ region: AwsRegion;
5
+ bucketName: string;
6
+ objectKey: string;
7
+ expiresInSeconds: number;
8
+ };
9
+ type OptionalParameters<CheckIfObjectExists extends boolean> = {
10
+ checkIfObjectExists: CheckIfObjectExists;
11
+ forcePathStyle: boolean;
12
+ };
13
+ export type PresignUrlInput<CheckIfObjectExists extends boolean = boolean> = MandatoryParameters & Partial<OptionalParameters<CheckIfObjectExists>> & {
14
+ requestHandler?: RequestHandler;
15
+ };
16
+ export declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, forcePathStyle, requestHandler, }: PresignUrlInput<CheckIfObjectExists>) => Promise<CheckIfObjectExists extends true ? string | null : string>;
17
+ export {};
@@ -0,0 +1,37 @@
1
+ import type { AwsRegion } from './regions';
2
+ export declare const pricing: {
3
+ [key in AwsRegion]: {
4
+ 'Lambda Duration': {
5
+ rateCode: string;
6
+ price: string;
7
+ };
8
+ 'Lambda Duration-Provisioned': {
9
+ rateCode: string;
10
+ price: string;
11
+ };
12
+ 'Lambda Provisioned-Concurrency': {
13
+ rateCode: string;
14
+ price: string;
15
+ };
16
+ 'Lambda Requests': {
17
+ rateCode: string;
18
+ price: string;
19
+ };
20
+ 'Lambda Duration-ARM': {
21
+ rateCode: string;
22
+ price: string;
23
+ };
24
+ 'Lambda Requests-ARM': {
25
+ rateCode: string;
26
+ price: string;
27
+ };
28
+ 'Lambda Storage-Duration': {
29
+ rateCode: string;
30
+ price: string;
31
+ };
32
+ 'Lambda Storage-Duration-ARM': {
33
+ rateCode: string;
34
+ price: string;
35
+ };
36
+ };
37
+ };
@@ -0,0 +1 @@
1
+ export declare const randomHashImplementation: () => string;
@@ -0,0 +1,11 @@
1
+ import type { Readable } from 'stream';
2
+ import type { AwsRegion } from './regions';
3
+ import type { RequestHandler } from './types';
4
+ export declare const lambdaReadFileImplementation: ({ bucketName, key, region, expectedBucketOwner, forcePathStyle, requestHandler, }: {
5
+ bucketName: string;
6
+ key: string;
7
+ region: AwsRegion;
8
+ expectedBucketOwner: string | null;
9
+ forcePathStyle: boolean;
10
+ requestHandler: RequestHandler | null;
11
+ }) => Promise<Readable>;
@@ -0,0 +1,3 @@
1
+ export declare const DEFAULT_AWS_REGIONS: readonly ["eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "eu-north-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ca-central-1", "sa-east-1"];
2
+ export declare const AWS_REGIONS: readonly ["eu-central-1", "eu-central-2", "eu-west-1", "eu-west-2", "eu-west-3", "eu-south-1", "eu-north-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-south-1", "ap-east-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-4", "ap-southeast-5", "ca-central-1", "me-south-1", "sa-east-1"];
3
+ export type AwsRegion = (typeof AWS_REGIONS)[number];
@@ -0,0 +1,80 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
6
+ var __toCommonJS = (from) => {
7
+ var entry = __moduleCache.get(from), desc;
8
+ if (entry)
9
+ return entry;
10
+ entry = __defProp({}, "__esModule", { value: true });
11
+ if (from && typeof from === "object" || typeof from === "function")
12
+ __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ }));
16
+ __moduleCache.set(from, entry);
17
+ return entry;
18
+ };
19
+ var __export = (target, all) => {
20
+ for (var name in all)
21
+ __defProp(target, name, {
22
+ get: all[name],
23
+ enumerable: true,
24
+ configurable: true,
25
+ set: (newValue) => all[name] = () => newValue
26
+ });
27
+ };
28
+
29
+ // src/regions.ts
30
+ var exports_regions = {};
31
+ __export(exports_regions, {
32
+ DEFAULT_AWS_REGIONS: () => DEFAULT_AWS_REGIONS,
33
+ AWS_REGIONS: () => AWS_REGIONS
34
+ });
35
+ module.exports = __toCommonJS(exports_regions);
36
+ var DEFAULT_AWS_REGIONS = [
37
+ "eu-central-1",
38
+ "eu-west-1",
39
+ "eu-west-2",
40
+ "eu-west-3",
41
+ "eu-north-1",
42
+ "us-east-1",
43
+ "us-east-2",
44
+ "us-west-1",
45
+ "us-west-2",
46
+ "ap-south-1",
47
+ "ap-southeast-1",
48
+ "ap-southeast-2",
49
+ "ap-northeast-1",
50
+ "ap-northeast-2",
51
+ "ap-northeast-3",
52
+ "ca-central-1",
53
+ "sa-east-1"
54
+ ];
55
+ var AWS_REGIONS = [
56
+ "eu-central-1",
57
+ "eu-central-2",
58
+ "eu-west-1",
59
+ "eu-west-2",
60
+ "eu-west-3",
61
+ "eu-south-1",
62
+ "eu-north-1",
63
+ "us-east-1",
64
+ "us-east-2",
65
+ "us-west-1",
66
+ "us-west-2",
67
+ "af-south-1",
68
+ "ap-south-1",
69
+ "ap-east-1",
70
+ "ap-southeast-1",
71
+ "ap-southeast-2",
72
+ "ap-northeast-1",
73
+ "ap-northeast-2",
74
+ "ap-northeast-3",
75
+ "ap-southeast-4",
76
+ "ap-southeast-5",
77
+ "ca-central-1",
78
+ "me-south-1",
79
+ "sa-east-1"
80
+ ];
@@ -0,0 +1,66 @@
1
+ import type { StorageClass } from '@aws-sdk/client-s3';
2
+ import type { AudioCodec, BrowserSafeApis, ChromiumOptions, DownloadBehavior, FrameRange, OutNameInput, PixelFormat, Privacy, ProResProfile, ServerlessCodec, ToOptions, VideoImageFormat, WebhookOption } from '@remotion/serverless-client';
3
+ import { type AwsProvider } from './aws-provider';
4
+ import type { InnerRenderMediaOnLambdaInput } from './make-lambda-payload';
5
+ import type { AwsRegion } from './regions';
6
+ import type { RequestHandler } from './types';
7
+ export type RenderMediaOnLambdaInput = {
8
+ region: AwsRegion;
9
+ functionName: string;
10
+ serveUrl: string;
11
+ composition: string;
12
+ inputProps?: Record<string, unknown>;
13
+ codec: ServerlessCodec;
14
+ imageFormat?: VideoImageFormat;
15
+ crf?: number | undefined;
16
+ envVariables?: Record<string, string>;
17
+ pixelFormat?: PixelFormat;
18
+ proResProfile?: ProResProfile;
19
+ privacy?: Privacy;
20
+ /**
21
+ * @deprecated Renamed to `jpegQuality`
22
+ */
23
+ quality?: never;
24
+ jpegQuality?: number;
25
+ maxRetries?: number;
26
+ framesPerLambda?: number;
27
+ concurrency?: number;
28
+ frameRange?: FrameRange;
29
+ outName?: OutNameInput<AwsProvider>;
30
+ chromiumOptions?: Omit<ChromiumOptions, 'enableMultiProcessOnLinux'>;
31
+ scale?: number;
32
+ everyNthFrame?: number;
33
+ concurrencyPerLambda?: number;
34
+ downloadBehavior?: DownloadBehavior | null;
35
+ overwrite?: boolean;
36
+ webhook?: WebhookOption | null;
37
+ forceWidth?: number | null;
38
+ forceHeight?: number | null;
39
+ rendererFunctionName?: string | null;
40
+ forceBucketName?: string;
41
+ audioCodec?: AudioCodec | null;
42
+ /**
43
+ * @deprecated in favor of `logLevel`: true
44
+ */
45
+ dumpBrowserLogs?: boolean;
46
+ forcePathStyle?: boolean;
47
+ metadata?: Record<string, string> | null;
48
+ storageClass?: StorageClass | null;
49
+ requestHandler?: RequestHandler;
50
+ } & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>>;
51
+ export type RenderMediaOnLambdaOutput = {
52
+ renderId: string;
53
+ bucketName: string;
54
+ cloudWatchLogs: string;
55
+ cloudWatchMainLogs: string;
56
+ lambdaInsightsLogs: string;
57
+ folderInS3Console: string;
58
+ progressJsonInConsole: string;
59
+ };
60
+ export declare const internalRenderMediaOnLambdaRaw: (input: InnerRenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
61
+ export declare const renderMediaOnLambdaOptionalToRequired: (options: RenderMediaOnLambdaInput) => InnerRenderMediaOnLambdaInput;
62
+ export declare const renderMediaOnLambda: (options: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
63
+ /**
64
+ * @deprecated Renamed to renderMediaOnLambda()
65
+ */
66
+ export declare const renderVideoOnLambda: (options: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
@@ -0,0 +1,61 @@
1
+ import type { BrowserSafeApis, ChromiumOptions, DownloadBehavior, StillImageFormat, ToOptions } from '@remotion/serverless-client';
2
+ import type { StorageClass } from '@aws-sdk/client-s3';
3
+ import type { CostsInfo, OutNameInput, Privacy, ReceivedArtifact } from '@remotion/serverless-client';
4
+ import { type AwsProvider } from './aws-provider';
5
+ import type { AwsRegion } from './regions';
6
+ import type { RequestHandler } from './types';
7
+ type MandatoryParameters = {
8
+ region: AwsRegion;
9
+ functionName: string;
10
+ serveUrl: string;
11
+ composition: string;
12
+ inputProps: Record<string, unknown>;
13
+ imageFormat: StillImageFormat;
14
+ privacy: Privacy;
15
+ };
16
+ type OptionalParameters = {
17
+ maxRetries: number;
18
+ envVariables: Record<string, string>;
19
+ frame: number;
20
+ outName: OutNameInput<AwsProvider> | null;
21
+ chromiumOptions: ChromiumOptions;
22
+ downloadBehavior: DownloadBehavior;
23
+ forceWidth: number | null;
24
+ forceHeight: number | null;
25
+ forceBucketName: string | null;
26
+ onInit: (data: {
27
+ renderId: string;
28
+ cloudWatchLogs: string;
29
+ lambdaInsightsUrl: string;
30
+ }) => void;
31
+ indent: boolean;
32
+ forcePathStyle: boolean;
33
+ storageClass: StorageClass | null;
34
+ requestHandler: RequestHandler | null | undefined;
35
+ } & ToOptions<typeof BrowserSafeApis.optionsMap.renderStillOnLambda>;
36
+ export type RenderStillOnLambdaNonNullInput = MandatoryParameters & OptionalParameters;
37
+ export type RenderStillOnLambdaInput = MandatoryParameters & Partial<OptionalParameters> & {
38
+ requestHandler?: RequestHandler;
39
+ };
40
+ export type RenderStillOnLambdaOutput = {
41
+ estimatedPrice: CostsInfo;
42
+ url: string;
43
+ outKey: string;
44
+ sizeInBytes: number;
45
+ bucketName: string;
46
+ renderId: string;
47
+ cloudWatchLogs: string;
48
+ artifacts: ReceivedArtifact<AwsProvider>[];
49
+ };
50
+ export declare const internalRenderStillOnLambda: (input: RenderStillOnLambdaNonNullInput) => Promise<RenderStillOnLambdaOutput>;
51
+ export declare const renderStillOnLambda: (input: RenderStillOnLambdaInput & {
52
+ /**
53
+ * @deprecated Renamed to `jpegQuality`
54
+ */
55
+ quality?: never;
56
+ /**
57
+ * @deprecated Renamed to `logLevel`
58
+ */
59
+ dumpBrowserLogs?: boolean;
60
+ }) => Promise<RenderStillOnLambdaOutput>;
61
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const runtimePreferenceOptions: readonly ["default", "apple-emojis", "cjk"];
2
+ export type RuntimePreference = (typeof runtimePreferenceOptions)[number];
@@ -0,0 +1,7 @@
1
+ export type SpeculateFunctionNameInput = {
2
+ memorySizeInMb: string | number;
3
+ diskSizeInMb: string | number;
4
+ timeoutInSeconds: string | number;
5
+ };
6
+ export declare const innerSpeculateFunctionName: ({ diskSizeInMb, memorySizeInMb, timeoutInSeconds, }: SpeculateFunctionNameInput) => string;
7
+ export declare const speculateFunctionName: ({ memorySizeInMb, diskSizeInMb, timeoutInSeconds, }: SpeculateFunctionNameInput) => string;
@@ -0,0 +1,4 @@
1
+ import type { LambdaClient } from '@aws-sdk/client-lambda';
2
+ type LambdaClientConfig = NonNullable<ConstructorParameters<typeof LambdaClient>[0]>;
3
+ export type RequestHandler = LambdaClientConfig['requestHandler'];
4
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { AwsRegion } from './regions';
2
+ export declare function validateAwsRegion(region: unknown): asserts region is AwsRegion;
@@ -0,0 +1,4 @@
1
+ import type { AwsRegion } from './regions';
2
+ export declare const parseBucketName: (name: string) => {
3
+ region: AwsRegion | null;
4
+ };
@@ -0,0 +1 @@
1
+ export declare const validateDiskSizeInMb: (diskSizeInMb: unknown) => void;
@@ -0,0 +1,2 @@
1
+ import type { ServerlessCodec } from '@remotion/serverless-client';
2
+ export declare const validateLambdaCodec: (codec: unknown) => ServerlessCodec;
@@ -0,0 +1 @@
1
+ export declare const validateMemorySize: (memorySizeInMb: unknown) => void;
@@ -0,0 +1 @@
1
+ export declare const validatePresignExpiration: (presignExpiration: unknown) => void;
@@ -0,0 +1 @@
1
+ export declare const validateServeUrl: (serveUrl: unknown) => void;
@@ -0,0 +1,5 @@
1
+ export declare const validateWebhookSignature: ({ secret, body, signatureHeader, }: {
2
+ secret: string;
3
+ body: unknown;
4
+ signatureHeader: string;
5
+ }) => void;
@@ -0,0 +1,5 @@
1
+ import type { WriteFileInput } from '@remotion/serverless-client';
2
+ import type { AwsProvider } from './aws-provider';
3
+ export declare const lambdaWriteFileImplementation: (params: WriteFileInput<AwsProvider> & {
4
+ retries?: number;
5
+ }) => Promise<void>;