@remotion/lambda 4.0.187 → 4.0.188
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.
- package/dist/api/__mocks__/clean-items.d.ts +2 -0
- package/dist/api/__mocks__/clean-items.js +24 -0
- package/dist/api/__mocks__/create-function.d.ts +2 -0
- package/dist/api/__mocks__/create-function.js +21 -0
- package/dist/api/__mocks__/delete-function.d.ts +2 -0
- package/dist/api/__mocks__/delete-function.js +9 -0
- package/dist/api/__mocks__/get-functions.d.ts +2 -0
- package/dist/api/__mocks__/get-functions.js +9 -0
- package/dist/api/__mocks__/upload-dir.d.ts +3 -0
- package/dist/api/__mocks__/upload-dir.js +47 -0
- package/dist/api/bucket-exists.d.ts +3 -6
- package/dist/api/bucket-exists.js +5 -5
- package/dist/api/clean-items.d.ts +4 -3
- package/dist/api/clean-items.js +7 -7
- package/dist/api/create-bucket.d.ts +3 -5
- package/dist/api/create-bucket.js +6 -6
- package/dist/api/create-function.d.ts +1 -1
- package/dist/api/delete-function.d.ts +1 -1
- package/dist/api/delete-render.d.ts +10 -3
- package/dist/api/delete-render.js +27 -19
- package/dist/api/delete-site.d.ts +7 -2
- package/dist/api/delete-site.js +23 -15
- package/dist/api/deploy-function.d.ts +1 -1
- package/dist/api/deploy-function.js +2 -2
- package/dist/api/deploy-site.d.ts +9 -5
- package/dist/api/deploy-site.js +11 -12
- package/dist/api/download-media.d.ts +8 -3
- package/dist/api/download-media.js +24 -15
- package/dist/api/estimate-price.d.ts +1 -1
- package/dist/api/get-aws-client.d.ts +4 -2
- package/dist/api/get-aws-client.js +2 -2
- package/dist/api/get-buckets.d.ts +4 -4
- package/dist/api/get-buckets.js +12 -14
- package/dist/api/get-compositions-on-lambda.js +7 -6
- package/dist/api/get-function-info.d.ts +1 -1
- package/dist/api/get-functions.d.ts +1 -1
- package/dist/api/get-or-create-bucket.d.ts +3 -19
- package/dist/api/get-or-create-bucket.js +5 -39
- package/dist/api/get-regions.d.ts +1 -1
- package/dist/api/get-regions.js +1 -2
- package/dist/api/get-render-progress.d.ts +4 -3
- package/dist/api/get-render-progress.js +2 -2
- package/dist/api/get-sites.d.ts +6 -1
- package/dist/api/get-sites.js +21 -14
- package/dist/api/iam-validation/role-permissions.js +2 -1
- package/dist/api/iam-validation/simulate-rule.d.ts +1 -1
- package/dist/api/iam-validation/simulate.d.ts +1 -1
- package/dist/api/iam-validation/user-permissions.js +2 -1
- package/dist/api/make-lambda-payload.d.ts +8 -9
- package/dist/api/make-lambda-payload.js +15 -13
- package/dist/api/mock-functions.d.ts +1 -1
- package/dist/api/presign-url.d.ts +1 -1
- package/dist/api/presign-url.js +4 -4
- package/dist/api/render-media-on-lambda.d.ts +5 -6
- package/dist/api/render-media-on-lambda.js +5 -5
- package/dist/api/render-still-on-lambda.d.ts +8 -6
- package/dist/api/render-still-on-lambda.js +6 -5
- package/dist/api/upload-dir.d.ts +2 -2
- package/dist/api/upload-dir.js +2 -2
- package/dist/cli/args.d.ts +2 -3
- package/dist/cli/commands/render/progress.d.ts +2 -2
- package/dist/cli/commands/render/progress.js +6 -5
- package/dist/cli/commands/render/render.d.ts +3 -1
- package/dist/cli/commands/render/render.js +3 -2
- package/dist/cli/commands/sites/create.d.ts +3 -1
- package/dist/cli/commands/sites/create.js +6 -5
- package/dist/cli/commands/sites/index.d.ts +3 -1
- package/dist/cli/commands/sites/index.js +4 -4
- package/dist/cli/commands/sites/rm.d.ts +3 -1
- package/dist/cli/commands/sites/rm.js +4 -3
- package/dist/cli/commands/sites/rmall.d.ts +3 -1
- package/dist/cli/commands/sites/rmall.js +4 -3
- package/dist/cli/commands/still.d.ts +3 -1
- package/dist/cli/commands/still.js +3 -2
- package/dist/cli/get-aws-region.d.ts +1 -1
- package/dist/cli/helpers/__mocks__/quit.d.ts +1 -0
- package/dist/cli/helpers/__mocks__/quit.js +7 -0
- package/dist/cli/index.d.ts +3 -1
- package/dist/cli/index.js +8 -7
- package/dist/client.d.ts +4 -5
- package/dist/functions/aws-implementation.d.ts +11 -0
- package/dist/functions/aws-implementation.js +49 -0
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
- package/dist/functions/compositions.d.ts +3 -2
- package/dist/functions/compositions.js +18 -15
- package/dist/functions/helpers/__mocks__/get-browser-instance.d.ts +3 -0
- package/dist/functions/helpers/__mocks__/get-browser-instance.js +12 -0
- package/dist/functions/helpers/__mocks__/leak-detection.d.ts +4 -0
- package/dist/functions/helpers/__mocks__/leak-detection.js +9 -0
- package/dist/functions/helpers/__mocks__/timer.d.ts +2 -0
- package/dist/functions/helpers/__mocks__/timer.js +10 -0
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +5 -3
- package/dist/functions/helpers/calculate-price-from-bucket.js +2 -3
- package/dist/functions/helpers/cleanup-props.d.ts +4 -2
- package/dist/functions/helpers/cleanup-props.js +5 -4
- package/dist/functions/helpers/concat-videos.d.ts +2 -2
- package/dist/functions/helpers/create-post-render-data.d.ts +8 -8
- package/dist/functions/helpers/create-post-render-data.js +1 -1
- package/dist/functions/helpers/expected-out-name.d.ts +4 -4
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts +8 -7
- package/dist/functions/helpers/find-output-file-in-bucket.js +5 -6
- package/dist/functions/helpers/get-browser-instance.d.ts +3 -2
- package/dist/functions/helpers/get-browser-instance.js +3 -4
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/get-current-region.js +3 -3
- package/dist/functions/helpers/get-custom-out-name.d.ts +5 -5
- package/dist/functions/helpers/get-folder-files.d.ts +2 -0
- package/dist/functions/helpers/get-folder-files.js +38 -0
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts +4 -3
- package/dist/functions/helpers/get-output-url-from-metadata.js +4 -5
- package/dist/functions/helpers/get-overall-progress-s3.d.ts +5 -4
- package/dist/functions/helpers/get-overall-progress-s3.js +5 -7
- package/dist/functions/helpers/get-progress.d.ts +8 -7
- package/dist/functions/helpers/get-progress.js +7 -5
- package/dist/functions/helpers/inspect-errors.d.ts +1 -1
- package/dist/functions/helpers/inspect-errors.js +4 -4
- package/dist/functions/helpers/io.d.ts +3 -36
- package/dist/functions/helpers/io.js +3 -104
- package/dist/functions/helpers/lifecycle.d.ts +3 -9
- package/dist/functions/helpers/lifecycle.js +6 -16
- package/dist/functions/helpers/make-aws-artifact.d.ts +3 -0
- package/dist/functions/helpers/make-aws-artifact.js +12 -0
- package/dist/functions/helpers/make-timeout-error.d.ts +5 -4
- package/dist/functions/helpers/make-timeout-error.js +2 -1
- package/dist/functions/helpers/make-timeout-message.d.ts +5 -3
- package/dist/functions/helpers/make-timeout-message.js +8 -9
- package/dist/functions/helpers/merge-chunks.d.ts +10 -10
- package/dist/functions/helpers/merge-chunks.js +7 -8
- package/dist/functions/helpers/overall-render-progress.d.ts +18 -23
- package/dist/functions/helpers/overall-render-progress.js +5 -5
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts +2 -2
- package/dist/functions/helpers/print-logging-helper.d.ts +4 -0
- package/dist/functions/helpers/print-logging-helper.js +12 -0
- package/dist/functions/helpers/read-with-progress.d.ts +4 -3
- package/dist/functions/helpers/read-with-progress.js +2 -2
- package/dist/functions/helpers/render-has-audio-video.d.ts +3 -2
- package/dist/functions/helpers/stream-renderer.d.ts +7 -4
- package/dist/functions/helpers/stream-renderer.js +11 -10
- package/dist/functions/helpers/streamify-response.d.ts +0 -20
- package/dist/functions/helpers/streamify-response.js +1 -62
- package/dist/functions/helpers/validate-composition.d.ts +5 -3
- package/dist/functions/helpers/validate-composition.js +2 -3
- package/dist/functions/index.d.ts +5 -3
- package/dist/functions/index.js +98 -72
- package/dist/functions/info.d.ts +1 -1
- package/dist/functions/info.js +2 -2
- package/dist/functions/launch.d.ts +3 -2
- package/dist/functions/launch.js +54 -41
- package/dist/functions/progress.d.ts +6 -3
- package/dist/functions/progress.js +5 -4
- package/dist/functions/provider-implementation.d.ts +0 -0
- package/dist/functions/provider-implementation.js +1 -0
- package/dist/functions/renderer.d.ts +9 -3
- package/dist/functions/renderer.js +30 -22
- package/dist/functions/start.d.ts +3 -2
- package/dist/functions/start.js +13 -16
- package/dist/functions/still.d.ts +8 -18
- package/dist/functions/still.js +47 -46
- package/dist/index.d.ts +4 -6
- package/dist/internals.d.ts +16 -14
- package/dist/io/delete-file.d.ts +3 -0
- package/dist/io/delete-file.js +12 -0
- package/dist/io/head-file.d.ts +3 -0
- package/dist/io/head-file.js +13 -0
- package/dist/io/list-objects.d.ts +3 -0
- package/dist/io/list-objects.js +58 -0
- package/dist/io/read-file.d.ts +9 -0
- package/dist/io/read-file.js +14 -0
- package/dist/io/write-file.d.ts +5 -0
- package/dist/io/write-file.js +51 -0
- package/dist/pricing/aws-regions.d.ts +0 -3
- package/dist/pricing/aws-regions.js +0 -44
- package/dist/pricing/price-per-1-s.d.ts +1 -1
- package/dist/regions.d.ts +3 -2
- package/dist/regions.js +43 -3
- package/dist/shared/__mocks__/aws-clients.d.ts +2 -0
- package/dist/shared/__mocks__/aws-clients.js +62 -0
- package/dist/shared/__mocks__/bundle-site.d.ts +2 -0
- package/dist/shared/__mocks__/bundle-site.js +32 -0
- package/dist/shared/__mocks__/check-credentials.d.ts +1 -0
- package/dist/shared/__mocks__/check-credentials.js +5 -0
- package/dist/shared/__mocks__/get-account-id.d.ts +2 -0
- package/dist/shared/__mocks__/get-account-id.js +11 -0
- package/dist/shared/__mocks__/read-dir.d.ts +2 -0
- package/dist/shared/__mocks__/read-dir.js +13 -0
- package/dist/shared/aws-clients.d.ts +6 -29
- package/dist/shared/aws-clients.js +7 -177
- package/dist/shared/call-lambda.d.ts +8 -9
- package/dist/shared/call-lambda.js +16 -3
- package/dist/shared/check-credentials.js +2 -2
- package/dist/shared/cleanup-serialized-input-props.d.ts +8 -6
- package/dist/shared/cleanup-serialized-input-props.js +7 -8
- package/dist/shared/compress-props.d.ts +8 -6
- package/dist/shared/compress-props.js +11 -14
- package/dist/shared/constants.d.ts +10 -288
- package/dist/shared/constants.js +1 -46
- package/dist/shared/content-disposition-header.d.ts +1 -6
- package/dist/shared/content-disposition-header.js +2 -2
- package/dist/shared/convert-to-serve-url.d.ts +2 -2
- package/dist/shared/convert-to-serve-url.js +3 -3
- package/dist/shared/get-account-id.d.ts +1 -1
- package/dist/shared/get-aws-urls.d.ts +2 -2
- package/dist/shared/get-credentials.d.ts +9 -0
- package/dist/shared/get-credentials.js +53 -0
- package/dist/shared/get-function-version.d.ts +1 -1
- package/dist/shared/get-function-version.js +2 -1
- package/dist/shared/get-s3-client.d.ts +5 -0
- package/dist/shared/get-s3-client.js +13 -0
- package/dist/shared/get-service-client.d.ts +22 -0
- package/dist/shared/get-service-client.js +117 -0
- package/dist/shared/hosted-layers.d.ts +1 -1
- package/dist/shared/invoke-webhook.d.ts +1 -1
- package/dist/shared/lambda-insights-extensions.d.ts +1 -1
- package/dist/shared/lifecycle-rules.d.ts +4 -3
- package/dist/shared/lifecycle-rules.js +3 -3
- package/dist/shared/make-s3-url.d.ts +1 -1
- package/dist/shared/random-hash.d.ts +1 -3
- package/dist/shared/random-hash.js +3 -4
- package/dist/shared/return-values.d.ts +10 -11
- package/dist/shared/validate-aws-region.d.ts +1 -1
- package/dist/shared/validate-aws-region.js +3 -3
- package/dist/shared/validate-bucketname.d.ts +0 -4
- package/dist/shared/validate-bucketname.js +3 -23
- package/dist/shared/validate-lambda-codec.d.ts +2 -4
- package/dist/shared/validate-lambda-codec.js +3 -13
- package/dist/shared/validate-outname.js +2 -2
- package/dist/shared/validate-privacy.d.ts +1 -1
- package/dist/shared/validate-webhook.d.ts +1 -1
- package/package.json +11 -9
- package/remotionlambda-arm64.zip +0 -0
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
3
|
+
import { type CustomCredentials } from '@remotion/serverless/client';
|
|
4
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
2
5
|
import type { LambdaReadFileProgress } from '../functions/helpers/read-with-progress';
|
|
3
|
-
import type { AwsRegion } from '../
|
|
4
|
-
import type { CustomCredentials } from '../shared/aws-clients';
|
|
6
|
+
import type { AwsRegion } from '../regions';
|
|
5
7
|
export type DownloadMediaInput = {
|
|
6
8
|
region: AwsRegion;
|
|
7
9
|
bucketName: string;
|
|
8
10
|
renderId: string;
|
|
9
11
|
outPath: string;
|
|
10
12
|
onProgress?: LambdaReadFileProgress;
|
|
11
|
-
customCredentials?: CustomCredentials
|
|
13
|
+
customCredentials?: CustomCredentials<AwsProvider>;
|
|
12
14
|
logLevel?: LogLevel;
|
|
13
15
|
};
|
|
14
16
|
export type DownloadMediaOutput = {
|
|
15
17
|
outputPath: string;
|
|
16
18
|
sizeInBytes: number;
|
|
17
19
|
};
|
|
20
|
+
export declare const internalDownloadMedia: (input: DownloadMediaInput & {
|
|
21
|
+
providerSpecifics: ProviderSpecifics<AwsProvider>;
|
|
22
|
+
}) => Promise<DownloadMediaOutput>;
|
|
18
23
|
/**
|
|
19
24
|
* @description Downloads a rendered video, audio or still to the disk of the machine this API is called from.
|
|
20
25
|
* @see [Documentation](https://remotion.dev/docs/lambda/downloadmedia)
|
|
@@ -3,25 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.downloadMedia = void 0;
|
|
6
|
+
exports.downloadMedia = exports.internalDownloadMedia = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
+
const client_1 = require("@remotion/serverless/client");
|
|
8
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
-
const
|
|
10
|
+
const aws_implementation_1 = require("../functions/aws-implementation");
|
|
10
11
|
const get_overall_progress_s3_1 = require("../functions/helpers/get-overall-progress-s3");
|
|
11
12
|
const read_with_progress_1 = require("../functions/helpers/read-with-progress");
|
|
12
13
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
13
|
-
|
|
14
|
-
* @description Downloads a rendered video, audio or still to the disk of the machine this API is called from.
|
|
15
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/downloadmedia)
|
|
16
|
-
* @param params.region The AWS region in which the media resides.
|
|
17
|
-
* @param params.bucketName The `bucketName` that was specified during the render.
|
|
18
|
-
* @param params.renderId The `renderId` that was obtained after triggering the render.
|
|
19
|
-
* @param params.outPath Where to save the media.
|
|
20
|
-
* @param params.onProgress Progress callback function - see docs for details.
|
|
21
|
-
* @param params.customCredentials If the file was saved to a foreign cloud, pass credentials for reading from it.
|
|
22
|
-
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
23
|
-
*/
|
|
24
|
-
const downloadMedia = async (input) => {
|
|
14
|
+
const internalDownloadMedia = async (input) => {
|
|
25
15
|
var _a, _b, _c;
|
|
26
16
|
const expectedBucketOwner = await (0, get_account_id_1.getAccountId)({
|
|
27
17
|
region: input.region,
|
|
@@ -31,13 +21,14 @@ const downloadMedia = async (input) => {
|
|
|
31
21
|
expectedBucketOwner,
|
|
32
22
|
region: input.region,
|
|
33
23
|
renderId: input.renderId,
|
|
24
|
+
providerSpecifics: input.providerSpecifics,
|
|
34
25
|
});
|
|
35
26
|
if (!overallProgress.renderMetadata) {
|
|
36
27
|
throw new Error('Render did not finish yet');
|
|
37
28
|
}
|
|
38
29
|
const outputPath = node_path_1.default.resolve(process.cwd(), input.outPath);
|
|
39
30
|
renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
|
|
40
|
-
const { key, renderBucketName, customCredentials } = (0,
|
|
31
|
+
const { key, renderBucketName, customCredentials } = (0, client_1.getExpectedOutName)(overallProgress.renderMetadata, input.bucketName, (_a = input.customCredentials) !== null && _a !== void 0 ? _a : null);
|
|
41
32
|
const { sizeInBytes } = await (0, read_with_progress_1.lambdaDownloadFileWithProgress)({
|
|
42
33
|
bucketName: renderBucketName,
|
|
43
34
|
expectedBucketOwner,
|
|
@@ -53,4 +44,22 @@ const downloadMedia = async (input) => {
|
|
|
53
44
|
sizeInBytes,
|
|
54
45
|
};
|
|
55
46
|
};
|
|
47
|
+
exports.internalDownloadMedia = internalDownloadMedia;
|
|
48
|
+
/**
|
|
49
|
+
* @description Downloads a rendered video, audio or still to the disk of the machine this API is called from.
|
|
50
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/downloadmedia)
|
|
51
|
+
* @param params.region The AWS region in which the media resides.
|
|
52
|
+
* @param params.bucketName The `bucketName` that was specified during the render.
|
|
53
|
+
* @param params.renderId The `renderId` that was obtained after triggering the render.
|
|
54
|
+
* @param params.outPath Where to save the media.
|
|
55
|
+
* @param params.onProgress Progress callback function - see docs for details.
|
|
56
|
+
* @param params.customCredentials If the file was saved to a foreign cloud, pass credentials for reading from it.
|
|
57
|
+
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
58
|
+
*/
|
|
59
|
+
const downloadMedia = (input) => {
|
|
60
|
+
return (0, exports.internalDownloadMedia)({
|
|
61
|
+
...input,
|
|
62
|
+
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
63
|
+
});
|
|
64
|
+
};
|
|
56
65
|
exports.downloadMedia = downloadMedia;
|
|
@@ -4,12 +4,14 @@ import * as LambdaSDK from '@aws-sdk/client-lambda';
|
|
|
4
4
|
import * as S3SDK from '@aws-sdk/client-s3';
|
|
5
5
|
import * as ServiceQuotasSDK from '@aws-sdk/client-service-quotas';
|
|
6
6
|
import * as StsSdk from '@aws-sdk/client-sts';
|
|
7
|
+
import type { CustomCredentials } from '@remotion/serverless/client';
|
|
7
8
|
import type { AwsRegion } from '../client';
|
|
8
|
-
import type {
|
|
9
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
10
|
+
import { type ServiceMapping } from '../shared/get-service-client';
|
|
9
11
|
export type GetAwsClientInput<T extends keyof ServiceMapping> = {
|
|
10
12
|
region: AwsRegion;
|
|
11
13
|
service: T;
|
|
12
|
-
customCredentials?: CustomCredentials | null;
|
|
14
|
+
customCredentials?: CustomCredentials<AwsProvider> | null;
|
|
13
15
|
};
|
|
14
16
|
type SdkMapping = {
|
|
15
17
|
s3: typeof S3SDK;
|
|
@@ -30,7 +30,7 @@ const LambdaSDK = __importStar(require("@aws-sdk/client-lambda"));
|
|
|
30
30
|
const S3SDK = __importStar(require("@aws-sdk/client-s3"));
|
|
31
31
|
const ServiceQuotasSDK = __importStar(require("@aws-sdk/client-service-quotas"));
|
|
32
32
|
const StsSdk = __importStar(require("@aws-sdk/client-sts"));
|
|
33
|
-
const
|
|
33
|
+
const get_service_client_1 = require("../shared/get-service-client");
|
|
34
34
|
/**
|
|
35
35
|
* @description Gets the full AWS SDK and an instantiated client for an AWS service
|
|
36
36
|
* @see [Documentation](https://remotion.dev/docs/lambda/getawsclient)
|
|
@@ -41,7 +41,7 @@ const aws_clients_1 = require("../shared/aws-clients");
|
|
|
41
41
|
*/
|
|
42
42
|
const getAwsClient = ({ region, service, customCredentials, }) => {
|
|
43
43
|
return {
|
|
44
|
-
client: (0,
|
|
44
|
+
client: (0, get_service_client_1.getServiceClient)({
|
|
45
45
|
region,
|
|
46
46
|
service,
|
|
47
47
|
customCredentials: customCredentials !== null && customCredentials !== void 0 ? customCredentials : null,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
2
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
3
|
+
import type { AwsRegion } from '../regions';
|
|
2
4
|
export type BucketWithLocation = {
|
|
3
5
|
name: string;
|
|
4
6
|
creationDate: number;
|
|
5
7
|
region: AwsRegion;
|
|
6
8
|
};
|
|
7
|
-
export declare const
|
|
8
|
-
remotionBuckets: BucketWithLocation[];
|
|
9
|
-
}>;
|
|
9
|
+
export declare const getRemotionBuckets: ProviderSpecifics<AwsProvider>['getBuckets'];
|
package/dist/api/get-buckets.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRemotionBuckets = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const client_1 = require("@remotion/serverless/client");
|
|
6
|
+
const get_s3_client_1 = require("../shared/get-s3-client");
|
|
7
7
|
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
8
|
-
const
|
|
9
|
-
const { Buckets } = await (0,
|
|
8
|
+
const getRemotionBuckets = async (region, forceBucketName) => {
|
|
9
|
+
const { Buckets } = await (0, get_s3_client_1.getS3Client)(region, null).send(new client_s3_1.ListBucketsCommand({}));
|
|
10
10
|
if (!Buckets) {
|
|
11
|
-
return
|
|
11
|
+
return [];
|
|
12
12
|
}
|
|
13
13
|
const remotionBuckets = Buckets.filter((b) => {
|
|
14
14
|
var _a;
|
|
15
15
|
if (forceBucketName) {
|
|
16
16
|
return b.Name === forceBucketName;
|
|
17
17
|
}
|
|
18
|
-
return (_a = b.Name) === null || _a === void 0 ? void 0 : _a.startsWith(
|
|
18
|
+
return (_a = b.Name) === null || _a === void 0 ? void 0 : _a.startsWith(client_1.REMOTION_BUCKET_PREFIX);
|
|
19
19
|
});
|
|
20
20
|
const locations = await Promise.all(remotionBuckets.map(async (bucket) => {
|
|
21
21
|
var _a, _b;
|
|
@@ -24,7 +24,7 @@ const getRemotionS3Buckets = async (region, forceBucketName) => {
|
|
|
24
24
|
return parsedRegion;
|
|
25
25
|
}
|
|
26
26
|
try {
|
|
27
|
-
const result = await (0,
|
|
27
|
+
const result = await (0, get_s3_client_1.getS3Client)(region, null).send(new client_s3_1.GetBucketLocationCommand({
|
|
28
28
|
Bucket: bucket.Name,
|
|
29
29
|
}));
|
|
30
30
|
// AWS docs: Buckets in Region us-east-1 have a LocationConstraint of null!!
|
|
@@ -47,10 +47,8 @@ const getRemotionS3Buckets = async (region, forceBucketName) => {
|
|
|
47
47
|
};
|
|
48
48
|
})
|
|
49
49
|
.filter((b) => b.region);
|
|
50
|
-
return {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}),
|
|
54
|
-
};
|
|
50
|
+
return bucketsWithLocation.filter((bucket) => {
|
|
51
|
+
return bucket.region === region;
|
|
52
|
+
});
|
|
55
53
|
};
|
|
56
|
-
exports.
|
|
54
|
+
exports.getRemotionBuckets = getRemotionBuckets;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCompositionsOnLambda = void 0;
|
|
4
|
+
const client_1 = require("@remotion/serverless/client");
|
|
4
5
|
const version_1 = require("remotion/version");
|
|
5
|
-
const
|
|
6
|
+
const aws_implementation_1 = require("../functions/aws-implementation");
|
|
6
7
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
7
|
-
const compress_props_1 = require("../shared/compress-props");
|
|
8
8
|
/**
|
|
9
9
|
* @description Returns the compositions from a serveUrl
|
|
10
10
|
* @see [Documentation](https://remotion.dev/docs/lambda/getcompositionsonlambda)
|
|
@@ -20,20 +20,21 @@ const compress_props_1 = require("../shared/compress-props");
|
|
|
20
20
|
*/
|
|
21
21
|
const getCompositionsOnLambda = async ({ chromiumOptions, serveUrl, region, inputProps, functionName, envVariables, logLevel, timeoutInMilliseconds, forceBucketName: bucketName, dumpBrowserLogs, offthreadVideoCacheSizeInBytes, }) => {
|
|
22
22
|
var _a;
|
|
23
|
-
const stringifiedInputProps = (0,
|
|
24
|
-
const serializedInputProps = await (0,
|
|
23
|
+
const stringifiedInputProps = (0, client_1.serializeOrThrow)(inputProps, 'input-props');
|
|
24
|
+
const serializedInputProps = await (0, client_1.compressInputProps)({
|
|
25
25
|
stringifiedInputProps,
|
|
26
26
|
region,
|
|
27
27
|
userSpecifiedBucketName: bucketName !== null && bucketName !== void 0 ? bucketName : null,
|
|
28
28
|
propsType: 'input-props',
|
|
29
|
-
needsToUpload: (0,
|
|
29
|
+
needsToUpload: (0, client_1.getNeedsToUpload)('video-or-audio', [
|
|
30
30
|
stringifiedInputProps.length,
|
|
31
31
|
]),
|
|
32
|
+
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
32
33
|
});
|
|
33
34
|
try {
|
|
34
35
|
const res = await (0, call_lambda_1.callLambda)({
|
|
35
36
|
functionName,
|
|
36
|
-
type:
|
|
37
|
+
type: client_1.ServerlessRoutines.compositions,
|
|
37
38
|
payload: {
|
|
38
39
|
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
|
|
39
40
|
serveUrl,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
import type { AwsRegion } from '../
|
|
2
|
+
import type { AwsRegion } from '../regions';
|
|
3
3
|
import type { FunctionInfo } from './get-function-info';
|
|
4
4
|
export type GetFunctionsInput = {
|
|
5
5
|
region: AwsRegion;
|
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
type GetOrCreateBucketInputInner = {
|
|
4
|
-
region: AwsRegion;
|
|
5
|
-
enableFolderExpiry: boolean | null;
|
|
6
|
-
customCredentials: CustomCredentials | null;
|
|
7
|
-
};
|
|
8
|
-
export type GetOrCreateBucketInput = {
|
|
9
|
-
region: AwsRegion;
|
|
10
|
-
enableFolderExpiry?: boolean;
|
|
11
|
-
customCredentials?: CustomCredentials;
|
|
12
|
-
};
|
|
13
|
-
export type GetOrCreateBucketOutput = {
|
|
14
|
-
bucketName: string;
|
|
15
|
-
alreadyExisted: boolean;
|
|
16
|
-
};
|
|
17
|
-
export declare const internalGetOrCreateBucket: (params: GetOrCreateBucketInputInner) => Promise<GetOrCreateBucketOutput>;
|
|
1
|
+
import type { GetOrCreateBucketInput } from '@remotion/serverless/client';
|
|
2
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
18
3
|
/**
|
|
19
4
|
* @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
|
|
20
5
|
* @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
|
|
21
6
|
* @param params.region The region in which you want your S3 bucket to reside in.
|
|
22
7
|
* @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
|
|
23
8
|
*/
|
|
24
|
-
export declare const getOrCreateBucket: (options: GetOrCreateBucketInput) => Promise<GetOrCreateBucketOutput>;
|
|
25
|
-
export {};
|
|
9
|
+
export declare const getOrCreateBucket: (options: GetOrCreateBucketInput<AwsProvider>) => Promise<import("@remotion/serverless/client").GetOrCreateBucketOutput>;
|
|
@@ -1,43 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOrCreateBucket =
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
7
|
-
const create_bucket_1 = require("./create-bucket");
|
|
8
|
-
const get_buckets_1 = require("./get-buckets");
|
|
9
|
-
const internalGetOrCreateBucket = async (params) => {
|
|
10
|
-
const { remotionBuckets } = await (0, get_buckets_1.getRemotionS3Buckets)(params.region);
|
|
11
|
-
if (remotionBuckets.length > 1) {
|
|
12
|
-
throw new Error(`You have multiple buckets (${remotionBuckets.map((b) => b.name)}) in your S3 region (${params.region}) starting with "${constants_1.REMOTION_BUCKET_PREFIX}". Please see https://remotion.dev/docs/lambda/multiple-buckets.`);
|
|
13
|
-
}
|
|
14
|
-
const { enableFolderExpiry, region } = params;
|
|
15
|
-
if (remotionBuckets.length === 1) {
|
|
16
|
-
const existingBucketName = remotionBuckets[0].name;
|
|
17
|
-
// apply to existing bucket
|
|
18
|
-
await (0, lifecycle_rules_1.applyLifeCyleOperation)({
|
|
19
|
-
enableFolderExpiry: enableFolderExpiry !== null && enableFolderExpiry !== void 0 ? enableFolderExpiry : null,
|
|
20
|
-
bucketName: existingBucketName,
|
|
21
|
-
region,
|
|
22
|
-
customCredentials: params.customCredentials,
|
|
23
|
-
});
|
|
24
|
-
return { bucketName: remotionBuckets[0].name, alreadyExisted: true };
|
|
25
|
-
}
|
|
26
|
-
const bucketName = (0, validate_bucketname_1.makeBucketName)(params.region);
|
|
27
|
-
await (0, create_bucket_1.createBucket)({
|
|
28
|
-
bucketName,
|
|
29
|
-
region: params.region,
|
|
30
|
-
});
|
|
31
|
-
// apply to newly created bucket
|
|
32
|
-
await (0, lifecycle_rules_1.applyLifeCyleOperation)({
|
|
33
|
-
enableFolderExpiry: enableFolderExpiry !== null && enableFolderExpiry !== void 0 ? enableFolderExpiry : null,
|
|
34
|
-
bucketName,
|
|
35
|
-
region,
|
|
36
|
-
customCredentials: params.customCredentials,
|
|
37
|
-
});
|
|
38
|
-
return { bucketName, alreadyExisted: false };
|
|
39
|
-
};
|
|
40
|
-
exports.internalGetOrCreateBucket = internalGetOrCreateBucket;
|
|
3
|
+
exports.getOrCreateBucket = void 0;
|
|
4
|
+
const client_1 = require("@remotion/serverless/client");
|
|
5
|
+
const aws_implementation_1 = require("../functions/aws-implementation");
|
|
41
6
|
/**
|
|
42
7
|
* @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
|
|
43
8
|
* @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
|
|
@@ -46,10 +11,11 @@ exports.internalGetOrCreateBucket = internalGetOrCreateBucket;
|
|
|
46
11
|
*/
|
|
47
12
|
const getOrCreateBucket = (options) => {
|
|
48
13
|
var _a, _b;
|
|
49
|
-
return (0,
|
|
14
|
+
return (0, client_1.internalGetOrCreateBucket)({
|
|
50
15
|
region: options.region,
|
|
51
16
|
enableFolderExpiry: (_a = options.enableFolderExpiry) !== null && _a !== void 0 ? _a : null,
|
|
52
17
|
customCredentials: (_b = options.customCredentials) !== null && _b !== void 0 ? _b : null,
|
|
18
|
+
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
53
19
|
});
|
|
54
20
|
};
|
|
55
21
|
exports.getOrCreateBucket = getOrCreateBucket;
|
package/dist/api/get-regions.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRegions = void 0;
|
|
4
|
-
const aws_regions_1 = require("../pricing/aws-regions");
|
|
5
4
|
const regions_1 = require("../regions");
|
|
6
5
|
/**
|
|
7
6
|
* @description Gets an array of all supported AWS regions of this release of Remotion Lambda.
|
|
@@ -11,6 +10,6 @@ const regions_1 = require("../regions");
|
|
|
11
10
|
const getRegions = (options) => {
|
|
12
11
|
var _a;
|
|
13
12
|
const onlyEnabledByDefault = (_a = options === null || options === void 0 ? void 0 : options.enabledByDefaultOnly) !== null && _a !== void 0 ? _a : false;
|
|
14
|
-
return onlyEnabledByDefault ?
|
|
13
|
+
return onlyEnabledByDefault ? regions_1.DEFAULT_AWS_REGIONS : regions_1.AWS_REGIONS;
|
|
15
14
|
};
|
|
16
15
|
exports.getRegions = getRegions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { CustomCredentials } from '@remotion/serverless/client';
|
|
3
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
4
|
+
import type { AwsRegion } from '../regions';
|
|
4
5
|
import type { RenderProgress } from '../shared/constants';
|
|
5
6
|
export type GetRenderProgressInput = {
|
|
6
7
|
functionName: string;
|
|
@@ -8,7 +9,7 @@ export type GetRenderProgressInput = {
|
|
|
8
9
|
renderId: string;
|
|
9
10
|
region: AwsRegion;
|
|
10
11
|
logLevel?: LogLevel;
|
|
11
|
-
s3OutputProvider?: CustomCredentials
|
|
12
|
+
s3OutputProvider?: CustomCredentials<AwsProvider>;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* @description Gets the current status of a render originally triggered via renderMediaOnLambda().
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRenderProgress = void 0;
|
|
4
|
+
const client_1 = require("@remotion/serverless/client");
|
|
4
5
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
5
|
-
const constants_1 = require("../shared/constants");
|
|
6
6
|
const make_lambda_payload_1 = require("./make-lambda-payload");
|
|
7
7
|
/**
|
|
8
8
|
* @description Gets the current status of a render originally triggered via renderMediaOnLambda().
|
|
@@ -17,7 +17,7 @@ const make_lambda_payload_1 = require("./make-lambda-payload");
|
|
|
17
17
|
const getRenderProgress = async (input) => {
|
|
18
18
|
const result = await (0, call_lambda_1.callLambda)({
|
|
19
19
|
functionName: input.functionName,
|
|
20
|
-
type:
|
|
20
|
+
type: client_1.ServerlessRoutines.status,
|
|
21
21
|
payload: (0, make_lambda_payload_1.getRenderProgressPayload)(input),
|
|
22
22
|
region: input.region,
|
|
23
23
|
timeoutInTest: 120000,
|
package/dist/api/get-sites.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ProviderSpecifics } from '@remotion/serverless';
|
|
2
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
3
|
+
import type { AwsRegion } from '../regions';
|
|
2
4
|
import type { BucketWithLocation } from './get-buckets';
|
|
3
5
|
type Site = {
|
|
4
6
|
sizeInBytes: number;
|
|
@@ -15,6 +17,9 @@ export type GetSitesOutput = {
|
|
|
15
17
|
sites: Site[];
|
|
16
18
|
buckets: BucketWithLocation[];
|
|
17
19
|
};
|
|
20
|
+
export declare const internalGetSites: ({ region, forceBucketName, providerSpecifics, }: GetSitesInput & {
|
|
21
|
+
providerSpecifics: ProviderSpecifics<AwsProvider>;
|
|
22
|
+
}) => Promise<GetSitesOutput>;
|
|
18
23
|
/**
|
|
19
24
|
* @description Gets all the deployed sites for a certain AWS region.
|
|
20
25
|
* @see [Documentation](https://remotion.dev/docs/lambda/getsites)
|
package/dist/api/get-sites.js
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSites = void 0;
|
|
4
|
-
const
|
|
3
|
+
exports.getSites = exports.internalGetSites = void 0;
|
|
4
|
+
const aws_implementation_1 = require("../functions/aws-implementation");
|
|
5
5
|
const constants_1 = require("../shared/constants");
|
|
6
6
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
7
7
|
const make_s3_url_1 = require("../shared/make-s3-url");
|
|
8
|
-
const
|
|
9
|
-
/**
|
|
10
|
-
* @description Gets all the deployed sites for a certain AWS region.
|
|
11
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/getsites)
|
|
12
|
-
* @param {AwsRegion} params.region The AWS region that you want to query for.
|
|
13
|
-
* @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
|
|
14
|
-
*/
|
|
15
|
-
const getSites = async ({ region, forceBucketName, }) => {
|
|
8
|
+
const internalGetSites = async ({ region, forceBucketName, providerSpecifics, }) => {
|
|
16
9
|
var _a;
|
|
17
|
-
const
|
|
18
|
-
? await
|
|
19
|
-
: await
|
|
10
|
+
const remotionBuckets = forceBucketName
|
|
11
|
+
? await providerSpecifics.getBuckets(region, forceBucketName)
|
|
12
|
+
: await providerSpecifics.getBuckets(region);
|
|
20
13
|
const accountId = await (0, get_account_id_1.getAccountId)({ region });
|
|
21
14
|
const sites = {};
|
|
22
15
|
for (const bucket of remotionBuckets) {
|
|
23
|
-
const ls = await
|
|
16
|
+
const ls = await providerSpecifics.listObjects({
|
|
24
17
|
bucketName: bucket.name,
|
|
25
18
|
prefix: (0, constants_1.getSitesKey)(''),
|
|
26
19
|
region,
|
|
@@ -62,4 +55,18 @@ const getSites = async ({ region, forceBucketName, }) => {
|
|
|
62
55
|
});
|
|
63
56
|
return { sites: sitesArray, buckets: remotionBuckets };
|
|
64
57
|
};
|
|
58
|
+
exports.internalGetSites = internalGetSites;
|
|
59
|
+
/**
|
|
60
|
+
* @description Gets all the deployed sites for a certain AWS region.
|
|
61
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/getsites)
|
|
62
|
+
* @param {AwsRegion} params.region The AWS region that you want to query for.
|
|
63
|
+
* @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
|
|
64
|
+
*/
|
|
65
|
+
const getSites = ({ region, forceBucketName, }) => {
|
|
66
|
+
return (0, exports.internalGetSites)({
|
|
67
|
+
region,
|
|
68
|
+
forceBucketName,
|
|
69
|
+
providerSpecifics: aws_implementation_1.awsImplementation,
|
|
70
|
+
});
|
|
71
|
+
};
|
|
65
72
|
exports.getSites = getSites;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.rolePermissions = void 0;
|
|
4
|
+
const client_1 = require("@remotion/serverless/client");
|
|
4
5
|
const constants_1 = require("../../shared/constants");
|
|
5
6
|
exports.rolePermissions = [
|
|
6
7
|
{
|
|
@@ -18,7 +19,7 @@ exports.rolePermissions = [
|
|
|
18
19
|
's3:PutObject',
|
|
19
20
|
's3:GetBucketLocation',
|
|
20
21
|
],
|
|
21
|
-
resource: [`arn:aws:s3:::${
|
|
22
|
+
resource: [`arn:aws:s3:::${client_1.REMOTION_BUCKET_PREFIX}*`],
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
25
|
actions: ['lambda:InvokeFunction'],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AwsRegion } from '../../
|
|
1
|
+
import type { AwsRegion } from '../../regions';
|
|
2
2
|
import type { SimulationResult } from './simulate-rule';
|
|
3
3
|
export declare const logPermissionOutput: (output: SimulationResult) => string;
|
|
4
4
|
export type SimulatePermissionsInput = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.requiredPermissions = void 0;
|
|
4
|
+
const client_1 = require("@remotion/serverless/client");
|
|
4
5
|
const constants_1 = require("../../shared/constants");
|
|
5
6
|
const hosted_layers_1 = require("../../shared/hosted-layers");
|
|
6
7
|
exports.requiredPermissions = [
|
|
@@ -40,7 +41,7 @@ exports.requiredPermissions = [
|
|
|
40
41
|
's3:PutBucketPublicAccessBlock',
|
|
41
42
|
's3:PutLifecycleConfiguration',
|
|
42
43
|
],
|
|
43
|
-
resource: [`arn:aws:s3:::${
|
|
44
|
+
resource: [`arn:aws:s3:::${client_1.REMOTION_BUCKET_PREFIX}*`],
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
id: 'BucketListing',
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { AudioCodec, ChromiumOptions, ColorSpace, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
|
+
import type { DownloadBehavior, OutNameInput, Privacy, ServerlessCodec, ServerlessPayloads, ServerlessStartPayload, ServerlessStatusPayload, WebhookOption } from '@remotion/serverless/client';
|
|
4
|
+
import { ServerlessRoutines } from '@remotion/serverless/client';
|
|
3
5
|
import type { AwsRegion, DeleteAfter } from '../client';
|
|
4
|
-
import type {
|
|
5
|
-
import { LambdaRoutines } from '../defaults';
|
|
6
|
-
import type { DownloadBehavior } from '../shared/content-disposition-header';
|
|
7
|
-
import type { LambdaCodec } from '../shared/validate-lambda-codec';
|
|
6
|
+
import type { AwsProvider } from '../functions/aws-implementation';
|
|
8
7
|
import type { GetRenderProgressInput } from './get-render-progress';
|
|
9
8
|
import type { RenderStillOnLambdaNonNullInput } from './render-still-on-lambda';
|
|
10
9
|
export type InnerRenderMediaOnLambdaInput = {
|
|
@@ -13,7 +12,7 @@ export type InnerRenderMediaOnLambdaInput = {
|
|
|
13
12
|
serveUrl: string;
|
|
14
13
|
composition: string;
|
|
15
14
|
inputProps: Record<string, unknown>;
|
|
16
|
-
codec:
|
|
15
|
+
codec: ServerlessCodec;
|
|
17
16
|
imageFormat: VideoImageFormat;
|
|
18
17
|
crf: number | undefined;
|
|
19
18
|
envVariables: Record<string, string>;
|
|
@@ -26,7 +25,7 @@ export type InnerRenderMediaOnLambdaInput = {
|
|
|
26
25
|
framesPerLambda: number | null;
|
|
27
26
|
logLevel: LogLevel;
|
|
28
27
|
frameRange: FrameRange | null;
|
|
29
|
-
outName: OutNameInput | null;
|
|
28
|
+
outName: OutNameInput<AwsProvider> | null;
|
|
30
29
|
timeoutInMilliseconds: number;
|
|
31
30
|
chromiumOptions: ChromiumOptions;
|
|
32
31
|
scale: number;
|
|
@@ -50,6 +49,6 @@ export type InnerRenderMediaOnLambdaInput = {
|
|
|
50
49
|
deleteAfter: DeleteAfter | null;
|
|
51
50
|
indent: boolean;
|
|
52
51
|
} & ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>;
|
|
53
|
-
export declare const makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, 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, deleteAfter, colorSpace, preferLossless, }: InnerRenderMediaOnLambdaInput) => Promise<
|
|
54
|
-
export declare const getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, }: GetRenderProgressInput) =>
|
|
55
|
-
export declare const makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, }: RenderStillOnLambdaNonNullInput) => Promise<
|
|
52
|
+
export declare const makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, 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, deleteAfter, colorSpace, preferLossless, }: InnerRenderMediaOnLambdaInput) => Promise<ServerlessStartPayload<AwsProvider>>;
|
|
53
|
+
export declare const getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, }: GetRenderProgressInput) => ServerlessStatusPayload<AwsProvider>;
|
|
54
|
+
export declare const makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, }: RenderStillOnLambdaNonNullInput) => Promise<ServerlessPayloads<AwsProvider>[ServerlessRoutines.still]>;
|