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