@remotion/lambda 3.0.0-lambda.288 → 3.0.0-lambda.327
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/create-function.d.ts +2 -1
- package/dist/api/create-function.d.ts.map +1 -1
- package/dist/api/create-function.js +2 -2
- package/dist/api/create-function.js.map +1 -1
- package/dist/api/deploy-function.d.ts +2 -0
- package/dist/api/deploy-function.d.ts.map +1 -1
- package/dist/api/deploy-function.js +5 -0
- package/dist/api/deploy-function.js.map +1 -1
- package/dist/api/deploy-site.d.ts.map +1 -1
- package/dist/api/deploy-site.js +2 -6
- package/dist/api/deploy-site.js.map +1 -1
- package/dist/api/download-media.d.ts.map +1 -1
- package/dist/api/download-media.js +4 -15
- package/dist/api/download-media.js.map +1 -1
- package/dist/api/get-aws-client.d.ts +30 -0
- package/dist/api/get-aws-client.d.ts.map +1 -0
- package/dist/api/get-aws-client.js +47 -0
- package/dist/api/get-aws-client.js.map +1 -0
- package/dist/api/presign-url.d.ts +20 -0
- package/dist/api/presign-url.d.ts.map +1 -0
- package/dist/api/presign-url.js +47 -0
- package/dist/api/presign-url.js.map +1 -0
- package/dist/api/render-media-on-lambda.d.ts +7 -2
- package/dist/api/render-media-on-lambda.d.ts.map +1 -1
- package/dist/api/render-media-on-lambda.js +9 -3
- package/dist/api/render-media-on-lambda.js.map +1 -1
- package/dist/api/render-still-on-lambda.d.ts +6 -1
- package/dist/api/render-still-on-lambda.d.ts.map +1 -1
- package/dist/api/render-still-on-lambda.js +9 -2
- package/dist/api/render-still-on-lambda.js.map +1 -1
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/functions/deploy.d.ts.map +1 -1
- package/dist/cli/commands/functions/deploy.js +11 -2
- package/dist/cli/commands/functions/deploy.js.map +1 -1
- package/dist/cli/commands/render/render.d.ts.map +1 -1
- package/dist/cli/commands/render/render.js +18 -14
- package/dist/cli/commands/render/render.js.map +1 -1
- package/dist/cli/commands/sites/create.d.ts.map +1 -1
- package/dist/cli/commands/sites/create.js +4 -1
- package/dist/cli/commands/sites/create.js.map +1 -1
- package/dist/cli/commands/still.d.ts.map +1 -1
- package/dist/cli/commands/still.js +11 -7
- package/dist/cli/commands/still.js.map +1 -1
- package/dist/cli/helpers/confirm.d.ts.map +1 -1
- package/dist/cli/helpers/confirm.js +4 -18
- package/dist/cli/helpers/confirm.js.map +1 -1
- package/dist/cli/helpers/yes-or-no.d.ts +5 -0
- package/dist/cli/helpers/yes-or-no.d.ts.map +1 -0
- package/dist/cli/helpers/yes-or-no.js +45 -0
- package/dist/cli/helpers/yes-or-no.js.map +1 -0
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +1 -4
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +2 -8
- package/dist/functions/chunk-optimization/optimize-profile.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +1 -4
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts.map +1 -1
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +2 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts.map +1 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.js +18 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.js.map +1 -0
- package/dist/functions/helpers/concat-videos.d.ts.map +1 -1
- package/dist/functions/helpers/concat-videos.js +4 -2
- package/dist/functions/helpers/concat-videos.js.map +1 -1
- package/dist/functions/helpers/expected-out-name.d.ts.map +1 -1
- package/dist/functions/helpers/expected-out-name.js +3 -0
- package/dist/functions/helpers/expected-out-name.js.map +1 -1
- package/dist/functions/helpers/get-browser-instance.d.ts +2 -1
- package/dist/functions/helpers/get-browser-instance.d.ts.map +1 -1
- package/dist/functions/helpers/get-browser-instance.js +2 -1
- package/dist/functions/helpers/get-browser-instance.js.map +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.d.ts +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.d.ts.map +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.js.map +1 -1
- package/dist/functions/helpers/get-progress.d.ts.map +1 -1
- package/dist/functions/helpers/get-progress.js +3 -0
- package/dist/functions/helpers/get-progress.js.map +1 -1
- package/dist/functions/helpers/presign-url.d.ts +2 -0
- package/dist/functions/helpers/presign-url.d.ts.map +1 -0
- package/dist/functions/helpers/presign-url.js +9 -0
- package/dist/functions/helpers/presign-url.js.map +1 -0
- package/dist/functions/helpers/print-concurrency-curve.d.ts +2 -0
- package/dist/functions/helpers/print-concurrency-curve.d.ts.map +1 -0
- package/dist/functions/helpers/print-concurrency-curve.js +9 -0
- package/dist/functions/helpers/print-concurrency-curve.js.map +1 -0
- package/dist/functions/helpers/read-with-progress.d.ts +5 -3
- package/dist/functions/helpers/read-with-progress.d.ts.map +1 -1
- package/dist/functions/helpers/read-with-progress.js +4 -12
- package/dist/functions/helpers/read-with-progress.js.map +1 -1
- package/dist/functions/launch.d.ts.map +1 -1
- package/dist/functions/launch.js +21 -12
- package/dist/functions/launch.js.map +1 -1
- package/dist/functions/renderer.d.ts.map +1 -1
- package/dist/functions/renderer.js +16 -8
- package/dist/functions/renderer.js.map +1 -1
- package/dist/functions/start.d.ts.map +1 -1
- package/dist/functions/start.js +5 -1
- package/dist/functions/start.js.map +1 -1
- package/dist/functions/still.d.ts.map +1 -1
- package/dist/functions/still.js +12 -6
- package/dist/functions/still.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/shared/aws-clients.d.ts +7 -1
- package/dist/shared/aws-clients.d.ts.map +1 -1
- package/dist/shared/aws-clients.js.map +1 -1
- package/dist/shared/constants.d.ts +25 -9
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +7 -7
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/hosted-layers.js +30 -30
- package/dist/shared/random-hash.d.ts +3 -1
- package/dist/shared/random-hash.d.ts.map +1 -1
- package/dist/shared/random-hash.js +2 -1
- package/dist/shared/random-hash.js.map +1 -1
- package/dist/shared/validate-bucketname.d.ts +2 -0
- package/dist/shared/validate-bucketname.d.ts.map +1 -0
- package/dist/shared/validate-bucketname.js +14 -0
- package/dist/shared/validate-bucketname.js.map +1 -0
- package/dist/shared/validate-frames-per-lambda.d.ts.map +1 -1
- package/dist/shared/validate-frames-per-lambda.js +5 -1
- package/dist/shared/validate-frames-per-lambda.js.map +1 -1
- package/dist/shared/validate-outname.d.ts +2 -0
- package/dist/shared/validate-outname.d.ts.map +1 -0
- package/dist/shared/validate-outname.js +19 -0
- package/dist/shared/validate-outname.js.map +1 -0
- package/dist/shared/validate-presign-expiration.d.ts +4 -0
- package/dist/shared/validate-presign-expiration.d.ts.map +1 -0
- package/dist/shared/validate-presign-expiration.js +30 -0
- package/dist/shared/validate-presign-expiration.js.map +1 -0
- package/dist/shared/validate-retention-period.d.ts +2 -0
- package/dist/shared/validate-retention-period.d.ts.map +1 -0
- package/dist/shared/validate-retention-period.js +30 -0
- package/dist/shared/validate-retention-period.js.map +1 -0
- package/dist/shared/validate-site-name.d.ts +1 -1
- package/dist/shared/validate-site-name.d.ts.map +1 -1
- package/dist/shared/validate-site-name.js +6 -0
- package/dist/shared/validate-site-name.js.map +1 -1
- package/package.json +9 -8
- package/remotionlambda.zip +0 -0
- package/dist/api/download-video.d.ts +0 -20
- package/dist/api/download-video.d.ts.map +0 -1
- package/dist/api/download-video.js +0 -55
- package/dist/api/download-video.js.map +0 -1
- package/dist/api/render-video-on-lambda.d.ts +0 -72
- package/dist/api/render-video-on-lambda.d.ts.map +0 -1
- package/dist/api/render-video-on-lambda.js +0 -64
- package/dist/api/render-video-on-lambda.js.map +0 -1
- package/dist/pricing/calculate-price.d.ts +0 -15
- package/dist/pricing/calculate-price.d.ts.map +0 -1
- package/dist/pricing/calculate-price.js +0 -34
- package/dist/pricing/calculate-price.js.map +0 -1
- package/dist/pricing/estimate-price.d.ts +0 -15
- package/dist/pricing/estimate-price.d.ts.map +0 -1
- package/dist/pricing/estimate-price.js +0 -34
- package/dist/pricing/estimate-price.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
-
export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, }: {
|
|
2
|
+
export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, }: {
|
|
3
3
|
createCloudWatchLogGroup: boolean;
|
|
4
4
|
region: AwsRegion;
|
|
5
5
|
zipFile: string;
|
|
@@ -8,6 +8,7 @@ export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFil
|
|
|
8
8
|
memorySizeInMb: number;
|
|
9
9
|
timeoutInSeconds: number;
|
|
10
10
|
alreadyCreated: boolean;
|
|
11
|
+
retentionInDays: number;
|
|
11
12
|
}) => Promise<{
|
|
12
13
|
FunctionName: string;
|
|
13
14
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.d.ts","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-function.d.ts","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAKjD,eAAO,MAAM,cAAc;8BAWA,OAAO;YACzB,SAAS;aACR,MAAM;kBACD,MAAM;eACT,MAAM;oBACD,MAAM;sBACJ,MAAM;oBACR,OAAO;qBACN,MAAM;;kBACG,MAAM;EAqDhC,CAAC"}
|
|
@@ -8,7 +8,7 @@ const defaults_1 = require("../defaults");
|
|
|
8
8
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
9
9
|
const hosted_layers_1 = require("../shared/hosted-layers");
|
|
10
10
|
const suggested_policy_1 = require("./iam-validation/suggested-policy");
|
|
11
|
-
const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, }) => {
|
|
11
|
+
const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, }) => {
|
|
12
12
|
if (createCloudWatchLogGroup) {
|
|
13
13
|
try {
|
|
14
14
|
await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
|
|
@@ -23,7 +23,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
|
|
|
23
23
|
}
|
|
24
24
|
await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.PutRetentionPolicyCommand({
|
|
25
25
|
logGroupName: `${defaults_1.LOG_GROUP_PREFIX}${functionName}`,
|
|
26
|
-
retentionInDays
|
|
26
|
+
retentionInDays,
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
29
|
if (alreadyCreated) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.js","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":";;;AAAA,4EAGyC;AACzC,0DAGgC;AAChC,2BAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"create-function.js","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":";;;AAAA,4EAGyC;AACzC,0DAGgC;AAChC,2BAAgC;AAChC,0CAA+C;AAE/C,uDAA+E;AAC/E,2DAAqD;AACrD,wEAA4D;AAErD,MAAM,cAAc,GAAG,KAAK,EAAE,EACpC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E,EAAE,CAAC,GAAG,QAAQ,IAAI,OAAO,EAAE,CACjD;QACD,aAAa,EAAE,CAAC,OAAO,CAAC;KACxB,CAAC,CACF,CAAC;IACF,MAAM,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC,IAAI,CACjC,IAAI,mDAAmC,CAAC;QACvC,oBAAoB,EAAE,CAAC;QACvB,YAAY;KACZ,CAAC,CACF,CAAC;IAEF,OAAO,EAAC,YAAY,EAAE,YAAsB,EAAC,CAAC;AAC/C,CAAC,CAAC;AAzEW,QAAA,cAAc,kBAyEzB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
2
|
export declare type DeployFunctionInput = {
|
|
3
3
|
createCloudWatchLogGroup: boolean;
|
|
4
|
+
cloudWatchLogRetentionPeriodInDays?: number;
|
|
4
5
|
region: AwsRegion;
|
|
5
6
|
timeoutInSeconds: number;
|
|
6
7
|
memorySizeInMb: number;
|
|
@@ -13,6 +14,7 @@ export declare type DeployFunctionOutput = {
|
|
|
13
14
|
* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
|
|
14
15
|
* @link https://v3.remotion.dev/docs/lambda/deployfunction
|
|
15
16
|
* @param options.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
|
|
17
|
+
* @param options.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
|
|
16
18
|
* @param options.region The region you want to deploy your function to.
|
|
17
19
|
* @param options.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.
|
|
18
20
|
* @param options.memorySizeInMb How much memory should be allocated to the Lambda function.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-function.d.ts","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-function.d.ts","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAcjD,oBAAY,mBAAmB,GAAG;IACjC,wBAAwB,EAAE,OAAO,CAAC;IAClC,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,MAAM,EAAE,SAAS,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,YACjB,mBAAmB,KAC1B,QAAQ,oBAAoB,CA2C9B,CAAC"}
|
|
@@ -7,21 +7,25 @@ const function_zip_path_1 = require("../shared/function-zip-path");
|
|
|
7
7
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
8
8
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
9
9
|
const validate_memory_size_1 = require("../shared/validate-memory-size");
|
|
10
|
+
const validate_retention_period_1 = require("../shared/validate-retention-period");
|
|
10
11
|
const validate_timeout_1 = require("../shared/validate-timeout");
|
|
11
12
|
const create_function_1 = require("./create-function");
|
|
12
13
|
/**
|
|
13
14
|
* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
|
|
14
15
|
* @link https://v3.remotion.dev/docs/lambda/deployfunction
|
|
15
16
|
* @param options.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
|
|
17
|
+
* @param options.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
|
|
16
18
|
* @param options.region The region you want to deploy your function to.
|
|
17
19
|
* @param options.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.
|
|
18
20
|
* @param options.memorySizeInMb How much memory should be allocated to the Lambda function.
|
|
19
21
|
* @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
|
|
20
22
|
*/
|
|
21
23
|
const deployFunction = async (options) => {
|
|
24
|
+
var _a;
|
|
22
25
|
(0, validate_memory_size_1.validateMemorySize)(options.memorySizeInMb);
|
|
23
26
|
(0, validate_timeout_1.validateTimeout)(options.timeoutInSeconds);
|
|
24
27
|
(0, validate_aws_region_1.validateAwsRegion)(options.region);
|
|
28
|
+
(0, validate_retention_period_1.validateCloudWatchRetentionPeriod)(options.cloudWatchLogRetentionPeriodInDays);
|
|
25
29
|
const fnNameRender = `${constants_1.RENDER_FN_PREFIX}${constants_1.CURRENT_VERSION}-${options.memorySizeInMb}mb-${options.timeoutInSeconds}sec`;
|
|
26
30
|
const accountId = await (0, get_account_id_1.getAccountId)({ region: options.region });
|
|
27
31
|
const fns = await (0, get_functions_1.getFunctions)({
|
|
@@ -39,6 +43,7 @@ const deployFunction = async (options) => {
|
|
|
39
43
|
accountId,
|
|
40
44
|
memorySizeInMb: options.memorySizeInMb,
|
|
41
45
|
timeoutInSeconds: options.timeoutInSeconds,
|
|
46
|
+
retentionInDays: (_a = options.cloudWatchLogRetentionPeriodInDays) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD,
|
|
42
47
|
alreadyCreated: Boolean(alreadyDeployed),
|
|
43
48
|
});
|
|
44
49
|
if (!created.FunctionName) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-function.js","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":";;;AAAA,wDAAkD;AAElD,
|
|
1
|
+
{"version":3,"file":"deploy-function.js","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":";;;AAAA,wDAAkD;AAElD,mDAI6B;AAC7B,mEAAyD;AACzD,6DAAsD;AACtD,uEAAgE;AAChE,yEAAkE;AAClE,mFAAsF;AACtF,iEAA2D;AAC3D,uDAAiD;AAejD;;;;;;;;;GASG;AACI,MAAM,cAAc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IAEH,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACtD;IAED,OAAO;QACN,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC;KACxC,CAAC;AACH,CAAC,CAAC;AA7CW,QAAA,cAAc,kBA6CzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-site.d.ts","sourceRoot":"","sources":["../../src/api/deploy-site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAC,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-site.d.ts","sourceRoot":"","sources":["../../src/api/deploy-site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAC,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAWjD,OAAO,EAAY,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAE1D,oBAAY,eAAe,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QACT,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QAC9C,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;QACvD,eAAe,CAAC,EAAE,iBAAiB,CAAC;QACpC,aAAa,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,oBAAY,gBAAgB,GAAG,OAAO,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,2DAMpB,eAAe,qBAqDjB,CAAC"}
|
package/dist/api/deploy-site.js
CHANGED
|
@@ -9,6 +9,7 @@ const get_account_id_1 = require("../shared/get-account-id");
|
|
|
9
9
|
const make_s3_url_1 = require("../shared/make-s3-url");
|
|
10
10
|
const random_hash_1 = require("../shared/random-hash");
|
|
11
11
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
12
|
+
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
12
13
|
const validate_site_name_1 = require("../shared/validate-site-name");
|
|
13
14
|
const bucket_exists_1 = require("./bucket-exists");
|
|
14
15
|
const enable_s3_website_1 = require("./enable-s3-website");
|
|
@@ -25,12 +26,7 @@ const upload_dir_1 = require("./upload-dir");
|
|
|
25
26
|
const deploySite = async ({ bucketName, entryPoint, siteName, options, region, }) => {
|
|
26
27
|
var _a, _b, _c, _d;
|
|
27
28
|
(0, validate_aws_region_1.validateAwsRegion)(region);
|
|
28
|
-
|
|
29
|
-
throw new Error(`The bucketName parameter must start with ${constants_1.REMOTION_BUCKET_PREFIX}.`);
|
|
30
|
-
}
|
|
31
|
-
if (typeof siteName !== 'string' && typeof siteName !== 'undefined') {
|
|
32
|
-
throw new TypeError('The `projectName` argument must be a string if provided.');
|
|
33
|
-
}
|
|
29
|
+
(0, validate_bucketname_1.validateBucketName)(bucketName);
|
|
34
30
|
const siteId = siteName !== null && siteName !== void 0 ? siteName : (0, random_hash_1.randomHash)();
|
|
35
31
|
(0, validate_site_name_1.validateSiteName)(siteId);
|
|
36
32
|
const bucketExists = await (0, bucket_exists_1.bucketExistsInRegion)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-site.js","sourceRoot":"","sources":["../../src/api/deploy-site.ts"],"names":[],"mappings":";;;AAAA,uCAAsD;AACtD,oDAA8C;AAE9C,uDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"deploy-site.js","sourceRoot":"","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I,SAAS,GAAG;QAC5B,eAAe,EACd,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,mCAAI,oBAAS,CAAC,oBAAoB,EAAE;QAC7D,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,mCAAI,oBAAS,CAAC,iBAAiB,EAAE;KACtE,CACD,CAAC;IAEF,MAAM,OAAO,CAAC,GAAG,CAAC;QACjB,IAAA,sBAAS,EAAC;YACT,MAAM,EAAE,UAAU;YAClB,MAAM;YACN,GAAG,EAAE,OAAO;YACZ,UAAU,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,mCAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;YAC1D,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,QAAQ;SACjB,CAAC;QACF,IAAA,mCAAe,EAAC;YACf,MAAM;YACN,UAAU;SACV,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACN,QAAQ,EAAE,IAAA,4BAAc,EAAC,EAAC,UAAU,EAAE,SAAS,EAAE,MAAM,EAAC,CAAC;QACzD,QAAQ,EAAE,MAAM;KAChB,CAAC;AACH,CAAC,CAAC;AA3DW,QAAA,UAAU,cA2DrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-media.d.ts","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"download-media.d.ts","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":"AAIA,OAAO,EAEN,sBAAsB,EACtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD,oBAAY,kBAAkB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACpC,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,UAClB,kBAAkB,KACvB,QAAQ,mBAAmB,CA0B7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,UAhClB,kBAAkB,KACvB,QAAQ,mBAAmB,CA+BY,CAAC"}
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.downloadVideo = exports.downloadMedia = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const fs_1 = require("fs");
|
|
9
8
|
const path_1 = __importDefault(require("path"));
|
|
10
9
|
const expected_out_name_1 = require("../functions/helpers/expected-out-name");
|
|
11
10
|
const get_render_metadata_1 = require("../functions/helpers/get-render-metadata");
|
|
@@ -22,25 +21,15 @@ const downloadMedia = async (input) => {
|
|
|
22
21
|
region: input.region,
|
|
23
22
|
renderId: input.renderId,
|
|
24
23
|
});
|
|
25
|
-
const
|
|
24
|
+
const outputPath = path_1.default.resolve(process.cwd(), input.outPath);
|
|
25
|
+
renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
|
|
26
|
+
const { sizeInBytes } = await (0, read_with_progress_1.lambdaDownloadFileWithProgress)({
|
|
26
27
|
bucketName: input.bucketName,
|
|
27
28
|
expectedBucketOwner,
|
|
28
29
|
key: (0, expected_out_name_1.getExpectedOutName)(renderMetadata),
|
|
29
30
|
region: input.region,
|
|
30
31
|
onProgress: (_a = input.onProgress) !== null && _a !== void 0 ? _a : (() => undefined),
|
|
31
|
-
|
|
32
|
-
const outputPath = path_1.default.resolve(process.cwd(), input.outPath);
|
|
33
|
-
renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
|
|
34
|
-
const writeStream = (0, fs_1.createWriteStream)(outputPath);
|
|
35
|
-
let sizeInBytes = 0;
|
|
36
|
-
await new Promise((resolve, reject) => {
|
|
37
|
-
readable
|
|
38
|
-
.on('data', (d) => {
|
|
39
|
-
sizeInBytes += d.length;
|
|
40
|
-
})
|
|
41
|
-
.pipe(writeStream)
|
|
42
|
-
.on('error', (err) => reject(err))
|
|
43
|
-
.on('close', () => resolve());
|
|
32
|
+
outputPath,
|
|
44
33
|
});
|
|
45
34
|
return {
|
|
46
35
|
outputPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-media.js","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"download-media.js","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAmD;AACnD,gDAAwB;AACxB,8EAA0E;AAC1E,kFAA2E;AAC3E,gFAGiD;AAEjD,6DAAsD;AAe/C,MAAM,aAAa,GAAG,KAAK,EACjC,KAAyB,EACM,EAAE;;IACjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,6BAAY,EAAC;QAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;KACpB,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,MAAM,IAAA,uCAAiB,EAAC;QAC9C,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,mBAAmB;QACnB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACxB,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,0BAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,EAAC,WAAW,EAAC,GAAG,MAAM,IAAA,mDAA8B,EAAC;QAC1D,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,mBAAmB;QACnB,GAAG,EAAE,IAAA,sCAAkB,EAAC,cAAc,CAAC;QACvC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,UAAU,EAAE,MAAA,KAAK,CAAC,UAAU,mCAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;QACjD,UAAU;KACV,CAAC,CAAC;IAEH,OAAO;QACN,UAAU;QACV,WAAW;KACX,CAAC;AACH,CAAC,CAAC;AA5BW,QAAA,aAAa,iBA4BxB;AAEF;;GAEG;AACU,QAAA,aAAa,GAAG,qBAAa,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as CloudWatchSDK from '@aws-sdk/client-cloudwatch-logs';
|
|
2
|
+
import * as IamSdk from '@aws-sdk/client-iam';
|
|
3
|
+
import * as LambdaSDK from '@aws-sdk/client-lambda';
|
|
4
|
+
import * as S3SDK from '@aws-sdk/client-s3';
|
|
5
|
+
import { AwsRegion } from '../client';
|
|
6
|
+
import { ServiceMapping } from '../shared/aws-clients';
|
|
7
|
+
export declare type GetAwsClientInput<T extends keyof ServiceMapping> = {
|
|
8
|
+
region: AwsRegion;
|
|
9
|
+
service: T;
|
|
10
|
+
};
|
|
11
|
+
declare type SdkMapping = {
|
|
12
|
+
s3: typeof S3SDK;
|
|
13
|
+
cloudwatch: typeof CloudWatchSDK;
|
|
14
|
+
iam: typeof IamSdk;
|
|
15
|
+
lambda: typeof LambdaSDK;
|
|
16
|
+
};
|
|
17
|
+
export declare type GetAwsClientOutput<T extends keyof ServiceMapping> = {
|
|
18
|
+
client: ServiceMapping[T];
|
|
19
|
+
sdk: SdkMapping[T];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @description Gets the full AWS SDK and an instantiated client for an AWS service
|
|
23
|
+
* @link https://v3.remotion.dev/docs/lambda/getawsclient
|
|
24
|
+
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
25
|
+
* @param {string} params.service One of `iam`, `s3`, `cloudwatch` and `iam`
|
|
26
|
+
* @returns {GetAwsClientOutput<T>} Returns `client` and `sdk` of a AWS service
|
|
27
|
+
*/
|
|
28
|
+
export declare const getAwsClient: <T extends keyof ServiceMapping>({ region, service, }: GetAwsClientInput<T>) => GetAwsClientOutput<T>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=get-aws-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-aws-client.d.ts","sourceRoot":"","sources":["../../src/api/get-aws-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AACpC,OAAO,EAAmB,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAEvE,oBAAY,iBAAiB,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;IAC/D,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,CAAC,CAAC;CACX,CAAC;AAEF,aAAK,UAAU,GAAG;IACjB,EAAE,EAAE,OAAO,KAAK,CAAC;IACjB,UAAU,EAAE,OAAO,aAAa,CAAC;IACjC,GAAG,EAAE,OAAO,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,SAAS,CAAC;CACzB,CAAC;AAEF,oBAAY,kBAAkB,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;IAChE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,uGAaxB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.getAwsClient = void 0;
|
|
23
|
+
const CloudWatchSDK = __importStar(require("@aws-sdk/client-cloudwatch-logs"));
|
|
24
|
+
const IamSdk = __importStar(require("@aws-sdk/client-iam"));
|
|
25
|
+
const LambdaSDK = __importStar(require("@aws-sdk/client-lambda"));
|
|
26
|
+
const S3SDK = __importStar(require("@aws-sdk/client-s3"));
|
|
27
|
+
const aws_clients_1 = require("../shared/aws-clients");
|
|
28
|
+
/**
|
|
29
|
+
* @description Gets the full AWS SDK and an instantiated client for an AWS service
|
|
30
|
+
* @link https://v3.remotion.dev/docs/lambda/getawsclient
|
|
31
|
+
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
32
|
+
* @param {string} params.service One of `iam`, `s3`, `cloudwatch` and `iam`
|
|
33
|
+
* @returns {GetAwsClientOutput<T>} Returns `client` and `sdk` of a AWS service
|
|
34
|
+
*/
|
|
35
|
+
const getAwsClient = ({ region, service, }) => {
|
|
36
|
+
return {
|
|
37
|
+
client: (0, aws_clients_1.getServiceClient)(region, service),
|
|
38
|
+
sdk: {
|
|
39
|
+
lambda: LambdaSDK,
|
|
40
|
+
cloudwatch: CloudWatchSDK,
|
|
41
|
+
iam: IamSdk,
|
|
42
|
+
s3: S3SDK,
|
|
43
|
+
}[service],
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
exports.getAwsClient = getAwsClient;
|
|
47
|
+
//# sourceMappingURL=get-aws-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-aws-client.js","sourceRoot":"","sources":["../../src/api/get-aws-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+EAAiE;AACjE,4DAA8C;AAC9C,kEAAoD;AACpD,0DAA4C;AAE5C,uDAAuE;AAmBvE;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAAiC,EAC5D,MAAM,EACN,OAAO,GACe,EAAyB,EAAE;IACjD,OAAO;QACN,MAAM,EAAE,IAAA,8BAAgB,EAAC,MAAM,EAAE,OAAO,CAAC;QACzC,GAAG,EAAE;YACJ,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,aAAa;YACzB,GAAG,EAAE,MAAM;YACX,EAAE,EAAE,KAAK;SACT,CAAC,OAAO,CAAC;KACV,CAAC;AACH,CAAC,CAAC;AAbW,QAAA,YAAY,gBAavB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
export declare type PresignURLInput = {
|
|
3
|
+
region: AwsRegion;
|
|
4
|
+
bucketName: string;
|
|
5
|
+
objectKey: string;
|
|
6
|
+
checkIfObjectExists?: boolean;
|
|
7
|
+
expiresInSeconds: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @description Returns a public url of an object stored in Remotion's S3 bucket.
|
|
11
|
+
* @link https://v3.remotion.dev/docs/lambda/presignurl
|
|
12
|
+
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
13
|
+
* @param {string} params.bucketName The name of the bucket to fetch the object from.
|
|
14
|
+
* @param {string} params.objectKey Key of the S3 object to get.
|
|
15
|
+
* @param {string} params.expiresIn The number of seconds before the presigned URL expires. Default 120.
|
|
16
|
+
* @param {boolean} params.checkIfObjectExists Whether the function should check if the object exists in the bucket before generating the presigned url.
|
|
17
|
+
* @returns {Promise<string | null>} The public url of an object or `null` if `checkIfObjectExists=true` & object does not exist.
|
|
18
|
+
*/
|
|
19
|
+
export declare const presignUrl: ({ region, bucketName, objectKey, checkIfObjectExists, expiresInSeconds, }: PresignURLInput) => Promise<string | null>;
|
|
20
|
+
//# sourceMappingURL=presign-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presign-url.d.ts","sourceRoot":"","sources":["../../src/api/presign-url.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAKjD,oBAAY,eAAe,GAAG;IAC7B,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,8EAMpB,eAAe,KAAG,QAAQ,MAAM,GAAG,IAAI,CAiCzC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.presignUrl = void 0;
|
|
4
|
+
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
|
+
const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
|
|
6
|
+
const aws_clients_1 = require("../shared/aws-clients");
|
|
7
|
+
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
8
|
+
const validate_presign_expiration_1 = require("../shared/validate-presign-expiration");
|
|
9
|
+
/**
|
|
10
|
+
* @description Returns a public url of an object stored in Remotion's S3 bucket.
|
|
11
|
+
* @link https://v3.remotion.dev/docs/lambda/presignurl
|
|
12
|
+
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
13
|
+
* @param {string} params.bucketName The name of the bucket to fetch the object from.
|
|
14
|
+
* @param {string} params.objectKey Key of the S3 object to get.
|
|
15
|
+
* @param {string} params.expiresIn The number of seconds before the presigned URL expires. Default 120.
|
|
16
|
+
* @param {boolean} params.checkIfObjectExists Whether the function should check if the object exists in the bucket before generating the presigned url.
|
|
17
|
+
* @returns {Promise<string | null>} The public url of an object or `null` if `checkIfObjectExists=true` & object does not exist.
|
|
18
|
+
*/
|
|
19
|
+
const presignUrl = async ({ region, bucketName, objectKey, checkIfObjectExists = false, expiresInSeconds, }) => {
|
|
20
|
+
(0, validate_bucketname_1.validateBucketName)(bucketName);
|
|
21
|
+
(0, validate_presign_expiration_1.validatePresignExpiration)(expiresInSeconds);
|
|
22
|
+
const s3Client = (0, aws_clients_1.getS3Client)(region);
|
|
23
|
+
if (checkIfObjectExists) {
|
|
24
|
+
try {
|
|
25
|
+
await s3Client.send(new client_s3_1.HeadObjectCommand({
|
|
26
|
+
Bucket: bucketName,
|
|
27
|
+
Key: objectKey,
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
if (err.name === 'NotFound') {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
throw err;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const objCommand = new client_s3_1.GetObjectCommand({
|
|
38
|
+
Bucket: bucketName,
|
|
39
|
+
Key: objectKey,
|
|
40
|
+
});
|
|
41
|
+
const publicUrl = await (0, s3_request_presigner_1.getSignedUrl)(s3Client, objCommand, {
|
|
42
|
+
expiresIn: expiresInSeconds,
|
|
43
|
+
});
|
|
44
|
+
return publicUrl;
|
|
45
|
+
};
|
|
46
|
+
exports.presignUrl = presignUrl;
|
|
47
|
+
//# sourceMappingURL=presign-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presign-url.js","sourceRoot":"","sources":["../../src/api/presign-url.ts"],"names":[],"mappings":";;;AAAA,kDAAuE;AACvE,wEAA2D;AAE3D,uDAAkD;AAClD,uEAAiE;AACjE,uFAAgF;AAUhF;;;;;;;;;GASG;AACI,MAAM,UAAU,GAAG,KAAK,EAAE,EAChC,MAAM,EACN,UAAU,EACV,SAAS,EACT,mBAAmB,GAAG,KAAK,EAC3B,gBAAgB,GACC,EAA0B,EAAE;IAC7C,IAAA,wCAAkB,EAAC,UAAU,CAAC,CAAC;IAC/B,IAAA,uDAAyB,EAAC,gBAAgB,CAAC,CAAC;IAE5C,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,MAAM,CAAC,CAAC;IAErC,IAAI,mBAAmB,EAAE;QACxB,IAAI;YACH,MAAM,QAAQ,CAAC,IAAI,CAClB,IAAI,6BAAiB,CAAC;gBACrB,MAAM,EAAE,UAAU;gBAClB,GAAG,EAAE,SAAS;aACd,CAAC,CACF,CAAC;SACF;QAAC,OAAO,GAAG,EAAE;YACb,IAAK,GAAsB,CAAC,IAAI,KAAK,UAAU,EAAE;gBAChD,OAAO,IAAI,CAAC;aACZ;YAED,MAAM,GAAG,CAAC;SACV;KACD;IAED,MAAM,UAAU,GAAG,IAAI,4BAAgB,CAAC;QACvC,MAAM,EAAE,UAAU;QAClB,GAAG,EAAE,SAAS;KACd,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,MAAM,IAAA,mCAAY,EAAC,QAAQ,EAAE,UAAU,EAAE;QAC1D,SAAS,EAAE,gBAAgB;KAC3B,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC;AAvCW,QAAA,UAAU,cAuCrB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChromiumOptions } from '@remotion/renderer/src/open-browser';
|
|
1
2
|
import { FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from 'remotion';
|
|
2
3
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
4
|
import { Privacy } from '../shared/constants';
|
|
@@ -20,6 +21,10 @@ export declare type RenderMediaOnLambdaInput = {
|
|
|
20
21
|
enableChunkOptimization?: boolean;
|
|
21
22
|
logLevel?: LogLevel;
|
|
22
23
|
frameRange?: FrameRange;
|
|
24
|
+
outName?: string;
|
|
25
|
+
timeoutInMilliseconds?: number;
|
|
26
|
+
chromiumOptions?: ChromiumOptions;
|
|
27
|
+
scale?: number;
|
|
23
28
|
};
|
|
24
29
|
export declare type RenderMediaOnLambdaOutput = {
|
|
25
30
|
renderId: string;
|
|
@@ -44,9 +49,9 @@ export declare type RenderMediaOnLambdaOutput = {
|
|
|
44
49
|
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
45
50
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
46
51
|
*/
|
|
47
|
-
export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
52
|
+
export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
48
53
|
/**
|
|
49
54
|
* @deprecated Renamed to renderMediaOnLambda()
|
|
50
55
|
*/
|
|
51
|
-
export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
56
|
+
export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
52
57
|
//# sourceMappingURL=render-media-on-lambda.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-media-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render-media-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACN,UAAU,EACV,WAAW,EAEX,QAAQ,EACR,WAAW,EACX,aAAa,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAiB,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAI5D,oBAAY,wBAAwB,GAAG;IACtC,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC1C,WAAW,EAAE,WAAW,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,mBAAmB,0RAuB7B,wBAAwB,KAAG,QAAQ,yBAAyB,CAoC9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,0RAzC7B,wBAAwB,KAAG,QAAQ,yBAAyB,CAyCT,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderVideoOnLambda = exports.renderMediaOnLambda = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
4
5
|
const remotion_1 = require("remotion");
|
|
5
6
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
6
7
|
const constants_1 = require("../shared/constants");
|
|
@@ -25,14 +26,15 @@ const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lamb
|
|
|
25
26
|
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
26
27
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
27
28
|
*/
|
|
28
|
-
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, }) => {
|
|
29
|
-
(0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda);
|
|
29
|
+
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, }) => {
|
|
30
|
+
(0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null);
|
|
31
|
+
renderer_1.RenderInternals.validateScale(scale);
|
|
30
32
|
const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
|
|
31
33
|
const res = await (0, call_lambda_1.callLambda)({
|
|
32
34
|
functionName,
|
|
33
35
|
type: constants_1.LambdaRoutines.start,
|
|
34
36
|
payload: {
|
|
35
|
-
framesPerLambda: framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda :
|
|
37
|
+
framesPerLambda: framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null,
|
|
36
38
|
composition,
|
|
37
39
|
serveUrl: realServeUrl,
|
|
38
40
|
inputProps,
|
|
@@ -48,6 +50,10 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
|
|
|
48
50
|
enableChunkOptimization,
|
|
49
51
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : remotion_1.Internals.Logging.DEFAULT_LOG_LEVEL,
|
|
50
52
|
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
53
|
+
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
54
|
+
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : remotion_1.Internals.DEFAULT_PUPPETEER_TIMEOUT,
|
|
55
|
+
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
|
|
56
|
+
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
51
57
|
},
|
|
52
58
|
region,
|
|
53
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-media-on-lambda.js","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":";;;AAAA,uCAOkB;AAElB,uDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"render-media-on-lambda.js","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":";;;AAAA,iDAAmD;AAEnD,uCAOkB;AAElB,uDAAiD;AACjD,mDAA4D;AAC5D,yEAAiE;AACjE,qFAA6E;AAgC7E;;;;;;;;;;;;;;;;;;GAkBG;AAEI,MAAM,mBAAmB,GAAG,KAAK,EAAE,EACzC,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,KAAK,EACL,WAAW,EACX,GAAG,EACH,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,EACP,MAAM,EACN,UAAU,EACV,WAAW,EACX,eAAe,EACf,OAAO,EACP,uBAAuB,EACvB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,qBAAqB,EACrB,eAAe,EACf,KAAK,GACqB,EAAsC,EAAE;IAClE,IAAA,oDAAuB,EAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI,CAAC,CAAC;IACjD,0BAAe,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,MAAM,IAAA,wCAAiB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAU,EAAC;QAC5B,YAAY;QACZ,IAAI,EAAE,0BAAc,CAAC,KAAK;QAC1B,OAAO,EAAE;YACR,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI;YACxC,WAAW;YACX,QAAQ,EAAE,YAAY;YACtB,UAAU;YACV,KAAK;YACL,WAAW;YACX,GAAG;YACH,YAAY;YACZ,WAAW;YACX,aAAa;YACb,OAAO;YACP,UAAU;YACV,OAAO;YACP,uBAAuB;YACvB,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,oBAAS,CAAC,OAAO,CAAC,iBAAiB;YACzD,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,IAAI;YAC9B,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI;YACxB,qBAAqB,EACpB,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,oBAAS,CAAC,yBAAyB;YAC7D,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE;YACtC,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC;SACjB;QACD,MAAM;KACN,CAAC,CAAC;IACH,OAAO;QACN,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,UAAU,EAAE,GAAG,CAAC,UAAU;KAC1B,CAAC;AACH,CAAC,CAAC;AA3DW,QAAA,mBAAmB,uBA2D9B;AAEF;;GAEG;AACU,QAAA,mBAAmB,GAAG,2BAAmB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChromiumOptions } from '@remotion/renderer/src/open-browser';
|
|
1
2
|
import { LogLevel, StillImageFormat } from 'remotion';
|
|
2
3
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
4
|
import { CostsInfo } from '../shared/constants';
|
|
@@ -14,6 +15,10 @@ export declare type RenderStillOnLambdaInput = {
|
|
|
14
15
|
quality?: number;
|
|
15
16
|
frame?: number;
|
|
16
17
|
logLevel?: LogLevel;
|
|
18
|
+
outName?: string;
|
|
19
|
+
timeoutInMilliseconds?: number;
|
|
20
|
+
chromiumOptions?: ChromiumOptions;
|
|
21
|
+
scale?: number;
|
|
17
22
|
};
|
|
18
23
|
export declare type RenderStillOnLambdaOutput = {
|
|
19
24
|
estimatedPrice: CostsInfo;
|
|
@@ -38,5 +43,5 @@ export declare type RenderStillOnLambdaOutput = {
|
|
|
38
43
|
* @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
|
|
39
44
|
* @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
|
|
40
45
|
*/
|
|
41
|
-
export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
46
|
+
export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
42
47
|
//# sourceMappingURL=render-still-on-lambda.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-still-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-still-on-lambda.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render-still-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-still-on-lambda.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAY,QAAQ,EAAE,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EACN,SAAS,EAGT,MAAM,qBAAqB,CAAC;AAG7B,oBAAY,wBAAwB,GAAG;IACtC,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,OAAO,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,cAAc,EAAE,SAAS,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,mBAAmB,mMAiB7B,wBAAwB,KAAG,QAAQ,yBAAyB,CAiC9D,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
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
|
+
const remotion_1 = require("remotion");
|
|
4
6
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
5
7
|
const constants_1 = require("../shared/constants");
|
|
6
8
|
const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
|
|
@@ -20,8 +22,9 @@ const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
|
|
|
20
22
|
* @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
|
|
21
23
|
* @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
|
|
22
24
|
*/
|
|
23
|
-
const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, }) => {
|
|
25
|
+
const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, }) => {
|
|
24
26
|
const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
|
|
27
|
+
renderer_1.RenderInternals.validateScale(scale);
|
|
25
28
|
const res = await (0, call_lambda_1.callLambda)({
|
|
26
29
|
functionName,
|
|
27
30
|
type: constants_1.LambdaRoutines.still,
|
|
@@ -36,7 +39,11 @@ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFo
|
|
|
36
39
|
frame: frame !== null && frame !== void 0 ? frame : 0,
|
|
37
40
|
privacy,
|
|
38
41
|
attempt: 1,
|
|
39
|
-
logLevel,
|
|
42
|
+
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : remotion_1.Internals.Logging.DEFAULT_LOG_LEVEL,
|
|
43
|
+
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
44
|
+
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : remotion_1.Internals.DEFAULT_PUPPETEER_TIMEOUT,
|
|
45
|
+
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
|
|
46
|
+
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
40
47
|
},
|
|
41
48
|
region,
|
|
42
49
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-still-on-lambda.js","sourceRoot":"","sources":["../../src/api/render-still-on-lambda.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file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aAAL,KAAK,cAAL,KAAK,GAAI,CAAC;SACjB;QACD,MAAM;KACN,CAAC,CAAC;IACH,OAAO;QACN,cAAc,EAAE,GAAG,CAAC,cAAc;QAClC,GAAG,EAAE,GAAG,CAAC,MAAM;QACf,WAAW,EAAE,GAAG,CAAC,IAAI;QACrB,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,QAAQ,EAAE,GAAG,CAAC,QAAQ;KACtB,CAAC;AACH,CAAC,CAAC;AAlDW,QAAA,mBAAmB,uBAkD9B"}
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ declare type LambdaCommandLineOptions = {
|
|
|
6
6
|
region: AwsRegion;
|
|
7
7
|
memory: number;
|
|
8
8
|
timeout: number;
|
|
9
|
+
['retention-period']: number;
|
|
9
10
|
y: boolean;
|
|
10
11
|
yes: boolean;
|
|
11
12
|
force: boolean;
|
|
@@ -15,6 +16,7 @@ declare type LambdaCommandLineOptions = {
|
|
|
15
16
|
['save-browser-logs']: boolean;
|
|
16
17
|
['disable-cloudwatch']: boolean;
|
|
17
18
|
['max-retries']: number;
|
|
19
|
+
['out-name']: string | undefined;
|
|
18
20
|
privacy: Privacy;
|
|
19
21
|
};
|
|
20
22
|
export declare const parsedLambdaCli: LambdaCommandLineOptions & minimist.ParsedArgs;
|
package/dist/cli/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAE5C,aAAK,wBAAwB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,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AAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,eAAe,gDAK3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAIZ,CAAC"}
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA2C;AAC3C,wDAAgC;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA2C;AAC3C,wDAAgC;AAwBnB,QAAA,eAAe,GAAG,IAAA,kBAAQ,EACtC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACC,OAAO,EAAE,kBAAY,CAAC,YAAY;CAClC,CACD,CAAC;AAEW,QAAA,iBAAiB,GAC7B,uBAAe,CAAC,CAAC;IACjB,uBAAe,CAAC,KAAK;IACrB,uBAAe,CAAC,GAAG;IACnB,uBAAe,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/functions/deploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/functions/deploy.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,2BAA2B,WAAW,CAAC;AAEpD,eAAO,MAAM,yBAAyB,qBA6CrC,CAAC"}
|