@aspan-corporation/ac-shared 1.0.29 → 1.0.30

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/lib/index.js CHANGED
@@ -14395,7 +14395,8 @@ var JPEG_EXTENSION = "jpeg";
14395
14395
  var JPG_EXTENSION = "jpg";
14396
14396
  var HEIC_EXTENSION = "heic";
14397
14397
  var MOV_EXTENSION = "mov";
14398
- var DEFAULT_THUMBS_EXTENSION = JPG_EXTENSION;
14398
+ var THUMBS_EXTENSION = JPG_EXTENSION;
14399
+ var ENCODED_VIDEO_EXTENSION = "mp4";
14399
14400
  var ALLOWED_EXTENSIONS = [
14400
14401
  JPEG_EXTENSION,
14401
14402
  JPG_EXTENSION,
@@ -14413,9 +14414,16 @@ var getThumbsKey = ({
14413
14414
  height
14414
14415
  }) => {
14415
14416
  const ext = getKeyExtension(key);
14416
- const destinationKey = [JPEG_EXTENSION, JPG_EXTENSION].includes(ext) ? key : `${key.split(".").slice(0, -1).join(".")}.${DEFAULT_THUMBS_EXTENSION}`;
14417
+ const destinationKey = [JPEG_EXTENSION, JPG_EXTENSION].includes(ext) ? key : `${key.split(".").slice(0, -1).join(".")}.${THUMBS_EXTENSION}`;
14417
14418
  return `${prefix}/${width}x${height}/${destinationKey}`;
14418
14419
  };
14420
+ var getEncodedVideoKey = ({
14421
+ key,
14422
+ prefix
14423
+ }) => {
14424
+ const destinationKey = `${key.split(".").slice(0, -1).join(".")}.${ENCODED_VIDEO_EXTENSION}`;
14425
+ return `${prefix}/${destinationKey}`;
14426
+ };
14419
14427
  var getKeyExtension = (key) => extname(key).slice(1).toLowerCase();
14420
14428
  var isAllowedExtension = (key) => {
14421
14429
  const ext = getKeyExtension(key);
@@ -14824,8 +14832,8 @@ var getPersistenceStore = () => {
14824
14832
  export {
14825
14833
  ALLOWED_EXTENSIONS,
14826
14834
  ALLOWED_VIDEO_EXTENSIONS,
14827
- DEFAULT_THUMBS_EXTENSION,
14828
14835
  DynamoDBService,
14836
+ ENCODED_VIDEO_EXTENSION,
14829
14837
  HEIC_EXTENSION,
14830
14838
  JPEG_EXTENSION,
14831
14839
  JPG_EXTENSION,
@@ -14838,9 +14846,11 @@ export {
14838
14846
  SSMService,
14839
14847
  STSService,
14840
14848
  THUMBNAIL_RESOLUTIONS,
14849
+ THUMBS_EXTENSION,
14841
14850
  Tracer2 as Tracer,
14842
14851
  assertEnvVar,
14843
14852
  assertString,
14853
+ getEncodedVideoKey,
14844
14854
  getKeyExtension,
14845
14855
  getLoggerWithScope,
14846
14856
  getObjectWithAssumeRoleCommandOutputAttribute,