@remotion/lambda 4.0.0-prefetch.10 → 4.0.0-prefetch.12

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.
Files changed (363) hide show
  1. package/LICENSE.md +7 -7
  2. package/dist/admin/bundle-lambda.d.ts +0 -0
  3. package/dist/admin/bundle-lambda.js +0 -0
  4. package/dist/admin/make-layer-public.d.ts +0 -0
  5. package/dist/admin/make-layer-public.js +0 -0
  6. package/dist/api/bucket-exists.d.ts +0 -0
  7. package/dist/api/bucket-exists.js +1 -1
  8. package/dist/api/clean-items.d.ts +0 -0
  9. package/dist/api/clean-items.js +1 -1
  10. package/dist/api/create-bucket.d.ts +0 -0
  11. package/dist/api/create-bucket.js +1 -1
  12. package/dist/api/create-function.d.ts +0 -0
  13. package/dist/api/create-function.js +0 -0
  14. package/dist/api/delete-function.d.ts +0 -0
  15. package/dist/api/delete-function.js +0 -0
  16. package/dist/api/delete-render.d.ts +19 -0
  17. package/dist/api/delete-render.js +66 -0
  18. package/dist/api/delete-site.d.ts +0 -0
  19. package/dist/api/delete-site.js +0 -5
  20. package/dist/api/deploy-function.d.ts +0 -0
  21. package/dist/api/deploy-function.js +0 -0
  22. package/dist/api/deploy-site.d.ts +2 -0
  23. package/dist/api/deploy-site.js +2 -0
  24. package/dist/api/download-media.d.ts +13 -0
  25. package/dist/api/download-media.js +15 -3
  26. package/dist/api/enable-s3-website.d.ts +0 -0
  27. package/dist/api/enable-s3-website.js +1 -1
  28. package/dist/api/estimate-price.d.ts +0 -0
  29. package/dist/api/estimate-price.js +0 -0
  30. package/dist/api/get-aws-client.d.ts +4 -2
  31. package/dist/api/get-aws-client.js +7 -2
  32. package/dist/api/get-buckets.d.ts +0 -0
  33. package/dist/api/get-buckets.js +2 -2
  34. package/dist/api/get-function-info.d.ts +0 -0
  35. package/dist/api/get-function-info.js +0 -0
  36. package/dist/api/get-functions.d.ts +0 -0
  37. package/dist/api/get-functions.js +0 -0
  38. package/dist/api/get-or-create-bucket.d.ts +0 -0
  39. package/dist/api/get-or-create-bucket.js +0 -0
  40. package/dist/api/get-regions.d.ts +0 -0
  41. package/dist/api/get-regions.js +0 -0
  42. package/dist/api/get-render-progress.d.ts +4 -1
  43. package/dist/api/get-render-progress.js +3 -1
  44. package/dist/api/get-sites.d.ts +0 -0
  45. package/dist/api/get-sites.js +0 -0
  46. package/dist/api/iam-validation/role-permissions.d.ts +0 -0
  47. package/dist/api/iam-validation/role-permissions.js +0 -0
  48. package/dist/api/iam-validation/simulate-rule.d.ts +0 -0
  49. package/dist/api/iam-validation/simulate-rule.js +0 -0
  50. package/dist/api/iam-validation/simulate.d.ts +0 -0
  51. package/dist/api/iam-validation/simulate.js +0 -0
  52. package/dist/api/iam-validation/suggested-policy.d.ts +0 -0
  53. package/dist/api/iam-validation/suggested-policy.js +0 -0
  54. package/dist/api/iam-validation/user-permissions.d.ts +0 -0
  55. package/dist/api/iam-validation/user-permissions.js +0 -0
  56. package/dist/api/mock-functions.d.ts +0 -0
  57. package/dist/api/mock-functions.js +0 -0
  58. package/dist/api/presign-url.d.ts +0 -0
  59. package/dist/api/presign-url.js +1 -1
  60. package/dist/api/render-media-on-lambda.d.ts +18 -10
  61. package/dist/api/render-media-on-lambda.js +18 -10
  62. package/dist/api/render-still-on-lambda.d.ts +0 -0
  63. package/dist/api/render-still-on-lambda.js +0 -0
  64. package/dist/api/upload-dir.d.ts +0 -0
  65. package/dist/api/upload-dir.js +1 -1
  66. package/dist/api/validate-webhook-signature.d.ts +13 -0
  67. package/dist/api/validate-webhook-signature.js +32 -0
  68. package/dist/cli/args.d.ts +4 -2
  69. package/dist/cli/args.js +1 -5
  70. package/dist/cli/commands/functions/deploy.d.ts +0 -0
  71. package/dist/cli/commands/functions/deploy.js +0 -0
  72. package/dist/cli/commands/functions/index.d.ts +0 -0
  73. package/dist/cli/commands/functions/index.js +0 -0
  74. package/dist/cli/commands/functions/ls.d.ts +0 -0
  75. package/dist/cli/commands/functions/ls.js +0 -0
  76. package/dist/cli/commands/functions/rm.d.ts +0 -0
  77. package/dist/cli/commands/functions/rm.js +0 -0
  78. package/dist/cli/commands/functions/rmall.d.ts +0 -0
  79. package/dist/cli/commands/functions/rmall.js +0 -0
  80. package/dist/cli/commands/policies/policies.d.ts +0 -0
  81. package/dist/cli/commands/policies/policies.js +0 -0
  82. package/dist/cli/commands/policies/role.d.ts +0 -0
  83. package/dist/cli/commands/policies/role.js +0 -0
  84. package/dist/cli/commands/policies/user.d.ts +0 -0
  85. package/dist/cli/commands/policies/user.js +0 -0
  86. package/dist/cli/commands/policies/validate.d.ts +0 -0
  87. package/dist/cli/commands/policies/validate.js +0 -0
  88. package/dist/cli/commands/quotas/increase.d.ts +0 -0
  89. package/dist/cli/commands/quotas/increase.js +0 -0
  90. package/dist/cli/commands/quotas/index.d.ts +0 -0
  91. package/dist/cli/commands/quotas/index.js +0 -0
  92. package/dist/cli/commands/quotas/list.d.ts +0 -0
  93. package/dist/cli/commands/quotas/list.js +0 -0
  94. package/dist/cli/commands/regions.d.ts +0 -0
  95. package/dist/cli/commands/regions.js +0 -0
  96. package/dist/cli/commands/render/progress.d.ts +0 -0
  97. package/dist/cli/commands/render/progress.js +0 -0
  98. package/dist/cli/commands/render/render.d.ts +0 -0
  99. package/dist/cli/commands/render/render.js +24 -8
  100. package/dist/cli/commands/sites/create.d.ts +0 -0
  101. package/dist/cli/commands/sites/create.js +0 -0
  102. package/dist/cli/commands/sites/index.d.ts +0 -0
  103. package/dist/cli/commands/sites/index.js +0 -0
  104. package/dist/cli/commands/sites/ls.d.ts +0 -0
  105. package/dist/cli/commands/sites/ls.js +0 -0
  106. package/dist/cli/commands/sites/rm.d.ts +0 -0
  107. package/dist/cli/commands/sites/rm.js +0 -0
  108. package/dist/cli/commands/sites/rmall.d.ts +0 -0
  109. package/dist/cli/commands/sites/rmall.js +0 -0
  110. package/dist/cli/commands/still.d.ts +0 -0
  111. package/dist/cli/commands/still.js +19 -9
  112. package/dist/cli/get-aws-region.d.ts +0 -0
  113. package/dist/cli/get-aws-region.js +0 -0
  114. package/dist/cli/help.d.ts +0 -0
  115. package/dist/cli/help.js +0 -0
  116. package/dist/cli/helpers/confirm.d.ts +0 -0
  117. package/dist/cli/helpers/confirm.js +0 -0
  118. package/dist/cli/helpers/date-string.d.ts +0 -0
  119. package/dist/cli/helpers/date-string.js +0 -0
  120. package/dist/cli/helpers/find-function-name.d.ts +0 -0
  121. package/dist/cli/helpers/find-function-name.js +0 -0
  122. package/dist/cli/helpers/progress-bar.d.ts +0 -0
  123. package/dist/cli/helpers/progress-bar.js +0 -0
  124. package/dist/cli/helpers/quit.d.ts +0 -0
  125. package/dist/cli/helpers/quit.js +0 -0
  126. package/dist/cli/helpers/yes-or-no.d.ts +0 -0
  127. package/dist/cli/helpers/yes-or-no.js +0 -0
  128. package/dist/cli/index.d.ts +0 -0
  129. package/dist/cli/index.js +1 -1
  130. package/dist/cli/is-cli.d.ts +0 -0
  131. package/dist/cli/is-cli.js +0 -0
  132. package/dist/cli/log.d.ts +0 -0
  133. package/dist/cli/log.js +0 -0
  134. package/dist/client.d.ts +4 -2
  135. package/dist/client.js +3 -1
  136. package/dist/defaults.d.ts +0 -0
  137. package/dist/defaults.js +0 -0
  138. package/dist/functions/chunk-optimization/can-use-optimization.d.ts +0 -0
  139. package/dist/functions/chunk-optimization/can-use-optimization.js +0 -0
  140. package/dist/functions/chunk-optimization/collect-data.d.ts +0 -0
  141. package/dist/functions/chunk-optimization/collect-data.js +0 -0
  142. package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +0 -0
  143. package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.js +0 -0
  144. package/dist/functions/chunk-optimization/get-profile-duration.d.ts +0 -0
  145. package/dist/functions/chunk-optimization/get-profile-duration.js +0 -0
  146. package/dist/functions/chunk-optimization/is-valid-profile.d.ts +0 -0
  147. package/dist/functions/chunk-optimization/is-valid-profile.js +0 -0
  148. package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts +0 -0
  149. package/dist/functions/chunk-optimization/optimize-invocation-order.js +0 -0
  150. package/dist/functions/chunk-optimization/optimize-profile.d.ts +0 -0
  151. package/dist/functions/chunk-optimization/optimize-profile.js +0 -0
  152. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
  153. package/dist/functions/chunk-optimization/plan-frame-ranges.js +0 -0
  154. package/dist/functions/chunk-optimization/s3-optimization-file.d.ts +0 -0
  155. package/dist/functions/chunk-optimization/s3-optimization-file.js +1 -0
  156. package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +0 -0
  157. package/dist/functions/chunk-optimization/simulate-frame-ranges.js +0 -0
  158. package/dist/functions/chunk-optimization/sort-by-duration.d.ts +0 -0
  159. package/dist/functions/chunk-optimization/sort-by-duration.js +0 -0
  160. package/dist/functions/chunk-optimization/types.d.ts +0 -0
  161. package/dist/functions/chunk-optimization/types.js +0 -0
  162. package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +0 -0
  163. package/dist/functions/helpers/best-frames-per-lambda-param.js +0 -0
  164. package/dist/functions/helpers/calculate-chunk-times.d.ts +0 -0
  165. package/dist/functions/helpers/calculate-chunk-times.js +0 -0
  166. package/dist/functions/helpers/calculate-price-from-bucket.d.ts +0 -0
  167. package/dist/functions/helpers/calculate-price-from-bucket.js +0 -0
  168. package/dist/functions/helpers/check-if-render-exists.d.ts +0 -0
  169. package/dist/functions/helpers/check-if-render-exists.js +0 -0
  170. package/dist/functions/helpers/clean-tmpdir.d.ts +0 -0
  171. package/dist/functions/helpers/clean-tmpdir.js +1 -1
  172. package/dist/functions/helpers/concat-videos.d.ts +3 -1
  173. package/dist/functions/helpers/concat-videos.js +25 -9
  174. package/dist/functions/helpers/create-post-render-data.d.ts +0 -0
  175. package/dist/functions/helpers/create-post-render-data.js +0 -0
  176. package/dist/functions/helpers/delete-chunks.d.ts +0 -0
  177. package/dist/functions/helpers/delete-chunks.js +0 -0
  178. package/dist/functions/helpers/expected-out-name.d.ts +4 -2
  179. package/dist/functions/helpers/expected-out-name.js +26 -5
  180. package/dist/functions/helpers/find-output-file-in-bucket.d.ts +3 -1
  181. package/dist/functions/helpers/find-output-file-in-bucket.js +12 -10
  182. package/dist/functions/helpers/format-costs-info.d.ts +0 -0
  183. package/dist/functions/helpers/format-costs-info.js +0 -0
  184. package/dist/functions/helpers/get-browser-instance.d.ts +0 -0
  185. package/dist/functions/helpers/get-browser-instance.js +0 -0
  186. package/dist/functions/helpers/get-chromium-executable-path.d.ts +0 -0
  187. package/dist/functions/helpers/get-chromium-executable-path.js +0 -0
  188. package/dist/functions/helpers/get-cleanup-progress.d.ts +0 -0
  189. package/dist/functions/helpers/get-cleanup-progress.js +0 -0
  190. package/dist/functions/helpers/get-current-architecture.d.ts +0 -0
  191. package/dist/functions/helpers/get-current-architecture.js +0 -0
  192. package/dist/functions/helpers/get-current-region.d.ts +0 -0
  193. package/dist/functions/helpers/get-current-region.js +0 -0
  194. package/dist/functions/helpers/get-custom-out-name.d.ts +6 -0
  195. package/dist/functions/helpers/get-custom-out-name.js +31 -0
  196. package/dist/functions/helpers/get-encoding-metadata.d.ts +0 -0
  197. package/dist/functions/helpers/get-encoding-metadata.js +0 -0
  198. package/dist/functions/helpers/get-files-in-folder.d.ts +0 -0
  199. package/dist/functions/helpers/get-files-in-folder.js +0 -0
  200. package/dist/functions/helpers/get-files-to-delete.d.ts +0 -0
  201. package/dist/functions/helpers/get-files-to-delete.js +0 -0
  202. package/dist/functions/helpers/get-final-encoding-status.d.ts +0 -0
  203. package/dist/functions/helpers/get-final-encoding-status.js +0 -0
  204. package/dist/functions/helpers/get-folder-size.d.ts +0 -0
  205. package/dist/functions/helpers/get-folder-size.js +0 -0
  206. package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +0 -0
  207. package/dist/functions/helpers/get-lambdas-invoked-stats.js +0 -0
  208. package/dist/functions/helpers/get-output-url-from-metadata.d.ts +2 -1
  209. package/dist/functions/helpers/get-output-url-from-metadata.js +2 -2
  210. package/dist/functions/helpers/get-overall-progress.d.ts +0 -0
  211. package/dist/functions/helpers/get-overall-progress.js +0 -0
  212. package/dist/functions/helpers/get-post-render-data.d.ts +0 -0
  213. package/dist/functions/helpers/get-post-render-data.js +0 -0
  214. package/dist/functions/helpers/get-progress.d.ts +4 -2
  215. package/dist/functions/helpers/get-progress.js +11 -6
  216. package/dist/functions/helpers/get-render-metadata.d.ts +0 -0
  217. package/dist/functions/helpers/get-render-metadata.js +0 -0
  218. package/dist/functions/helpers/get-retry-stats.d.ts +0 -0
  219. package/dist/functions/helpers/get-retry-stats.js +0 -0
  220. package/dist/functions/helpers/get-time-to-finish.d.ts +0 -0
  221. package/dist/functions/helpers/get-time-to-finish.js +0 -0
  222. package/dist/functions/helpers/inspect-errors.d.ts +0 -0
  223. package/dist/functions/helpers/inspect-errors.js +0 -0
  224. package/dist/functions/helpers/io.d.ts +13 -2
  225. package/dist/functions/helpers/io.js +16 -8
  226. package/dist/functions/helpers/is-enosp-err.d.ts +0 -0
  227. package/dist/functions/helpers/is-enosp-err.js +0 -0
  228. package/dist/functions/helpers/is-warm.d.ts +0 -0
  229. package/dist/functions/helpers/is-warm.js +0 -0
  230. package/dist/functions/helpers/min-max.d.ts +0 -0
  231. package/dist/functions/helpers/min-max.js +0 -0
  232. package/dist/functions/helpers/print-cloudwatch-helper.d.ts +0 -0
  233. package/dist/functions/helpers/print-cloudwatch-helper.js +0 -0
  234. package/dist/functions/helpers/print-concurrency-curve.d.ts +0 -0
  235. package/dist/functions/helpers/print-concurrency-curve.js +0 -0
  236. package/dist/functions/helpers/read-with-progress.d.ts +3 -1
  237. package/dist/functions/helpers/read-with-progress.js +2 -2
  238. package/dist/functions/helpers/timer.d.ts +0 -0
  239. package/dist/functions/helpers/timer.js +0 -0
  240. package/dist/functions/helpers/validate-composition.d.ts +0 -0
  241. package/dist/functions/helpers/validate-composition.js +0 -0
  242. package/dist/functions/helpers/write-lambda-error.d.ts +1 -1
  243. package/dist/functions/helpers/write-lambda-error.js +1 -0
  244. package/dist/functions/helpers/write-post-render-data.d.ts +0 -0
  245. package/dist/functions/helpers/write-post-render-data.js +1 -0
  246. package/dist/functions/index.d.ts +0 -0
  247. package/dist/functions/index.js +2 -2
  248. package/dist/functions/info.d.ts +0 -0
  249. package/dist/functions/info.js +0 -0
  250. package/dist/functions/launch.d.ts +0 -0
  251. package/dist/functions/launch.js +206 -5
  252. package/dist/functions/progress.d.ts +1 -1
  253. package/dist/functions/progress.js +3 -1
  254. package/dist/functions/renderer.d.ts +0 -0
  255. package/dist/functions/renderer.js +17 -1
  256. package/dist/functions/start.d.ts +0 -0
  257. package/dist/functions/start.js +5 -0
  258. package/dist/functions/still.d.ts +0 -0
  259. package/dist/functions/still.js +9 -3
  260. package/dist/index.d.ts +7 -2
  261. package/dist/index.js +5 -1
  262. package/dist/internals.d.ts +0 -0
  263. package/dist/internals.js +0 -0
  264. package/dist/pricing/aws-regions.d.ts +0 -0
  265. package/dist/pricing/aws-regions.js +0 -0
  266. package/dist/pricing/price-per-1-s.d.ts +0 -0
  267. package/dist/pricing/price-per-1-s.js +0 -0
  268. package/dist/regions.d.ts +0 -0
  269. package/dist/regions.js +0 -0
  270. package/dist/shared/await.d.ts +0 -0
  271. package/dist/shared/await.js +0 -0
  272. package/dist/shared/aws-clients.d.ts +13 -2
  273. package/dist/shared/aws-clients.js +56 -26
  274. package/dist/shared/bundle-site.d.ts +2 -1
  275. package/dist/shared/bundle-site.js +0 -0
  276. package/dist/shared/call-lambda.d.ts +0 -0
  277. package/dist/shared/call-lambda.js +0 -0
  278. package/dist/shared/check-credentials.d.ts +0 -0
  279. package/dist/shared/check-credentials.js +0 -0
  280. package/dist/shared/constants.d.ts +26 -1
  281. package/dist/shared/constants.js +7 -1
  282. package/dist/shared/content-disposition-header.d.ts +0 -0
  283. package/dist/shared/content-disposition-header.js +0 -0
  284. package/dist/shared/convert-to-serve-url.d.ts +0 -0
  285. package/dist/shared/convert-to-serve-url.js +0 -0
  286. package/dist/shared/docs-url.d.ts +0 -0
  287. package/dist/shared/docs-url.js +0 -0
  288. package/dist/shared/function-zip-path.d.ts +0 -0
  289. package/dist/shared/function-zip-path.js +0 -0
  290. package/dist/shared/get-account-id.d.ts +0 -0
  291. package/dist/shared/get-account-id.js +0 -0
  292. package/dist/shared/get-cloudwatch-stream-url.d.ts +0 -0
  293. package/dist/shared/get-cloudwatch-stream-url.js +0 -0
  294. package/dist/shared/get-function-version.d.ts +0 -0
  295. package/dist/shared/get-function-version.js +0 -0
  296. package/dist/shared/get-most-expensive-chunks.d.ts +0 -0
  297. package/dist/shared/get-most-expensive-chunks.js +0 -0
  298. package/dist/shared/hosted-layers.d.ts +0 -0
  299. package/dist/shared/hosted-layers.js +0 -0
  300. package/dist/shared/invoke-webhook.d.ts +44 -0
  301. package/dist/shared/invoke-webhook.js +89 -0
  302. package/dist/shared/is-in-lambda.d.ts +0 -0
  303. package/dist/shared/is-in-lambda.js +0 -0
  304. package/dist/shared/lambda-version-string.d.ts +0 -0
  305. package/dist/shared/lambda-version-string.js +0 -0
  306. package/dist/shared/make-s3-key.d.ts +0 -0
  307. package/dist/shared/make-s3-key.js +0 -0
  308. package/dist/shared/make-s3-url.d.ts +0 -0
  309. package/dist/shared/make-s3-url.js +0 -0
  310. package/dist/shared/p-limit.d.ts +0 -0
  311. package/dist/shared/p-limit.js +0 -0
  312. package/dist/shared/parse-lambda-initialized-key.d.ts +0 -0
  313. package/dist/shared/parse-lambda-initialized-key.js +0 -0
  314. package/dist/shared/parse-lambda-timings-key.d.ts +0 -0
  315. package/dist/shared/parse-lambda-timings-key.js +0 -0
  316. package/dist/shared/random-hash.d.ts +0 -0
  317. package/dist/shared/random-hash.js +0 -0
  318. package/dist/shared/return-values.d.ts +0 -0
  319. package/dist/shared/return-values.js +0 -0
  320. package/dist/shared/sleep.d.ts +0 -0
  321. package/dist/shared/sleep.js +0 -0
  322. package/dist/shared/stream-to-string.d.ts +0 -0
  323. package/dist/shared/stream-to-string.js +0 -0
  324. package/dist/shared/truthy.d.ts +0 -0
  325. package/dist/shared/truthy.js +0 -0
  326. package/dist/shared/validate-architecture.d.ts +0 -0
  327. package/dist/shared/validate-architecture.js +0 -0
  328. package/dist/shared/validate-aws-region.d.ts +0 -0
  329. package/dist/shared/validate-aws-region.js +0 -0
  330. package/dist/shared/validate-bucketname.d.ts +0 -0
  331. package/dist/shared/validate-bucketname.js +0 -0
  332. package/dist/shared/validate-custom-role-arn.d.ts +0 -0
  333. package/dist/shared/validate-custom-role-arn.js +0 -0
  334. package/dist/shared/validate-disk-size-in-mb.d.ts +0 -0
  335. package/dist/shared/validate-disk-size-in-mb.js +0 -0
  336. package/dist/shared/validate-download-behavior.d.ts +0 -0
  337. package/dist/shared/validate-download-behavior.js +0 -0
  338. package/dist/shared/validate-frames-per-lambda.d.ts +4 -1
  339. package/dist/shared/validate-frames-per-lambda.js +4 -3
  340. package/dist/shared/validate-lambda-codec.d.ts +0 -0
  341. package/dist/shared/validate-lambda-codec.js +0 -0
  342. package/dist/shared/validate-memory-size.d.ts +0 -0
  343. package/dist/shared/validate-memory-size.js +0 -0
  344. package/dist/shared/validate-outname.d.ts +3 -2
  345. package/dist/shared/validate-outname.js +5 -1
  346. package/dist/shared/validate-presign-expiration.d.ts +0 -0
  347. package/dist/shared/validate-presign-expiration.js +0 -0
  348. package/dist/shared/validate-privacy.d.ts +0 -0
  349. package/dist/shared/validate-privacy.js +0 -0
  350. package/dist/shared/validate-retention-period.d.ts +0 -0
  351. package/dist/shared/validate-retention-period.js +0 -0
  352. package/dist/shared/validate-retries.d.ts +0 -0
  353. package/dist/shared/validate-retries.js +0 -0
  354. package/dist/shared/validate-serveurl.d.ts +0 -0
  355. package/dist/shared/validate-serveurl.js +0 -0
  356. package/dist/shared/validate-site-name.d.ts +0 -0
  357. package/dist/shared/validate-site-name.js +0 -0
  358. package/dist/shared/validate-timeout.d.ts +0 -0
  359. package/dist/shared/validate-timeout.js +0 -0
  360. package/package.json +18 -21
  361. package/remotionlambda.zip +0 -0
  362. package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts +0 -8
  363. package/dist/cli/helpers/get-cloudwatch-stream-url.js +0 -7
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  import type { FileNameAndSize } from './get-files-in-folder';
2
2
  export declare type LambdaErrorInfo = {
3
- type: 'renderer' | 'browser' | 'stitcher';
3
+ type: 'renderer' | 'browser' | 'stitcher' | 'webhook';
4
4
  message: string;
5
5
  name: string;
6
6
  stack: string;
@@ -34,6 +34,7 @@ const writeLambdaError = async ({ bucketName, renderId, errorInfo, expectedBucke
34
34
  privacy: 'private',
35
35
  expectedBucketOwner,
36
36
  downloadBehavior: null,
37
+ customCredentials: null,
37
38
  });
38
39
  };
39
40
  exports.writeLambdaError = writeLambdaError;
@@ -12,6 +12,7 @@ const writePostRenderData = async ({ bucketName, renderId, postRenderData, expec
12
12
  expectedBucketOwner,
13
13
  region,
14
14
  downloadBehavior: null,
15
+ customCredentials: null,
15
16
  });
16
17
  };
17
18
  exports.writePostRenderData = writePostRenderData;
File without changes
@@ -14,7 +14,7 @@ const start_1 = require("./start");
14
14
  const still_1 = require("./still");
15
15
  const handler = async (params, context) => {
16
16
  process.env.__RESERVED_IS_INSIDE_REMOTION_LAMBDA = 'true';
17
- const timeoutInMiliseconds = context.getRemainingTimeInMillis();
17
+ const timeoutInMilliseconds = context.getRemainingTimeInMillis();
18
18
  if (!context || !context.invokedFunctionArn) {
19
19
  throw new Error('Lambda function unexpectedly does not have context.invokedFunctionArn');
20
20
  }
@@ -53,7 +53,7 @@ const handler = async (params, context) => {
53
53
  });
54
54
  return (0, progress_1.progressHandler)(params, {
55
55
  expectedBucketOwner: currentUserId,
56
- timeoutInMiliseconds,
56
+ timeoutInMilliseconds,
57
57
  });
58
58
  }
59
59
  if (params.type === constants_1.LambdaRoutines.renderer) {
File without changes
File without changes
File without changes
@@ -12,6 +12,7 @@ const version_1 = require("remotion/version");
12
12
  const aws_clients_1 = require("../shared/aws-clients");
13
13
  const constants_1 = require("../shared/constants");
14
14
  const docs_url_1 = require("../shared/docs-url");
15
+ const invoke_webhook_1 = require("../shared/invoke-webhook");
15
16
  const make_s3_url_1 = require("../shared/make-s3-url");
16
17
  const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
17
18
  const validate_outname_1 = require("../shared/validate-outname");
@@ -29,6 +30,7 @@ const concat_videos_1 = require("./helpers/concat-videos");
29
30
  const create_post_render_data_1 = require("./helpers/create-post-render-data");
30
31
  const delete_chunks_1 = require("./helpers/delete-chunks");
31
32
  const expected_out_name_1 = require("./helpers/expected-out-name");
33
+ const find_output_file_in_bucket_1 = require("./helpers/find-output-file-in-bucket");
32
34
  const get_browser_instance_1 = require("./helpers/get-browser-instance");
33
35
  const get_current_region_1 = require("./helpers/get-current-region");
34
36
  const get_files_to_delete_1 = require("./helpers/get-files-to-delete");
@@ -62,11 +64,54 @@ const callFunctionWithRetry = async (payload, retries = 0) => {
62
64
  }
63
65
  };
64
66
  const innerLaunchHandler = async (params, options) => {
65
- var _a, _b;
67
+ var _a, _b, _c, _d;
66
68
  if (params.type !== constants_1.LambdaRoutines.launch) {
67
69
  throw new Error('Expected launch type');
68
70
  }
69
71
  const startedDate = Date.now();
72
+ let webhookInvoked = false;
73
+ const webhookDueToTimeout = setTimeout(async () => {
74
+ if (params.webhook && !webhookInvoked) {
75
+ try {
76
+ await (0, invoke_webhook_1.invokeWebhook)({
77
+ url: params.webhook.url,
78
+ secret: params.webhook.secret,
79
+ payload: {
80
+ type: 'timeout',
81
+ renderId: params.renderId,
82
+ expectedBucketOwner: options.expectedBucketOwner,
83
+ bucketName: params.bucketName,
84
+ },
85
+ });
86
+ webhookInvoked = true;
87
+ }
88
+ catch (err) {
89
+ if (process.env.NODE_ENV === 'test') {
90
+ throw err;
91
+ }
92
+ await (0, write_lambda_error_1.writeLambdaError)({
93
+ bucketName: params.bucketName,
94
+ errorInfo: {
95
+ type: 'webhook',
96
+ message: err.message,
97
+ name: err.name,
98
+ stack: err.stack,
99
+ tmpDir: null,
100
+ frame: 0,
101
+ chunk: 0,
102
+ isFatal: false,
103
+ attempt: 1,
104
+ willRetry: false,
105
+ totalAttempts: 1,
106
+ },
107
+ renderId: params.renderId,
108
+ expectedBucketOwner: options.expectedBucketOwner,
109
+ });
110
+ console.log('Failed to invoke webhook:');
111
+ console.log(err);
112
+ }
113
+ }
114
+ }, Math.max(params.timeoutInMilliseconds - 1000, 1000));
70
115
  const [browserInstance, optimization] = await Promise.all([
71
116
  (0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'), params.chromiumOptions),
72
117
  (0, s3_optimization_file_1.getOptimization)({
@@ -95,16 +140,21 @@ const innerLaunchHandler = async (params, options) => {
95
140
  remotion_1.Internals.validateFps(comp.fps, 'passed to a Lambda render', false);
96
141
  remotion_1.Internals.validateDimension(comp.height, 'height', 'passed to a Lambda render');
97
142
  remotion_1.Internals.validateDimension(comp.width, 'width', 'passed to a Lambda render');
143
+ renderer_1.RenderInternals.validateBitrate(params.audioBitrate, 'audioBitrate');
144
+ renderer_1.RenderInternals.validateBitrate(params.videoBitrate, 'videoBitrate');
98
145
  renderer_1.RenderInternals.validateConcurrency(params.concurrencyPerLambda, 'concurrencyPerLambda');
99
146
  const realFrameRange = renderer_1.RenderInternals.getRealFrameRange(comp.durationInFrames, params.frameRange);
100
147
  const frameCount = renderer_1.RenderInternals.getFramesToRender(realFrameRange, params.everyNthFrame);
101
148
  const framesPerLambda = (_a = params.framesPerLambda) !== null && _a !== void 0 ? _a : (0, best_frames_per_lambda_param_1.bestFramesPerLambdaParam)(frameCount.length);
102
- (0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda);
149
+ (0, validate_frames_per_lambda_1.validateFramesPerLambda)({
150
+ framesPerLambda,
151
+ durationInFrames: frameCount.length,
152
+ });
103
153
  const chunkCount = Math.ceil(frameCount.length / framesPerLambda);
104
154
  if (chunkCount > constants_1.MAX_FUNCTIONS_PER_RENDER) {
105
155
  throw new Error(`Too many functions: This render would cause ${chunkCount} functions to spawn. We limit this amount to ${constants_1.MAX_FUNCTIONS_PER_RENDER} functions as more would result in diminishing returns. Values set: frameCount = ${frameCount}, framesPerLambda=${framesPerLambda}. See ${docs_url_1.DOCS_URL}/docs/lambda/concurrency for how this parameter is calculated.`);
106
156
  }
107
- (0, validate_outname_1.validateOutname)(params.outName);
157
+ (0, validate_outname_1.validateOutname)(params.outName, params.codec);
108
158
  (0, validate_privacy_1.validatePrivacy)(params.privacy);
109
159
  renderer_1.RenderInternals.validatePuppeteerTimeout(params.timeoutInMilliseconds);
110
160
  const { chunks, didUseOptimization } = (0, plan_frame_ranges_1.planFrameRanges)({
@@ -150,6 +200,8 @@ const innerLaunchHandler = async (params, options) => {
150
200
  everyNthFrame: params.everyNthFrame,
151
201
  concurrencyPerLambda: params.concurrencyPerLambda,
152
202
  muted: params.muted,
203
+ audioBitrate: params.audioBitrate,
204
+ videoBitrate: params.videoBitrate,
153
205
  };
154
206
  return payload;
155
207
  });
@@ -178,7 +230,31 @@ const innerLaunchHandler = async (params, options) => {
178
230
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
179
231
  renderId: params.renderId,
180
232
  outName: (_b = params.outName) !== null && _b !== void 0 ? _b : undefined,
233
+ privacy: params.privacy,
181
234
  };
235
+ const { key, renderBucketName, customCredentials } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, params.bucketName, typeof params.outName === 'string' || typeof params.outName === 'undefined'
236
+ ? null
237
+ : (_d = (_c = params.outName) === null || _c === void 0 ? void 0 : _c.s3OutputProvider) !== null && _d !== void 0 ? _d : null);
238
+ const output = await (0, find_output_file_in_bucket_1.findOutputFileInBucket)({
239
+ bucketName: params.bucketName,
240
+ customCredentials,
241
+ region: (0, get_current_region_1.getCurrentRegionInFunction)(),
242
+ renderMetadata,
243
+ });
244
+ if (output) {
245
+ if (params.overwrite) {
246
+ console.info('Deleting', { bucketName: renderBucketName, key }, 'because it already existed and will be overwritten');
247
+ await (0, io_1.lambdaDeleteFile)({
248
+ bucketName: renderBucketName,
249
+ customCredentials,
250
+ key,
251
+ region: (0, get_current_region_1.getCurrentRegionInFunction)(),
252
+ });
253
+ }
254
+ else {
255
+ throw new TypeError(`Output file "${key}" in bucket "${renderBucketName}" in region "${(0, get_current_region_1.getCurrentRegionInFunction)()}" already exists. Delete it before re-rendering, or use the overwrite option to delete it before render."`);
256
+ }
257
+ }
182
258
  await (0, io_1.lambdaWriteFile)({
183
259
  bucketName: params.bucketName,
184
260
  key: (0, constants_1.renderMetadataKey)(params.renderId),
@@ -187,6 +263,7 @@ const innerLaunchHandler = async (params, options) => {
187
263
  privacy: 'private',
188
264
  expectedBucketOwner: options.expectedBucketOwner,
189
265
  downloadBehavior: null,
266
+ customCredentials: null,
190
267
  });
191
268
  await Promise.all(lambdaPayloads.map(async (payload, index) => {
192
269
  const callingLambdaTimer = (0, timer_1.timer)('Calling chunk ' + index);
@@ -220,6 +297,7 @@ const innerLaunchHandler = async (params, options) => {
220
297
  privacy: 'private',
221
298
  expectedBucketOwner: options.expectedBucketOwner,
222
299
  downloadBehavior: null,
300
+ customCredentials: null,
223
301
  }).catch((err) => {
224
302
  (0, write_lambda_error_1.writeLambdaError)({
225
303
  bucketName: params.bucketName,
@@ -241,6 +319,32 @@ const innerLaunchHandler = async (params, options) => {
241
319
  });
242
320
  });
243
321
  };
322
+ const onErrors = async (errors) => {
323
+ var _a;
324
+ console.log('Found Errors', errors);
325
+ if (params.webhook) {
326
+ console.log('Sending webhook with errors');
327
+ await (0, invoke_webhook_1.invokeWebhook)({
328
+ url: params.webhook.url,
329
+ secret: (_a = params.webhook.secret) !== null && _a !== void 0 ? _a : null,
330
+ payload: {
331
+ type: 'error',
332
+ renderId: params.renderId,
333
+ expectedBucketOwner: options.expectedBucketOwner,
334
+ bucketName: params.bucketName,
335
+ errors: errors.slice(0, 5).map((e) => ({
336
+ message: e.message,
337
+ name: e.name,
338
+ stack: e.stack,
339
+ })),
340
+ },
341
+ });
342
+ }
343
+ else {
344
+ console.log('No webhook specified');
345
+ }
346
+ throw new Error('Stopping Lambda function because error occurred: ' + errors[0].stack);
347
+ };
244
348
  const fps = comp.fps / params.everyNthFrame;
245
349
  const { outfile, cleanupChunksProm, encodingStart } = await (0, concat_videos_1.concatVideosS3)({
246
350
  bucket: params.bucketName,
@@ -253,11 +357,11 @@ const innerLaunchHandler = async (params, options) => {
253
357
  expectedBucketOwner: options.expectedBucketOwner,
254
358
  fps,
255
359
  numberOfGifLoops: params.numberOfGifLoops,
360
+ onErrors,
256
361
  });
257
362
  if (!encodingStop) {
258
363
  encodingStop = Date.now();
259
364
  }
260
- const { key, renderBucketName } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, params.bucketName);
261
365
  const outputSize = fs_1.default.statSync(outfile);
262
366
  await (0, io_1.lambdaWriteFile)({
263
367
  bucketName: renderBucketName,
@@ -267,6 +371,7 @@ const innerLaunchHandler = async (params, options) => {
267
371
  privacy: params.privacy,
268
372
  expectedBucketOwner: options.expectedBucketOwner,
269
373
  downloadBehavior: params.downloadBehavior,
374
+ customCredentials,
270
375
  });
271
376
  let chunkProm = Promise.resolve();
272
377
  // TODO: Enable in a later release
@@ -329,6 +434,7 @@ const innerLaunchHandler = async (params, options) => {
329
434
  privacy: 'private',
330
435
  expectedBucketOwner: options.expectedBucketOwner,
331
436
  downloadBehavior: null,
437
+ customCredentials: null,
332
438
  });
333
439
  const errorExplanationsProm = (0, inspect_errors_1.inspectErrors)({
334
440
  contents,
@@ -347,6 +453,7 @@ const innerLaunchHandler = async (params, options) => {
347
453
  contents,
348
454
  jobs,
349
455
  });
456
+ const outputUrl = (0, get_output_url_from_metadata_1.getOutputUrlFromMetadata)(renderMetadata, params.bucketName, customCredentials);
350
457
  const postRenderData = (0, create_post_render_data_1.createPostRenderData)({
351
458
  expectedBucketOwner: options.expectedBucketOwner,
352
459
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
@@ -360,7 +467,7 @@ const innerLaunchHandler = async (params, options) => {
360
467
  outputFile: {
361
468
  lastModified: Date.now(),
362
469
  size: outputSize.size,
363
- url: (0, get_output_url_from_metadata_1.getOutputUrlFromMetadata)(renderMetadata, params.bucketName),
470
+ url: outputUrl,
364
471
  },
365
472
  });
366
473
  await finalEncodingProgressProm;
@@ -375,10 +482,57 @@ const innerLaunchHandler = async (params, options) => {
375
482
  bucketName: params.bucketName,
376
483
  key: (0, constants_1.initalizedMetadataKey)(params.renderId),
377
484
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
485
+ customCredentials: null,
378
486
  });
379
487
  await Promise.all([cleanupChunksProm, fs_1.default.promises.rm(outfile)]);
488
+ clearTimeout(webhookDueToTimeout);
489
+ if (params.webhook && !webhookInvoked) {
490
+ try {
491
+ await (0, invoke_webhook_1.invokeWebhook)({
492
+ url: params.webhook.url,
493
+ secret: params.webhook.secret,
494
+ payload: {
495
+ type: 'success',
496
+ renderId: params.renderId,
497
+ expectedBucketOwner: options.expectedBucketOwner,
498
+ bucketName: params.bucketName,
499
+ outputUrl,
500
+ lambdaErrors: postRenderData.errors,
501
+ outputFile: postRenderData.outputFile,
502
+ timeToFinish: postRenderData.timeToFinish,
503
+ },
504
+ });
505
+ webhookInvoked = true;
506
+ }
507
+ catch (err) {
508
+ if (process.env.NODE_ENV === 'test') {
509
+ throw err;
510
+ }
511
+ await (0, write_lambda_error_1.writeLambdaError)({
512
+ bucketName: params.bucketName,
513
+ errorInfo: {
514
+ type: 'webhook',
515
+ message: err.message,
516
+ name: err.name,
517
+ stack: err.stack,
518
+ tmpDir: null,
519
+ frame: 0,
520
+ chunk: 0,
521
+ isFatal: false,
522
+ attempt: 1,
523
+ willRetry: false,
524
+ totalAttempts: 1,
525
+ },
526
+ renderId: params.renderId,
527
+ expectedBucketOwner: options.expectedBucketOwner,
528
+ });
529
+ console.log('Failed to invoke webhook:');
530
+ console.log(err);
531
+ }
532
+ }
380
533
  };
381
534
  const launchHandler = async (params, options) => {
535
+ var _a, _b;
382
536
  if (params.type !== constants_1.LambdaRoutines.launch) {
383
537
  throw new Error('Expected launch type');
384
538
  }
@@ -386,6 +540,9 @@ const launchHandler = async (params, options) => {
386
540
  await innerLaunchHandler(params, options);
387
541
  }
388
542
  catch (err) {
543
+ if (process.env.NODE_ENV === 'test') {
544
+ throw err;
545
+ }
389
546
  console.log('Error occurred', err);
390
547
  await (0, write_lambda_error_1.writeLambdaError)({
391
548
  bucketName: params.bucketName,
@@ -405,6 +562,50 @@ const launchHandler = async (params, options) => {
405
562
  expectedBucketOwner: options.expectedBucketOwner,
406
563
  renderId: params.renderId,
407
564
  });
565
+ if ((_a = params.webhook) === null || _a === void 0 ? void 0 : _a.url) {
566
+ try {
567
+ await (0, invoke_webhook_1.invokeWebhook)({
568
+ url: params.webhook.url,
569
+ secret: (_b = params.webhook.secret) !== null && _b !== void 0 ? _b : null,
570
+ payload: {
571
+ type: 'error',
572
+ renderId: params.renderId,
573
+ expectedBucketOwner: options.expectedBucketOwner,
574
+ bucketName: params.bucketName,
575
+ errors: [err].map((e) => ({
576
+ message: e.message,
577
+ name: e.name,
578
+ stack: e.stack,
579
+ })),
580
+ },
581
+ });
582
+ }
583
+ catch (error) {
584
+ if (process.env.NODE_ENV === 'test') {
585
+ throw error;
586
+ }
587
+ await (0, write_lambda_error_1.writeLambdaError)({
588
+ bucketName: params.bucketName,
589
+ errorInfo: {
590
+ type: 'webhook',
591
+ message: err.message,
592
+ name: err.name,
593
+ stack: err.stack,
594
+ tmpDir: null,
595
+ frame: 0,
596
+ chunk: 0,
597
+ isFatal: false,
598
+ attempt: 1,
599
+ willRetry: false,
600
+ totalAttempts: 1,
601
+ },
602
+ renderId: params.renderId,
603
+ expectedBucketOwner: options.expectedBucketOwner,
604
+ });
605
+ console.log('Failed to invoke webhook:');
606
+ console.log(error);
607
+ }
608
+ }
408
609
  }
409
610
  };
410
611
  exports.launchHandler = launchHandler;
@@ -1,7 +1,7 @@
1
1
  import type { LambdaPayload, RenderProgress } from '../shared/constants';
2
2
  declare type Options = {
3
3
  expectedBucketOwner: string;
4
- timeoutInMiliseconds: number;
4
+ timeoutInMilliseconds: number;
5
5
  };
6
6
  export declare const progressHandler: (lambdaParams: LambdaPayload, options: Options) => Promise<RenderProgress>;
7
7
  export {};
@@ -6,6 +6,7 @@ const constants_1 = require("../shared/constants");
6
6
  const get_current_region_1 = require("./helpers/get-current-region");
7
7
  const get_progress_1 = require("./helpers/get-progress");
8
8
  const progressHandler = (lambdaParams, options) => {
9
+ var _a;
9
10
  if (lambdaParams.type !== constants_1.LambdaRoutines.status) {
10
11
  throw new TypeError('Expected status type');
11
12
  }
@@ -21,7 +22,8 @@ const progressHandler = (lambdaParams, options) => {
21
22
  expectedBucketOwner: options.expectedBucketOwner,
22
23
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
23
24
  memorySizeInMb: Number(process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE),
24
- timeoutInMiliseconds: options.timeoutInMiliseconds,
25
+ timeoutInMilliseconds: options.timeoutInMilliseconds,
26
+ customCredentials: (_a = lambdaParams.s3OutputProvider) !== null && _a !== void 0 ? _a : null,
25
27
  });
26
28
  };
27
29
  exports.progressHandler = progressHandler;
File without changes
@@ -66,7 +66,7 @@ const renderHandler = async (params, options, logs) => {
66
66
  }
67
67
  chunkTimingData.timings[renderedFrames] = Date.now() - start;
68
68
  },
69
- parallelism: params.concurrencyPerLambda,
69
+ concurrency: params.concurrencyPerLambda,
70
70
  onStart: () => {
71
71
  (0, io_1.lambdaWriteFile)({
72
72
  privacy: 'private',
@@ -87,6 +87,7 @@ const renderHandler = async (params, options, logs) => {
87
87
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
88
88
  expectedBucketOwner: options.expectedBucketOwner,
89
89
  downloadBehavior: null,
90
+ customCredentials: null,
90
91
  }).catch((err) => reject(err));
91
92
  },
92
93
  puppeteerInstance: browserInstance,
@@ -135,6 +136,15 @@ const renderHandler = async (params, options, logs) => {
135
136
  downloadMap,
136
137
  muted: params.muted,
137
138
  enforceAudioTrack: true,
139
+ audioBitrate: params.audioBitrate,
140
+ videoBitrate: params.videoBitrate,
141
+ onSlowestFrames: (slowestFrames) => {
142
+ console.log();
143
+ console.log(`Slowest frames:`);
144
+ slowestFrames.forEach(({ frame, time }) => {
145
+ console.log(`Frame ${frame} (${time.toFixed(3)}ms)`);
146
+ });
147
+ },
138
148
  })
139
149
  .then(() => resolve())
140
150
  .catch((err) => reject(err));
@@ -155,6 +165,7 @@ const renderHandler = async (params, options, logs) => {
155
165
  privacy: params.privacy,
156
166
  expectedBucketOwner: options.expectedBucketOwner,
157
167
  downloadBehavior: null,
168
+ customCredentials: null,
158
169
  });
159
170
  await Promise.all([
160
171
  fs_1.default.promises.rm(outputLocation, { recursive: true }),
@@ -172,6 +183,7 @@ const renderHandler = async (params, options, logs) => {
172
183
  privacy: 'private',
173
184
  expectedBucketOwner: options.expectedBucketOwner,
174
185
  downloadBehavior: null,
186
+ customCredentials: null,
175
187
  }),
176
188
  ]);
177
189
  };
@@ -184,6 +196,10 @@ const rendererHandler = async (params, options) => {
184
196
  await renderHandler(params, options, logs);
185
197
  }
186
198
  catch (err) {
199
+ if (process.env.NODE_ENV === 'test') {
200
+ console.log({ err });
201
+ throw err;
202
+ }
187
203
  // If this error is encountered, we can just retry as it
188
204
  // is a very rare error to occur
189
205
  const isBrowserError = err.message.includes('FATAL:zygote_communication_linux.cc') ||
File without changes
@@ -32,6 +32,7 @@ const startHandler = async (params, options) => {
32
32
  expectedBucketOwner: options.expectedBucketOwner,
33
33
  key: (0, constants_1.initalizedMetadataKey)(renderId),
34
34
  privacy: 'private',
35
+ customCredentials: null,
35
36
  });
36
37
  const payload = {
37
38
  type: constants_1.LambdaRoutines.launch,
@@ -61,6 +62,10 @@ const startHandler = async (params, options) => {
61
62
  concurrencyPerLambda: params.concurrencyPerLambda,
62
63
  downloadBehavior: params.downloadBehavior,
63
64
  muted: params.muted,
65
+ overwrite: params.overwrite,
66
+ webhook: params.webhook,
67
+ audioBitrate: params.audioBitrate,
68
+ videoBitrate: params.videoBitrate,
64
69
  };
65
70
  await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
66
71
  FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
File without changes
@@ -83,6 +83,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
83
83
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
84
84
  renderId,
85
85
  outName: (_b = lambdaParams.outName) !== null && _b !== void 0 ? _b : undefined,
86
+ privacy: lambdaParams.privacy,
86
87
  };
87
88
  await (0, io_1.lambdaWriteFile)({
88
89
  bucketName,
@@ -92,6 +93,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
92
93
  privacy: 'private',
93
94
  expectedBucketOwner: options.expectedBucketOwner,
94
95
  downloadBehavior: null,
96
+ customCredentials: null,
95
97
  });
96
98
  await (0, renderer_1.renderStill)({
97
99
  composition,
@@ -99,7 +101,10 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
99
101
  serveUrl: lambdaParams.serveUrl,
100
102
  dumpBrowserLogs: false,
101
103
  envVariables: lambdaParams.envVariables,
102
- frame: lambdaParams.frame,
104
+ frame: renderer_1.RenderInternals.convertToPositiveFrameIndex({
105
+ frame: lambdaParams.frame,
106
+ durationInFrames: composition.durationInFrames,
107
+ }),
103
108
  imageFormat: lambdaParams.imageFormat,
104
109
  inputProps: lambdaParams.inputProps,
105
110
  overwrite: false,
@@ -110,7 +115,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
110
115
  timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
111
116
  downloadMap,
112
117
  });
113
- const { key, renderBucketName } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, bucketName);
118
+ const { key, renderBucketName, customCredentials } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, bucketName, (0, expected_out_name_1.getCredentialsFromOutName)(lambdaParams.outName));
114
119
  const { size } = await fs_1.default.promises.stat(outputPath);
115
120
  await (0, io_1.lambdaWriteFile)({
116
121
  bucketName: renderBucketName,
@@ -120,6 +125,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
120
125
  expectedBucketOwner: options.expectedBucketOwner,
121
126
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
122
127
  downloadBehavior: lambdaParams.downloadBehavior,
128
+ customCredentials,
123
129
  });
124
130
  await fs_1.default.promises.rm(outputPath, { recursive: true });
125
131
  const estimatedPrice = (0, estimate_price_1.estimatePrice)({
@@ -133,7 +139,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
133
139
  diskSizeInMb: constants_1.MAX_EPHEMERAL_STORAGE_IN_MB,
134
140
  });
135
141
  return {
136
- output: (0, get_output_url_from_metadata_1.getOutputUrlFromMetadata)(renderMetadata, bucketName),
142
+ output: (0, get_output_url_from_metadata_1.getOutputUrlFromMetadata)(renderMetadata, bucketName, customCredentials),
137
143
  size,
138
144
  bucketName,
139
145
  estimatedPrice: (0, format_costs_info_1.formatCostsInfo)(estimatedPrice),
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { DeleteFunctionInput } from './api/delete-function';
2
2
  import { deleteFunction } from './api/delete-function';
3
+ import { deleteRender } from './api/delete-render';
3
4
  import type { DeleteSiteInput, DeleteSiteOutput } from './api/delete-site';
4
5
  import { deleteSite } from './api/delete-site';
5
6
  import type { DeployFunctionInput, DeployFunctionOutput } from './api/deploy-function';
@@ -31,10 +32,14 @@ import type { RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput } from './api/
31
32
  import { renderMediaOnLambda, renderVideoOnLambda } from './api/render-media-on-lambda';
32
33
  import type { RenderStillOnLambdaInput, RenderStillOnLambdaOutput } from './api/render-still-on-lambda';
33
34
  import { renderStillOnLambda } from './api/render-still-on-lambda';
35
+ import { validateWebhookSignature } from './api/validate-webhook-signature';
34
36
  import type { LambdaLSInput, LambdaLsReturnType } from './functions/helpers/io';
37
+ import type { EnhancedErrorInfo, LambdaErrorInfo } from './functions/helpers/write-lambda-error';
35
38
  import { LambdaInternals } from './internals';
36
39
  import type { AwsRegion } from './pricing/aws-regions';
40
+ import type { CustomCredentials } from './shared/aws-clients';
37
41
  import type { RenderProgress } from './shared/constants';
42
+ import type { WebhookPayload } from './shared/invoke-webhook';
38
43
  import type { LambdaArchitecture } from './shared/validate-architecture';
39
- export { deleteSite, deployFunction, deploySite, downloadMedia, downloadVideo, getFunctions, getUserPolicy, getRolePolicy, getSites, getOrCreateBucket, getRenderProgress, renderVideoOnLambda, renderMediaOnLambda, simulatePermissions, deleteFunction, getFunctionInfo, estimatePrice, LambdaInternals, renderStillOnLambda, getRegions, getAwsClient, presignUrl, };
40
- export type { AwsRegion, RenderProgress, DeploySiteInput, DeploySiteOutput, LambdaLsReturnType, LambdaLSInput, DeleteSiteInput, DeleteSiteOutput, EstimatePriceInput, DeployFunctionInput, DeployFunctionOutput, DeleteFunctionInput, GetFunctionInfoInput, FunctionInfo, GetFunctionsInput, GetSitesInput, GetSitesOutput, DownloadMediaInput, DownloadMediaOutput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, GetAwsClientInput, GetAwsClientOutput, LambdaArchitecture, };
44
+ export { deleteSite, deployFunction, deploySite, downloadMedia, downloadVideo, getFunctions, getUserPolicy, getRolePolicy, getSites, getOrCreateBucket, getRenderProgress, renderVideoOnLambda, renderMediaOnLambda, simulatePermissions, deleteFunction, getFunctionInfo, estimatePrice, LambdaInternals, renderStillOnLambda, getRegions, getAwsClient, presignUrl, deleteRender, validateWebhookSignature, };
45
+ export type { AwsRegion, RenderProgress, DeploySiteInput, DeploySiteOutput, LambdaLsReturnType, LambdaLSInput, DeleteSiteInput, DeleteSiteOutput, EstimatePriceInput, DeployFunctionInput, DeployFunctionOutput, DeleteFunctionInput, GetFunctionInfoInput, FunctionInfo, GetFunctionsInput, GetSitesInput, GetSitesOutput, DownloadMediaInput, DownloadMediaOutput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, GetAwsClientInput, GetAwsClientOutput, LambdaArchitecture, CustomCredentials, WebhookPayload, LambdaErrorInfo, EnhancedErrorInfo, };
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.presignUrl = exports.getAwsClient = exports.getRegions = exports.renderStillOnLambda = exports.LambdaInternals = exports.estimatePrice = exports.getFunctionInfo = exports.deleteFunction = exports.simulatePermissions = exports.renderMediaOnLambda = exports.renderVideoOnLambda = exports.getRenderProgress = exports.getOrCreateBucket = exports.getSites = exports.getRolePolicy = exports.getUserPolicy = exports.getFunctions = exports.downloadVideo = exports.downloadMedia = exports.deploySite = exports.deployFunction = exports.deleteSite = void 0;
3
+ exports.validateWebhookSignature = exports.deleteRender = exports.presignUrl = exports.getAwsClient = exports.getRegions = exports.renderStillOnLambda = exports.LambdaInternals = exports.estimatePrice = exports.getFunctionInfo = exports.deleteFunction = exports.simulatePermissions = exports.renderMediaOnLambda = exports.renderVideoOnLambda = exports.getRenderProgress = exports.getOrCreateBucket = exports.getSites = exports.getRolePolicy = exports.getUserPolicy = exports.getFunctions = exports.downloadVideo = exports.downloadMedia = exports.deploySite = exports.deployFunction = exports.deleteSite = void 0;
4
4
  const delete_function_1 = require("./api/delete-function");
5
5
  Object.defineProperty(exports, "deleteFunction", { enumerable: true, get: function () { return delete_function_1.deleteFunction; } });
6
+ const delete_render_1 = require("./api/delete-render");
7
+ Object.defineProperty(exports, "deleteRender", { enumerable: true, get: function () { return delete_render_1.deleteRender; } });
6
8
  const delete_site_1 = require("./api/delete-site");
7
9
  Object.defineProperty(exports, "deleteSite", { enumerable: true, get: function () { return delete_site_1.deleteSite; } });
8
10
  const deploy_function_1 = require("./api/deploy-function");
@@ -40,5 +42,7 @@ Object.defineProperty(exports, "renderMediaOnLambda", { enumerable: true, get: f
40
42
  Object.defineProperty(exports, "renderVideoOnLambda", { enumerable: true, get: function () { return render_media_on_lambda_1.renderVideoOnLambda; } });
41
43
  const render_still_on_lambda_1 = require("./api/render-still-on-lambda");
42
44
  Object.defineProperty(exports, "renderStillOnLambda", { enumerable: true, get: function () { return render_still_on_lambda_1.renderStillOnLambda; } });
45
+ const validate_webhook_signature_1 = require("./api/validate-webhook-signature");
46
+ Object.defineProperty(exports, "validateWebhookSignature", { enumerable: true, get: function () { return validate_webhook_signature_1.validateWebhookSignature; } });
43
47
  const internals_1 = require("./internals");
44
48
  Object.defineProperty(exports, "LambdaInternals", { enumerable: true, get: function () { return internals_1.LambdaInternals; } });
File without changes
package/dist/internals.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/regions.d.ts CHANGED
File without changes
package/dist/regions.js CHANGED
File without changes
File without changes
File without changes