remotion_lambda 4.0.546 → 4.0.548
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2fa70f91707f97341bbe0380e38682e84ad6e909d6edbb1af41295e254595239
|
|
4
|
+
data.tar.gz: 3403a9b147ca853273a11430db32242a75587f1c605953455d83904f98ae94cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6cec72c897db1af0c6e739c010e6c2ca6cd0f6dfc024b87fccd3f34f33b4dc41b858c7bc7f7a4ce0e35f52c04a7cc685b039a942745371daddf7d58266b1138
|
|
7
|
+
data.tar.gz: 8304368a49f4276c75d9766f06bf30570b45a053badaa80e540213b466286898fed8c3566de0d3137b4fd5c460cd42f915b3b72146b7c8caa572a3cccbb37a79
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
require 'logger'
|
|
1
2
|
require_relative 'version'
|
|
2
3
|
|
|
4
|
+
module RemotionLambda
|
|
5
|
+
def self.log_deprecated_still_license_key(license_key, log_level, api, option)
|
|
6
|
+
return if license_key.nil? || license_key == "free-license" || %w[warn error].include?(log_level)
|
|
7
|
+
|
|
8
|
+
Logger.new($stderr).info(
|
|
9
|
+
"Still renders don't need to be tracked anymore, an unlimited amount is now included in any Remotion License. You can now remove `#{option}` from #{api}."
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
3
14
|
def get_render_still_on_lambda_payload(
|
|
4
15
|
bucket_name: nil,
|
|
5
16
|
composition: nil,
|
|
@@ -11,6 +22,7 @@ def get_render_still_on_lambda_payload(
|
|
|
11
22
|
force_duration_in_frames: nil,
|
|
12
23
|
force_path_style: false,
|
|
13
24
|
force_width: nil,
|
|
25
|
+
# Deprecated: Still renders do not send usage telemetry.
|
|
14
26
|
api_key: nil,
|
|
15
27
|
license_key: nil,
|
|
16
28
|
image_format: "jpeg",
|
|
@@ -35,9 +47,12 @@ def get_render_still_on_lambda_payload(
|
|
|
35
47
|
is_production: nil
|
|
36
48
|
)
|
|
37
49
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
RemotionLambda.log_deprecated_still_license_key(
|
|
51
|
+
license_key || api_key,
|
|
52
|
+
log_level,
|
|
53
|
+
"get_render_still_on_lambda_payload()",
|
|
54
|
+
license_key.nil? ? "api_key" : "license_key"
|
|
55
|
+
)
|
|
41
56
|
|
|
42
57
|
payload = {
|
|
43
58
|
composition: composition,
|
|
@@ -50,7 +65,7 @@ payload = {
|
|
|
50
65
|
forceDurationInFrames: force_duration_in_frames,
|
|
51
66
|
forcePathStyle: force_path_style,
|
|
52
67
|
forceWidth: force_width,
|
|
53
|
-
licenseKey:
|
|
68
|
+
licenseKey: nil,
|
|
54
69
|
imageFormat: image_format,
|
|
55
70
|
inputProps: {
|
|
56
71
|
type: "payload",
|
|
@@ -75,7 +90,7 @@ payload = {
|
|
|
75
90
|
attempt: 1,
|
|
76
91
|
streamed: false,
|
|
77
92
|
frame: frame,
|
|
78
|
-
isProduction:
|
|
93
|
+
isProduction: nil
|
|
79
94
|
}
|
|
80
95
|
payload
|
|
81
96
|
end
|
data/lib/remotion_lambda/sdk.rb
CHANGED
|
@@ -3,6 +3,7 @@ require 'aws-sdk-s3'
|
|
|
3
3
|
require 'json'
|
|
4
4
|
require 'logger'
|
|
5
5
|
require_relative 'input_props_serializer'
|
|
6
|
+
require_relative 'render_still_on_lambda_payload'
|
|
6
7
|
require_relative 'version'
|
|
7
8
|
|
|
8
9
|
module RemotionLambda
|
|
@@ -47,6 +48,14 @@ module RemotionLambda
|
|
|
47
48
|
end
|
|
48
49
|
|
|
49
50
|
def render_still_on_lambda(function_name, payload)
|
|
51
|
+
RemotionLambda.log_deprecated_still_license_key(
|
|
52
|
+
payload[:licenseKey] || payload['licenseKey'],
|
|
53
|
+
payload[:logLevel] || payload['logLevel'],
|
|
54
|
+
'render_still_on_lambda()',
|
|
55
|
+
'licenseKey'
|
|
56
|
+
)
|
|
57
|
+
payload = payload.reject { |key, _| %w[licenseKey isProduction].include?(key.to_s) }
|
|
58
|
+
payload = payload.merge(licenseKey: nil, isProduction: nil)
|
|
50
59
|
payload = InputPropsSerializer.upload_oversized_input_props(payload, s3_client, 'still', @region)
|
|
51
60
|
body = invoke(function_name, payload)
|
|
52
61
|
raise "Failed to call renderStillOnLambda: #{body['message']}" if body["type"] == "error"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "4.0.
|
|
1
|
+
VERSION = "4.0.548"
|