@remotion/lambda-client 4.0.512 → 4.0.513
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/cjs/call-lambda-async.d.ts +1 -1
- package/dist/cjs/index.js +37 -20
- package/dist/esm/index.mjs +37 -20
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { CallFunctionOptions, CloudProvider, ServerlessRoutines } from '@remotion/serverless-client';
|
|
2
|
-
export declare const callFunctionAsyncImplementation: <T extends ServerlessRoutines, Provider extends CloudProvider<string, Record<string, unknown>, Record<string, unknown>, string, object>>({ functionName, payload, region, timeoutInTest, }: CallFunctionOptions<T, Provider>) => Promise<void>;
|
|
2
|
+
export declare const callFunctionAsyncImplementation: <T extends ServerlessRoutines, Provider extends CloudProvider<string, Record<string, unknown>, Record<string, unknown>, string, object>>({ functionName, payload, region, timeoutInTest, requestHandler, }: CallFunctionOptions<T, Provider>) => Promise<void>;
|
package/dist/cjs/index.js
CHANGED
|
@@ -70818,7 +70818,9 @@ var interpolateString = ({
|
|
|
70818
70818
|
}) => {
|
|
70819
70819
|
const initiallyParsedOutputRange = outputRange.map(parseStringInterpolationValue);
|
|
70820
70820
|
const hasAxisRotation = initiallyParsedOutputRange.some((parsed) => parsed.axisRotation);
|
|
70821
|
-
const
|
|
70821
|
+
const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
|
|
70822
|
+
const segmentIndex = inputRange.length === 1 ? 0 : findRange(posterizedInput, inputRange);
|
|
70823
|
+
const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed, index) => {
|
|
70822
70824
|
if (parsed.kind !== "rotate") {
|
|
70823
70825
|
return parsed;
|
|
70824
70826
|
}
|
|
@@ -70828,9 +70830,11 @@ var interpolateString = ({
|
|
|
70828
70830
|
if (parsed.dimensions !== 1) {
|
|
70829
70831
|
throw new TypeError("Cannot interpolate a multi-angle rotate value with an axis rotation");
|
|
70830
70832
|
}
|
|
70833
|
+
const adjacentAxisRotation = parsed.values[0] === 0 ? index === segmentIndex ? initiallyParsedOutputRange[index + 1] : index === segmentIndex + 1 ? initiallyParsedOutputRange[index - 1] : undefined : undefined;
|
|
70834
|
+
const axis = adjacentAxisRotation?.axisRotation ? adjacentAxisRotation.values : [0, 0, 1];
|
|
70831
70835
|
return {
|
|
70832
70836
|
kind: "rotate",
|
|
70833
|
-
values: [0,
|
|
70837
|
+
values: [axis[0], axis[1], axis[2], parsed.values[0]],
|
|
70834
70838
|
units: [null, null, null, parsed.units[0]],
|
|
70835
70839
|
dimensions: 4,
|
|
70836
70840
|
axisRotation: true
|
|
@@ -72198,7 +72202,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
|
|
|
72198
72202
|
}
|
|
72199
72203
|
}
|
|
72200
72204
|
};
|
|
72201
|
-
var VERSION = "4.0.
|
|
72205
|
+
var VERSION = "4.0.513";
|
|
72202
72206
|
var isColorSupported = () => {
|
|
72203
72207
|
const env = process.env || {};
|
|
72204
72208
|
const isForceDisabled = "NO_COLOR" in env;
|
|
@@ -74341,8 +74345,7 @@ var getCredentialsHash = ({
|
|
|
74341
74345
|
customCredentials,
|
|
74342
74346
|
region,
|
|
74343
74347
|
service,
|
|
74344
|
-
forcePathStyle
|
|
74345
|
-
requestHandler
|
|
74348
|
+
forcePathStyle
|
|
74346
74349
|
}) => {
|
|
74347
74350
|
const hashComponents = {};
|
|
74348
74351
|
if (getEnvVariable("REMOTION_SKIP_AWS_CREDENTIALS_CHECK")) {
|
|
@@ -74372,10 +74375,19 @@ var getCredentialsHash = ({
|
|
|
74372
74375
|
hashComponents.region = region;
|
|
74373
74376
|
hashComponents.service = service;
|
|
74374
74377
|
hashComponents.forcePathStyle = forcePathStyle;
|
|
74375
|
-
hashComponents.requestHandler = requestHandler;
|
|
74376
74378
|
return random(JSON.stringify(hashComponents)).toString().replace("0.", "");
|
|
74377
74379
|
};
|
|
74378
74380
|
var _clients = {};
|
|
74381
|
+
var _clientsWithCustomHandler = new WeakMap;
|
|
74382
|
+
var getCustomHandlerClientCache = (requestHandler) => {
|
|
74383
|
+
const existing = _clientsWithCustomHandler.get(requestHandler);
|
|
74384
|
+
if (existing) {
|
|
74385
|
+
return existing;
|
|
74386
|
+
}
|
|
74387
|
+
const created = {};
|
|
74388
|
+
_clientsWithCustomHandler.set(requestHandler, created);
|
|
74389
|
+
return created;
|
|
74390
|
+
};
|
|
74379
74391
|
function getServiceClient({
|
|
74380
74392
|
region,
|
|
74381
74393
|
service,
|
|
@@ -74408,17 +74420,17 @@ function getServiceClient({
|
|
|
74408
74420
|
region,
|
|
74409
74421
|
customCredentials,
|
|
74410
74422
|
service,
|
|
74411
|
-
forcePathStyle
|
|
74412
|
-
requestHandler
|
|
74423
|
+
forcePathStyle
|
|
74413
74424
|
});
|
|
74414
|
-
|
|
74425
|
+
const cache2 = requestHandler ? getCustomHandlerClientCache(requestHandler) : _clients;
|
|
74426
|
+
if (!cache2[key]) {
|
|
74415
74427
|
checkCredentials();
|
|
74416
74428
|
const lambdaOptions = service === "lambda" ? {
|
|
74417
74429
|
httpsAgent: {
|
|
74418
74430
|
maxSockets: MAX_FUNCTIONS_PER_RENDER * 2
|
|
74419
74431
|
}
|
|
74420
74432
|
} : undefined;
|
|
74421
|
-
const finalRequestHandler = requestHandler
|
|
74433
|
+
const finalRequestHandler = requestHandler ?? lambdaOptions;
|
|
74422
74434
|
const client = customCredentials ? new Client({
|
|
74423
74435
|
region: customCredentials.region ?? "us-east-1",
|
|
74424
74436
|
credentials: customCredentials.accessKeyId && customCredentials.secretAccessKey ? {
|
|
@@ -74442,9 +74454,9 @@ function getServiceClient({
|
|
|
74442
74454
|
if (getEnvVariable("REMOTION_DISABLE_AWS_CLIENT_CACHE")) {
|
|
74443
74455
|
return client;
|
|
74444
74456
|
}
|
|
74445
|
-
|
|
74457
|
+
cache2[key] = client;
|
|
74446
74458
|
}
|
|
74447
|
-
return
|
|
74459
|
+
return cache2[key];
|
|
74448
74460
|
}
|
|
74449
74461
|
|
|
74450
74462
|
// src/aws-clients.ts
|
|
@@ -74594,13 +74606,14 @@ var callFunctionAsyncImplementation = async ({
|
|
|
74594
74606
|
functionName,
|
|
74595
74607
|
payload,
|
|
74596
74608
|
region,
|
|
74597
|
-
timeoutInTest
|
|
74609
|
+
timeoutInTest,
|
|
74610
|
+
requestHandler
|
|
74598
74611
|
}) => {
|
|
74599
74612
|
const stringifiedPayload = JSON.stringify(payload);
|
|
74600
74613
|
if (stringifiedPayload.length > 256 * 1024) {
|
|
74601
74614
|
throw new Error(`Payload is too big: ${stringifiedPayload.length} bytes. Maximum size is 256 KB. This should not happen, please report this to the Remotion team. Payload: ${stringifiedPayload}`);
|
|
74602
74615
|
}
|
|
74603
|
-
const result = await getLambdaClient(region, timeoutInTest, null).send(new import_client_lambda2.InvokeCommand({
|
|
74616
|
+
const result = await getLambdaClient(region, timeoutInTest, requestHandler ?? null).send(new import_client_lambda2.InvokeCommand({
|
|
74604
74617
|
FunctionName: functionName,
|
|
74605
74618
|
Payload: stringifiedPayload,
|
|
74606
74619
|
InvocationType: "Event"
|
|
@@ -74627,9 +74640,10 @@ var invokeStreamOrTimeout = async ({
|
|
|
74627
74640
|
timeoutInTest,
|
|
74628
74641
|
functionName,
|
|
74629
74642
|
type,
|
|
74630
|
-
payload
|
|
74643
|
+
payload,
|
|
74644
|
+
requestHandler
|
|
74631
74645
|
}) => {
|
|
74632
|
-
const resProm = getLambdaClient(region, timeoutInTest, null).send(new import_client_lambda3.InvokeWithResponseStreamCommand({
|
|
74646
|
+
const resProm = getLambdaClient(region, timeoutInTest, requestHandler ?? null).send(new import_client_lambda3.InvokeWithResponseStreamCommand({
|
|
74633
74647
|
FunctionName: functionName,
|
|
74634
74648
|
Payload: JSON.stringify({ type, ...payload })
|
|
74635
74649
|
}));
|
|
@@ -74655,14 +74669,16 @@ var callLambdaWithStreamingWithoutRetry = async ({
|
|
|
74655
74669
|
payload,
|
|
74656
74670
|
region,
|
|
74657
74671
|
timeoutInTest,
|
|
74658
|
-
receivedStreamingPayload
|
|
74672
|
+
receivedStreamingPayload,
|
|
74673
|
+
requestHandler
|
|
74659
74674
|
}) => {
|
|
74660
74675
|
const res = await invokeStreamOrTimeout({
|
|
74661
74676
|
functionName,
|
|
74662
74677
|
payload,
|
|
74663
74678
|
region,
|
|
74664
74679
|
timeoutInTest,
|
|
74665
|
-
type
|
|
74680
|
+
type,
|
|
74681
|
+
requestHandler
|
|
74666
74682
|
});
|
|
74667
74683
|
const { onData, clear } = makeStreamer((status, messageTypeId, data) => {
|
|
74668
74684
|
const messageType = messageTypeIdToMessageType(messageTypeId);
|
|
@@ -74732,10 +74748,11 @@ var callLambdaSyncWithoutRetry = async ({
|
|
|
74732
74748
|
functionName,
|
|
74733
74749
|
payload,
|
|
74734
74750
|
region,
|
|
74735
|
-
timeoutInTest
|
|
74751
|
+
timeoutInTest,
|
|
74752
|
+
requestHandler
|
|
74736
74753
|
}) => {
|
|
74737
74754
|
const Payload = JSON.stringify(payload);
|
|
74738
|
-
const res = await getLambdaClient(region, timeoutInTest, null).send(new import_client_lambda4.InvokeCommand({
|
|
74755
|
+
const res = await getLambdaClient(region, timeoutInTest, requestHandler ?? null).send(new import_client_lambda4.InvokeCommand({
|
|
74739
74756
|
FunctionName: functionName,
|
|
74740
74757
|
Payload,
|
|
74741
74758
|
InvocationType: "RequestResponse"
|
package/dist/esm/index.mjs
CHANGED
|
@@ -70161,7 +70161,9 @@ var interpolateString = ({
|
|
|
70161
70161
|
}) => {
|
|
70162
70162
|
const initiallyParsedOutputRange = outputRange.map(parseStringInterpolationValue);
|
|
70163
70163
|
const hasAxisRotation = initiallyParsedOutputRange.some((parsed) => parsed.axisRotation);
|
|
70164
|
-
const
|
|
70164
|
+
const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
|
|
70165
|
+
const segmentIndex = inputRange.length === 1 ? 0 : findRange(posterizedInput, inputRange);
|
|
70166
|
+
const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed, index) => {
|
|
70165
70167
|
if (parsed.kind !== "rotate") {
|
|
70166
70168
|
return parsed;
|
|
70167
70169
|
}
|
|
@@ -70171,9 +70173,11 @@ var interpolateString = ({
|
|
|
70171
70173
|
if (parsed.dimensions !== 1) {
|
|
70172
70174
|
throw new TypeError("Cannot interpolate a multi-angle rotate value with an axis rotation");
|
|
70173
70175
|
}
|
|
70176
|
+
const adjacentAxisRotation = parsed.values[0] === 0 ? index === segmentIndex ? initiallyParsedOutputRange[index + 1] : index === segmentIndex + 1 ? initiallyParsedOutputRange[index - 1] : undefined : undefined;
|
|
70177
|
+
const axis = adjacentAxisRotation?.axisRotation ? adjacentAxisRotation.values : [0, 0, 1];
|
|
70174
70178
|
return {
|
|
70175
70179
|
kind: "rotate",
|
|
70176
|
-
values: [0,
|
|
70180
|
+
values: [axis[0], axis[1], axis[2], parsed.values[0]],
|
|
70177
70181
|
units: [null, null, null, parsed.units[0]],
|
|
70178
70182
|
dimensions: 4,
|
|
70179
70183
|
axisRotation: true
|
|
@@ -71541,7 +71545,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
|
|
|
71541
71545
|
}
|
|
71542
71546
|
}
|
|
71543
71547
|
};
|
|
71544
|
-
var VERSION = "4.0.
|
|
71548
|
+
var VERSION = "4.0.513";
|
|
71545
71549
|
var isColorSupported = () => {
|
|
71546
71550
|
const env = process.env || {};
|
|
71547
71551
|
const isForceDisabled = "NO_COLOR" in env;
|
|
@@ -73684,8 +73688,7 @@ var getCredentialsHash = ({
|
|
|
73684
73688
|
customCredentials,
|
|
73685
73689
|
region,
|
|
73686
73690
|
service,
|
|
73687
|
-
forcePathStyle
|
|
73688
|
-
requestHandler
|
|
73691
|
+
forcePathStyle
|
|
73689
73692
|
}) => {
|
|
73690
73693
|
const hashComponents = {};
|
|
73691
73694
|
if (getEnvVariable("REMOTION_SKIP_AWS_CREDENTIALS_CHECK")) {
|
|
@@ -73715,10 +73718,19 @@ var getCredentialsHash = ({
|
|
|
73715
73718
|
hashComponents.region = region;
|
|
73716
73719
|
hashComponents.service = service;
|
|
73717
73720
|
hashComponents.forcePathStyle = forcePathStyle;
|
|
73718
|
-
hashComponents.requestHandler = requestHandler;
|
|
73719
73721
|
return random(JSON.stringify(hashComponents)).toString().replace("0.", "");
|
|
73720
73722
|
};
|
|
73721
73723
|
var _clients = {};
|
|
73724
|
+
var _clientsWithCustomHandler = new WeakMap;
|
|
73725
|
+
var getCustomHandlerClientCache = (requestHandler) => {
|
|
73726
|
+
const existing = _clientsWithCustomHandler.get(requestHandler);
|
|
73727
|
+
if (existing) {
|
|
73728
|
+
return existing;
|
|
73729
|
+
}
|
|
73730
|
+
const created = {};
|
|
73731
|
+
_clientsWithCustomHandler.set(requestHandler, created);
|
|
73732
|
+
return created;
|
|
73733
|
+
};
|
|
73722
73734
|
function getServiceClient({
|
|
73723
73735
|
region,
|
|
73724
73736
|
service,
|
|
@@ -73751,17 +73763,17 @@ function getServiceClient({
|
|
|
73751
73763
|
region,
|
|
73752
73764
|
customCredentials,
|
|
73753
73765
|
service,
|
|
73754
|
-
forcePathStyle
|
|
73755
|
-
requestHandler
|
|
73766
|
+
forcePathStyle
|
|
73756
73767
|
});
|
|
73757
|
-
|
|
73768
|
+
const cache2 = requestHandler ? getCustomHandlerClientCache(requestHandler) : _clients;
|
|
73769
|
+
if (!cache2[key]) {
|
|
73758
73770
|
checkCredentials();
|
|
73759
73771
|
const lambdaOptions = service === "lambda" ? {
|
|
73760
73772
|
httpsAgent: {
|
|
73761
73773
|
maxSockets: MAX_FUNCTIONS_PER_RENDER * 2
|
|
73762
73774
|
}
|
|
73763
73775
|
} : undefined;
|
|
73764
|
-
const finalRequestHandler = requestHandler
|
|
73776
|
+
const finalRequestHandler = requestHandler ?? lambdaOptions;
|
|
73765
73777
|
const client = customCredentials ? new Client({
|
|
73766
73778
|
region: customCredentials.region ?? "us-east-1",
|
|
73767
73779
|
credentials: customCredentials.accessKeyId && customCredentials.secretAccessKey ? {
|
|
@@ -73785,9 +73797,9 @@ function getServiceClient({
|
|
|
73785
73797
|
if (getEnvVariable("REMOTION_DISABLE_AWS_CLIENT_CACHE")) {
|
|
73786
73798
|
return client;
|
|
73787
73799
|
}
|
|
73788
|
-
|
|
73800
|
+
cache2[key] = client;
|
|
73789
73801
|
}
|
|
73790
|
-
return
|
|
73802
|
+
return cache2[key];
|
|
73791
73803
|
}
|
|
73792
73804
|
|
|
73793
73805
|
// src/aws-clients.ts
|
|
@@ -73937,13 +73949,14 @@ var callFunctionAsyncImplementation = async ({
|
|
|
73937
73949
|
functionName,
|
|
73938
73950
|
payload,
|
|
73939
73951
|
region,
|
|
73940
|
-
timeoutInTest
|
|
73952
|
+
timeoutInTest,
|
|
73953
|
+
requestHandler
|
|
73941
73954
|
}) => {
|
|
73942
73955
|
const stringifiedPayload = JSON.stringify(payload);
|
|
73943
73956
|
if (stringifiedPayload.length > 256 * 1024) {
|
|
73944
73957
|
throw new Error(`Payload is too big: ${stringifiedPayload.length} bytes. Maximum size is 256 KB. This should not happen, please report this to the Remotion team. Payload: ${stringifiedPayload}`);
|
|
73945
73958
|
}
|
|
73946
|
-
const result = await getLambdaClient(region, timeoutInTest, null).send(new import_client_lambda2.InvokeCommand({
|
|
73959
|
+
const result = await getLambdaClient(region, timeoutInTest, requestHandler ?? null).send(new import_client_lambda2.InvokeCommand({
|
|
73947
73960
|
FunctionName: functionName,
|
|
73948
73961
|
Payload: stringifiedPayload,
|
|
73949
73962
|
InvocationType: "Event"
|
|
@@ -73970,9 +73983,10 @@ var invokeStreamOrTimeout = async ({
|
|
|
73970
73983
|
timeoutInTest,
|
|
73971
73984
|
functionName,
|
|
73972
73985
|
type,
|
|
73973
|
-
payload
|
|
73986
|
+
payload,
|
|
73987
|
+
requestHandler
|
|
73974
73988
|
}) => {
|
|
73975
|
-
const resProm = getLambdaClient(region, timeoutInTest, null).send(new import_client_lambda3.InvokeWithResponseStreamCommand({
|
|
73989
|
+
const resProm = getLambdaClient(region, timeoutInTest, requestHandler ?? null).send(new import_client_lambda3.InvokeWithResponseStreamCommand({
|
|
73976
73990
|
FunctionName: functionName,
|
|
73977
73991
|
Payload: JSON.stringify({ type, ...payload })
|
|
73978
73992
|
}));
|
|
@@ -73998,14 +74012,16 @@ var callLambdaWithStreamingWithoutRetry = async ({
|
|
|
73998
74012
|
payload,
|
|
73999
74013
|
region,
|
|
74000
74014
|
timeoutInTest,
|
|
74001
|
-
receivedStreamingPayload
|
|
74015
|
+
receivedStreamingPayload,
|
|
74016
|
+
requestHandler
|
|
74002
74017
|
}) => {
|
|
74003
74018
|
const res = await invokeStreamOrTimeout({
|
|
74004
74019
|
functionName,
|
|
74005
74020
|
payload,
|
|
74006
74021
|
region,
|
|
74007
74022
|
timeoutInTest,
|
|
74008
|
-
type
|
|
74023
|
+
type,
|
|
74024
|
+
requestHandler
|
|
74009
74025
|
});
|
|
74010
74026
|
const { onData, clear } = makeStreamer((status, messageTypeId, data) => {
|
|
74011
74027
|
const messageType = messageTypeIdToMessageType(messageTypeId);
|
|
@@ -74075,10 +74091,11 @@ var callLambdaSyncWithoutRetry = async ({
|
|
|
74075
74091
|
functionName,
|
|
74076
74092
|
payload,
|
|
74077
74093
|
region,
|
|
74078
|
-
timeoutInTest
|
|
74094
|
+
timeoutInTest,
|
|
74095
|
+
requestHandler
|
|
74079
74096
|
}) => {
|
|
74080
74097
|
const Payload = JSON.stringify(payload);
|
|
74081
|
-
const res = await getLambdaClient(region, timeoutInTest, null).send(new import_client_lambda4.InvokeCommand({
|
|
74098
|
+
const res = await getLambdaClient(region, timeoutInTest, requestHandler ?? null).send(new import_client_lambda4.InvokeCommand({
|
|
74082
74099
|
FunctionName: functionName,
|
|
74083
74100
|
Payload,
|
|
74084
74101
|
InvocationType: "RequestResponse"
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda-client"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda-client",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.513",
|
|
7
7
|
"main": "dist/cjs/index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"formatting": "oxfmt src --check",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@aws-sdk/lib-storage": "3.986.0",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
28
|
"@aws-sdk/credential-provider-ini": "3.972.5",
|
|
29
|
-
"@remotion/serverless-client": "4.0.
|
|
29
|
+
"@remotion/serverless-client": "4.0.513",
|
|
30
30
|
"@types/express": "5.0.1",
|
|
31
31
|
"express": "4.21.0",
|
|
32
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
32
|
+
"@remotion/eslint-config-internal": "4.0.513",
|
|
33
33
|
"eslint": "9.19.0",
|
|
34
34
|
"next": "16.2.11",
|
|
35
35
|
"@types/mime-types": "2.1.1",
|