@remotion/lambda 4.0.0-alpha18 → 4.0.0-alpha19
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/get-buckets.d.ts +1 -1
- package/dist/api/get-buckets.js +9 -3
- package/dist/api/get-compositions-on-lambda.js +1 -4
- package/dist/api/get-sites.d.ts +2 -1
- package/dist/api/get-sites.js +4 -2
- package/dist/api/make-lambda-payload.js +1 -4
- package/dist/api/render-still-on-lambda.js +1 -4
- package/dist/cli/commands/sites/create.js +1 -0
- package/dist/cli/commands/sites/rm.js +2 -1
- package/dist/cli/log.d.ts +0 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/index.d.ts +1 -1
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
|
@@ -4,6 +4,6 @@ export type BucketWithLocation = {
|
|
|
4
4
|
creationDate: number;
|
|
5
5
|
region: AwsRegion;
|
|
6
6
|
};
|
|
7
|
-
export declare const getRemotionS3Buckets: (region: AwsRegion) => Promise<{
|
|
7
|
+
export declare const getRemotionS3Buckets: (region: AwsRegion, forceBucketName?: string) => Promise<{
|
|
8
8
|
remotionBuckets: BucketWithLocation[];
|
|
9
9
|
}>;
|
package/dist/api/get-buckets.js
CHANGED
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRemotionS3Buckets = void 0;
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
|
+
const defaults_1 = require("../defaults");
|
|
5
6
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
6
|
-
const constants_1 = require("../shared/constants");
|
|
7
7
|
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
8
|
-
const getRemotionS3Buckets = async (region) => {
|
|
8
|
+
const getRemotionS3Buckets = async (region, forceBucketName) => {
|
|
9
9
|
const { Buckets } = await (0, aws_clients_1.getS3Client)(region, null).send(new client_s3_1.ListBucketsCommand({}));
|
|
10
10
|
if (!Buckets) {
|
|
11
11
|
return { remotionBuckets: [] };
|
|
12
12
|
}
|
|
13
|
-
const remotionBuckets = Buckets.filter((b) => {
|
|
13
|
+
const remotionBuckets = Buckets.filter((b) => {
|
|
14
|
+
var _a;
|
|
15
|
+
if (forceBucketName) {
|
|
16
|
+
return b.Name === forceBucketName;
|
|
17
|
+
}
|
|
18
|
+
return (_a = b.Name) === null || _a === void 0 ? void 0 : _a.startsWith(defaults_1.REMOTION_BUCKET_PREFIX);
|
|
19
|
+
});
|
|
14
20
|
const locations = await Promise.all(remotionBuckets.map(async (bucket) => {
|
|
15
21
|
var _a, _b;
|
|
16
22
|
const { region: parsedRegion } = (0, validate_bucketname_1.parseBucketName)(bucket.Name);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCompositionsOnLambda = void 0;
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
5
4
|
const version_1 = require("remotion/version");
|
|
6
5
|
const defaults_1 = require("../defaults");
|
|
7
6
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
@@ -36,9 +35,7 @@ const getCompositionsOnLambda = async ({ chromiumOptions, serveUrl, region, inpu
|
|
|
36
35
|
serveUrl,
|
|
37
36
|
envVariables,
|
|
38
37
|
inputProps: serializedInputProps,
|
|
39
|
-
logLevel: dumpBrowserLogs
|
|
40
|
-
? 'verbose'
|
|
41
|
-
: logLevel !== null && logLevel !== void 0 ? logLevel : renderer_1.RenderInternals.getLogLevel(),
|
|
38
|
+
logLevel: dumpBrowserLogs ? 'verbose' : logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
42
39
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
|
|
43
40
|
version: version_1.VERSION,
|
|
44
41
|
bucketName: bucketName !== null && bucketName !== void 0 ? bucketName : null,
|
package/dist/api/get-sites.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ type Site = {
|
|
|
9
9
|
};
|
|
10
10
|
export type GetSitesInput = {
|
|
11
11
|
region: AwsRegion;
|
|
12
|
+
forceBucketName?: string;
|
|
12
13
|
};
|
|
13
14
|
export type GetSitesOutput = {
|
|
14
15
|
sites: Site[];
|
|
@@ -20,5 +21,5 @@ export type GetSitesOutput = {
|
|
|
20
21
|
* @param {AwsRegion} params.region The AWS region that you want to query for.
|
|
21
22
|
* @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
|
|
22
23
|
*/
|
|
23
|
-
export declare const getSites: ({ region, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
24
|
+
export declare const getSites: ({ region, forceBucketName, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
24
25
|
export {};
|
package/dist/api/get-sites.js
CHANGED
|
@@ -12,9 +12,11 @@ const get_buckets_1 = require("./get-buckets");
|
|
|
12
12
|
* @param {AwsRegion} params.region The AWS region that you want to query for.
|
|
13
13
|
* @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
|
|
14
14
|
*/
|
|
15
|
-
const getSites = async ({ region, }) => {
|
|
15
|
+
const getSites = async ({ region, forceBucketName, }) => {
|
|
16
16
|
var _a;
|
|
17
|
-
const { remotionBuckets } =
|
|
17
|
+
const { remotionBuckets } = forceBucketName
|
|
18
|
+
? await (0, get_buckets_1.getRemotionS3Buckets)(region, forceBucketName)
|
|
19
|
+
: await (0, get_buckets_1.getRemotionS3Buckets)(region);
|
|
18
20
|
const accountId = await (0, get_account_id_1.getAccountId)({ region });
|
|
19
21
|
const sites = {};
|
|
20
22
|
for (const bucket of remotionBuckets) {
|
|
@@ -8,7 +8,6 @@ const validate_download_behavior_1 = require("../shared/validate-download-behavi
|
|
|
8
8
|
const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
|
|
9
9
|
const validate_lambda_codec_1 = require("../shared/validate-lambda-codec");
|
|
10
10
|
const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
11
|
-
const renderer_1 = require("@remotion/renderer");
|
|
12
11
|
const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, dumpBrowserLogs, jpegQuality, quality, }) => {
|
|
13
12
|
if (quality) {
|
|
14
13
|
throw new Error('quality has been renamed to jpegQuality. Please rename the option.');
|
|
@@ -41,9 +40,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
|
|
|
41
40
|
jpegQuality,
|
|
42
41
|
maxRetries: maxRetries !== null && maxRetries !== void 0 ? maxRetries : 1,
|
|
43
42
|
privacy: privacy !== null && privacy !== void 0 ? privacy : 'public',
|
|
44
|
-
logLevel: dumpBrowserLogs
|
|
45
|
-
? 'verbose'
|
|
46
|
-
: logLevel !== null && logLevel !== void 0 ? logLevel : renderer_1.RenderInternals.getLogLevel(),
|
|
43
|
+
logLevel: dumpBrowserLogs ? 'verbose' : logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
47
44
|
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
48
45
|
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
49
46
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderStillOnLambda = void 0;
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
5
4
|
const version_1 = require("remotion/version");
|
|
6
5
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
7
6
|
const constants_1 = require("../shared/constants");
|
|
@@ -49,9 +48,7 @@ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFo
|
|
|
49
48
|
frame: frame !== null && frame !== void 0 ? frame : 0,
|
|
50
49
|
privacy,
|
|
51
50
|
attempt: 1,
|
|
52
|
-
logLevel: dumpBrowserLogs
|
|
53
|
-
? 'verbose'
|
|
54
|
-
: logLevel !== null && logLevel !== void 0 ? logLevel : renderer_1.RenderInternals.getLogLevel(),
|
|
51
|
+
logLevel: dumpBrowserLogs ? 'verbose' : logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
55
52
|
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
56
53
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
|
|
57
54
|
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
|
|
@@ -90,6 +90,7 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
|
90
90
|
},
|
|
91
91
|
enableCaching: config_1.ConfigInternals.getWebpackCaching(),
|
|
92
92
|
webpackOverride: (_c = config_1.ConfigInternals.getWebpackOverrideFn()) !== null && _c !== void 0 ? _c : ((f) => f),
|
|
93
|
+
bypassBucketNameValidation: Boolean(args_1.parsedLambdaCli['force-bucket-name']),
|
|
93
94
|
},
|
|
94
95
|
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
95
96
|
privacy: args_1.parsedLambdaCli.privacy,
|
|
@@ -24,9 +24,10 @@ const sitesRmSubcommand = async (args) => {
|
|
|
24
24
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
25
25
|
const deployedSites = await (0, get_sites_1.getSites)({
|
|
26
26
|
region,
|
|
27
|
+
forceBucketName: args_1.parsedLambdaCli['force-bucket-name'],
|
|
27
28
|
});
|
|
29
|
+
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.getOrCreateBucket)({ region })).bucketName;
|
|
28
30
|
for (const siteName of args) {
|
|
29
|
-
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.getOrCreateBucket)({ region })).bucketName;
|
|
30
31
|
const site = deployedSites.sites.find((s) => s.id === siteName.trim());
|
|
31
32
|
if (!site) {
|
|
32
33
|
log_1.Log.error(`No site ${siteName.trim()} was found in your bucket ${bucketName}.`);
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export declare const Log: {
|
|
|
5
5
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
|
-
secondTag?: string | undefined;
|
|
9
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
10
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
11
10
|
infoAdvanced: (options: {
|
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,6 @@ declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region
|
|
|
55
55
|
/**
|
|
56
56
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
57
57
|
*/
|
|
58
|
-
declare const getSites: ({ region, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
58
|
+
declare const getSites: ({ region, forceBucketName, }: GetSitesInput) => Promise<GetSitesOutput>;
|
|
59
59
|
export { deleteSite, deployFunction, deploySite, downloadMedia, getFunctions, getUserPolicy, getRolePolicy, getSites, getOrCreateBucket, getRenderProgress, renderVideoOnLambda, renderMediaOnLambda, simulatePermissions, deleteFunction, getFunctionInfo, estimatePrice, LambdaInternals, renderStillOnLambda, getRegions, getAwsClient, presignUrl, deleteRender, validateWebhookSignature, getCompositionsOnLambda, };
|
|
60
60
|
export type { AwsRegion, RenderProgress, DeploySiteInput, DeploySiteOutput, LambdaLsReturnType, LambdaLSInput, DeleteSiteInput, DeleteSiteOutput, EstimatePriceInput, DeployFunctionInput, DeployFunctionOutput, DeleteFunctionInput, GetFunctionInfoInput, FunctionInfo, GetFunctionsInput, GetSitesInput, GetSitesOutput, DownloadMediaInput, DownloadMediaOutput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, GetAwsClientInput, GetAwsClientOutput, CustomCredentials, WebhookPayload, LambdaErrorInfo, EnhancedErrorInfo, DeleteRenderInput, GetCompositionsOnLambdaOutput, GetCompositionsOnLambdaInput, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-alpha19",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@aws-sdk/s3-request-presigner": "3.338.0",
|
|
26
26
|
"aws-policies": "^1.0.1",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
|
-
"@remotion/bundler": "4.0.0-
|
|
29
|
-
"@remotion/
|
|
30
|
-
"remotion": "4.0.0-
|
|
31
|
-
"
|
|
28
|
+
"@remotion/bundler": "4.0.0-alpha19",
|
|
29
|
+
"@remotion/renderer": "4.0.0-alpha19",
|
|
30
|
+
"@remotion/cli": "4.0.0-alpha19",
|
|
31
|
+
"remotion": "4.0.0-alpha19"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@jonny/eslint-config": "3.0.266",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"typescript": "4.9.5",
|
|
44
44
|
"vitest": "0.31.1",
|
|
45
45
|
"zip-lib": "^0.7.2",
|
|
46
|
-
"@remotion/bundler": "4.0.0-
|
|
47
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.0-
|
|
46
|
+
"@remotion/bundler": "4.0.0-alpha19",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha19"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@remotion/bundler": "4.0.0-
|
|
50
|
+
"@remotion/bundler": "4.0.0-alpha19"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|