@bytescale/sdk 3.28.0 → 3.29.0

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.
@@ -56,6 +56,7 @@ __lib_require__.d(__lib_exports__, {
56
56
  "UrlBuilder": function() { return /* reexport */ UrlBuilder; },
57
57
  "UrlBuilderTypesNoOp": function() { return /* reexport */ UrlBuilderTypesNoOp; },
58
58
  "VoidApiResponse": function() { return /* reexport */ VoidApiResponse; },
59
+ "encodeBytescaleQuerystringKVP": function() { return /* reexport */ encodeBytescaleQuerystringKVP; },
59
60
  "querystring": function() { return /* reexport */ querystring; }
60
61
  });
61
62
 
@@ -627,7 +628,20 @@ function querystringSingleKey(key, value) {
627
628
  // Matches 'array' or 'object' (which we want).
628
629
  return querystring(value);
629
630
  }
630
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(String(value)));
631
+ return encodeBytescaleQuerystringKVP(key, String(value));
632
+ }
633
+ /**
634
+ * Handles artifacts specially as these must use "/" instead of "%2F" in order for relative paths within the artifact's
635
+ * contents to work (assumes user has replaced "?" with "!"). For example, M3U8 artifacts that contain relative URLs to
636
+ * other M3U8s and/or media segments will only work if the user replaces "?" with "!" in the URL _and_ the artifact
637
+ * query param value has been written using "/" instead of "%2F", as this then means the URLs become relative to the
638
+ * artifact, as opposed to the file path.
639
+ */
640
+ function encodeBytescaleQuerystringKVP(key, value) {
641
+ if (key === "a" || key === "artifact") {
642
+ return "".concat(key, "=").concat(encodeURIComponent(value).replace(/%2F/g, "/"));
643
+ }
644
+ return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
631
645
  }
632
646
  var JSONApiResponse = /*#__PURE__*/function () {
633
647
  function JSONApiResponse(raw) {
@@ -1756,7 +1770,7 @@ var UrlBuilder = /*#__PURE__*/function () {
1756
1770
  var _ref4 = _slicedToArray(_ref3, 2),
1757
1771
  key = _ref4[0],
1758
1772
  value = _ref4[1];
1759
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
1773
+ return encodeBytescaleQuerystringKVP(key, value);
1760
1774
  }).join("&"));
1761
1775
  }
1762
1776
  }]);
@@ -41,6 +41,7 @@ __lib_require__.d(__lib_exports__, {
41
41
  "UrlBuilder": function() { return /* reexport */ UrlBuilder; },
42
42
  "UrlBuilderTypesNoOp": function() { return /* reexport */ UrlBuilderTypesNoOp; },
43
43
  "VoidApiResponse": function() { return /* reexport */ VoidApiResponse; },
44
+ "encodeBytescaleQuerystringKVP": function() { return /* reexport */ encodeBytescaleQuerystringKVP; },
44
45
  "querystring": function() { return /* reexport */ querystring; }
45
46
  });
46
47
 
@@ -612,7 +613,20 @@ function querystringSingleKey(key, value) {
612
613
  // Matches 'array' or 'object' (which we want).
613
614
  return querystring(value);
614
615
  }
615
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(String(value)));
616
+ return encodeBytescaleQuerystringKVP(key, String(value));
617
+ }
618
+ /**
619
+ * Handles artifacts specially as these must use "/" instead of "%2F" in order for relative paths within the artifact's
620
+ * contents to work (assumes user has replaced "?" with "!"). For example, M3U8 artifacts that contain relative URLs to
621
+ * other M3U8s and/or media segments will only work if the user replaces "?" with "!" in the URL _and_ the artifact
622
+ * query param value has been written using "/" instead of "%2F", as this then means the URLs become relative to the
623
+ * artifact, as opposed to the file path.
624
+ */
625
+ function encodeBytescaleQuerystringKVP(key, value) {
626
+ if (key === "a" || key === "artifact") {
627
+ return "".concat(key, "=").concat(encodeURIComponent(value).replace(/%2F/g, "/"));
628
+ }
629
+ return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
616
630
  }
617
631
  var JSONApiResponse = /*#__PURE__*/function () {
618
632
  function JSONApiResponse(raw) {
@@ -1741,7 +1755,7 @@ var UrlBuilder = /*#__PURE__*/function () {
1741
1755
  var _ref4 = _slicedToArray(_ref3, 2),
1742
1756
  key = _ref4[0],
1743
1757
  value = _ref4[1];
1744
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
1758
+ return encodeBytescaleQuerystringKVP(key, value);
1745
1759
  }).join("&"));
1746
1760
  }
1747
1761
  }]);
@@ -2992,5 +3006,6 @@ var __lib_exports__UploadManager = __lib_exports__.UploadManager;
2992
3006
  var __lib_exports__UrlBuilder = __lib_exports__.UrlBuilder;
2993
3007
  var __lib_exports__UrlBuilderTypesNoOp = __lib_exports__.UrlBuilderTypesNoOp;
2994
3008
  var __lib_exports__VoidApiResponse = __lib_exports__.VoidApiResponse;
3009
+ var __lib_exports__encodeBytescaleQuerystringKVP = __lib_exports__.encodeBytescaleQuerystringKVP;
2995
3010
  var __lib_exports__querystring = __lib_exports__.querystring;
2996
- export { __lib_exports__AuthManager as AuthManager, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiClientConfigUtils as BytescaleApiClientConfigUtils, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__BytescaleGenericError as BytescaleGenericError, __lib_exports__CancelledError as CancelledError, __lib_exports__CommonTypesNoOp as CommonTypesNoOp, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__UrlBuilder as UrlBuilder, __lib_exports__UrlBuilderTypesNoOp as UrlBuilderTypesNoOp, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__querystring as querystring };
3011
+ export { __lib_exports__AuthManager as AuthManager, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiClientConfigUtils as BytescaleApiClientConfigUtils, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__BytescaleGenericError as BytescaleGenericError, __lib_exports__CancelledError as CancelledError, __lib_exports__CommonTypesNoOp as CommonTypesNoOp, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__UrlBuilder as UrlBuilder, __lib_exports__UrlBuilderTypesNoOp as UrlBuilderTypesNoOp, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__encodeBytescaleQuerystringKVP as encodeBytescaleQuerystringKVP, __lib_exports__querystring as querystring };
@@ -56,6 +56,7 @@ __lib_require__.d(__lib_exports__, {
56
56
  "UrlBuilder": function() { return /* reexport */ UrlBuilder; },
57
57
  "UrlBuilderTypesNoOp": function() { return /* reexport */ UrlBuilderTypesNoOp; },
58
58
  "VoidApiResponse": function() { return /* reexport */ VoidApiResponse; },
59
+ "encodeBytescaleQuerystringKVP": function() { return /* reexport */ encodeBytescaleQuerystringKVP; },
59
60
  "querystring": function() { return /* reexport */ querystring; }
60
61
  });
61
62
 
@@ -627,7 +628,20 @@ function querystringSingleKey(key, value) {
627
628
  // Matches 'array' or 'object' (which we want).
628
629
  return querystring(value);
629
630
  }
630
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(String(value)));
631
+ return encodeBytescaleQuerystringKVP(key, String(value));
632
+ }
633
+ /**
634
+ * Handles artifacts specially as these must use "/" instead of "%2F" in order for relative paths within the artifact's
635
+ * contents to work (assumes user has replaced "?" with "!"). For example, M3U8 artifacts that contain relative URLs to
636
+ * other M3U8s and/or media segments will only work if the user replaces "?" with "!" in the URL _and_ the artifact
637
+ * query param value has been written using "/" instead of "%2F", as this then means the URLs become relative to the
638
+ * artifact, as opposed to the file path.
639
+ */
640
+ function encodeBytescaleQuerystringKVP(key, value) {
641
+ if (key === "a" || key === "artifact") {
642
+ return "".concat(key, "=").concat(encodeURIComponent(value).replace(/%2F/g, "/"));
643
+ }
644
+ return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
631
645
  }
632
646
  var JSONApiResponse = /*#__PURE__*/function () {
633
647
  function JSONApiResponse(raw) {
@@ -1756,7 +1770,7 @@ var UrlBuilder = /*#__PURE__*/function () {
1756
1770
  var _ref4 = _slicedToArray(_ref3, 2),
1757
1771
  key = _ref4[0],
1758
1772
  value = _ref4[1];
1759
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
1773
+ return encodeBytescaleQuerystringKVP(key, value);
1760
1774
  }).join("&"));
1761
1775
  }
1762
1776
  }]);
@@ -43,6 +43,7 @@ __lib_require__.d(__lib_exports__, {
43
43
  "UrlBuilder": function() { return /* reexport */ UrlBuilder; },
44
44
  "UrlBuilderTypesNoOp": function() { return /* reexport */ UrlBuilderTypesNoOp; },
45
45
  "VoidApiResponse": function() { return /* reexport */ VoidApiResponse; },
46
+ "encodeBytescaleQuerystringKVP": function() { return /* reexport */ encodeBytescaleQuerystringKVP; },
46
47
  "querystring": function() { return /* reexport */ querystring; }
47
48
  });
48
49
 
@@ -614,7 +615,20 @@ function querystringSingleKey(key, value) {
614
615
  // Matches 'array' or 'object' (which we want).
615
616
  return querystring(value);
616
617
  }
617
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(String(value)));
618
+ return encodeBytescaleQuerystringKVP(key, String(value));
619
+ }
620
+ /**
621
+ * Handles artifacts specially as these must use "/" instead of "%2F" in order for relative paths within the artifact's
622
+ * contents to work (assumes user has replaced "?" with "!"). For example, M3U8 artifacts that contain relative URLs to
623
+ * other M3U8s and/or media segments will only work if the user replaces "?" with "!" in the URL _and_ the artifact
624
+ * query param value has been written using "/" instead of "%2F", as this then means the URLs become relative to the
625
+ * artifact, as opposed to the file path.
626
+ */
627
+ function encodeBytescaleQuerystringKVP(key, value) {
628
+ if (key === "a" || key === "artifact") {
629
+ return "".concat(key, "=").concat(encodeURIComponent(value).replace(/%2F/g, "/"));
630
+ }
631
+ return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
618
632
  }
619
633
  var JSONApiResponse = /*#__PURE__*/function () {
620
634
  function JSONApiResponse(raw) {
@@ -1743,7 +1757,7 @@ var UrlBuilder = /*#__PURE__*/function () {
1743
1757
  var _ref4 = _slicedToArray(_ref3, 2),
1744
1758
  key = _ref4[0],
1745
1759
  value = _ref4[1];
1746
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
1760
+ return encodeBytescaleQuerystringKVP(key, value);
1747
1761
  }).join("&"));
1748
1762
  }
1749
1763
  }]);
@@ -3010,5 +3024,6 @@ var __lib_exports__UploadManager = __lib_exports__.UploadManager;
3010
3024
  var __lib_exports__UrlBuilder = __lib_exports__.UrlBuilder;
3011
3025
  var __lib_exports__UrlBuilderTypesNoOp = __lib_exports__.UrlBuilderTypesNoOp;
3012
3026
  var __lib_exports__VoidApiResponse = __lib_exports__.VoidApiResponse;
3027
+ var __lib_exports__encodeBytescaleQuerystringKVP = __lib_exports__.encodeBytescaleQuerystringKVP;
3013
3028
  var __lib_exports__querystring = __lib_exports__.querystring;
3014
- export { __lib_exports__AuthManager as AuthManager, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiClientConfigUtils as BytescaleApiClientConfigUtils, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__BytescaleGenericError as BytescaleGenericError, __lib_exports__CancelledError as CancelledError, __lib_exports__CommonTypesNoOp as CommonTypesNoOp, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__UrlBuilder as UrlBuilder, __lib_exports__UrlBuilderTypesNoOp as UrlBuilderTypesNoOp, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__querystring as querystring };
3029
+ export { __lib_exports__AuthManager as AuthManager, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiClientConfigUtils as BytescaleApiClientConfigUtils, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__BytescaleGenericError as BytescaleGenericError, __lib_exports__CancelledError as CancelledError, __lib_exports__CommonTypesNoOp as CommonTypesNoOp, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__UrlBuilder as UrlBuilder, __lib_exports__UrlBuilderTypesNoOp as UrlBuilderTypesNoOp, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__encodeBytescaleQuerystringKVP as encodeBytescaleQuerystringKVP, __lib_exports__querystring as querystring };
@@ -120,6 +120,14 @@ export interface RequestOpts {
120
120
  body?: HTTPBody;
121
121
  }
122
122
  export declare function querystring(params: HTTPQuery): string;
123
+ /**
124
+ * Handles artifacts specially as these must use "/" instead of "%2F" in order for relative paths within the artifact's
125
+ * contents to work (assumes user has replaced "?" with "!"). For example, M3U8 artifacts that contain relative URLs to
126
+ * other M3U8s and/or media segments will only work if the user replaces "?" with "!" in the URL _and_ the artifact
127
+ * query param value has been written using "/" instead of "%2F", as this then means the URLs become relative to the
128
+ * artifact, as opposed to the file path.
129
+ */
130
+ export declare function encodeBytescaleQuerystringKVP(key: string, value: string): string;
123
131
  export interface ApiResponse<T> {
124
132
  raw: Response;
125
133
  value(): Promise<T>;
@@ -56,6 +56,7 @@ __lib_require__.d(__lib_exports__, {
56
56
  "UrlBuilder": function() { return /* reexport */ UrlBuilder; },
57
57
  "UrlBuilderTypesNoOp": function() { return /* reexport */ UrlBuilderTypesNoOp; },
58
58
  "VoidApiResponse": function() { return /* reexport */ VoidApiResponse; },
59
+ "encodeBytescaleQuerystringKVP": function() { return /* reexport */ encodeBytescaleQuerystringKVP; },
59
60
  "querystring": function() { return /* reexport */ querystring; }
60
61
  });
61
62
 
@@ -627,7 +628,20 @@ function querystringSingleKey(key, value) {
627
628
  // Matches 'array' or 'object' (which we want).
628
629
  return querystring(value);
629
630
  }
630
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(String(value)));
631
+ return encodeBytescaleQuerystringKVP(key, String(value));
632
+ }
633
+ /**
634
+ * Handles artifacts specially as these must use "/" instead of "%2F" in order for relative paths within the artifact's
635
+ * contents to work (assumes user has replaced "?" with "!"). For example, M3U8 artifacts that contain relative URLs to
636
+ * other M3U8s and/or media segments will only work if the user replaces "?" with "!" in the URL _and_ the artifact
637
+ * query param value has been written using "/" instead of "%2F", as this then means the URLs become relative to the
638
+ * artifact, as opposed to the file path.
639
+ */
640
+ function encodeBytescaleQuerystringKVP(key, value) {
641
+ if (key === "a" || key === "artifact") {
642
+ return "".concat(key, "=").concat(encodeURIComponent(value).replace(/%2F/g, "/"));
643
+ }
644
+ return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
631
645
  }
632
646
  var JSONApiResponse = /*#__PURE__*/function () {
633
647
  function JSONApiResponse(raw) {
@@ -1756,7 +1770,7 @@ var UrlBuilder = /*#__PURE__*/function () {
1756
1770
  var _ref4 = _slicedToArray(_ref3, 2),
1757
1771
  key = _ref4[0],
1758
1772
  value = _ref4[1];
1759
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
1773
+ return encodeBytescaleQuerystringKVP(key, value);
1760
1774
  }).join("&"));
1761
1775
  }
1762
1776
  }]);
@@ -41,6 +41,7 @@ __lib_require__.d(__lib_exports__, {
41
41
  "UrlBuilder": function() { return /* reexport */ UrlBuilder; },
42
42
  "UrlBuilderTypesNoOp": function() { return /* reexport */ UrlBuilderTypesNoOp; },
43
43
  "VoidApiResponse": function() { return /* reexport */ VoidApiResponse; },
44
+ "encodeBytescaleQuerystringKVP": function() { return /* reexport */ encodeBytescaleQuerystringKVP; },
44
45
  "querystring": function() { return /* reexport */ querystring; }
45
46
  });
46
47
 
@@ -612,7 +613,20 @@ function querystringSingleKey(key, value) {
612
613
  // Matches 'array' or 'object' (which we want).
613
614
  return querystring(value);
614
615
  }
615
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(String(value)));
616
+ return encodeBytescaleQuerystringKVP(key, String(value));
617
+ }
618
+ /**
619
+ * Handles artifacts specially as these must use "/" instead of "%2F" in order for relative paths within the artifact's
620
+ * contents to work (assumes user has replaced "?" with "!"). For example, M3U8 artifacts that contain relative URLs to
621
+ * other M3U8s and/or media segments will only work if the user replaces "?" with "!" in the URL _and_ the artifact
622
+ * query param value has been written using "/" instead of "%2F", as this then means the URLs become relative to the
623
+ * artifact, as opposed to the file path.
624
+ */
625
+ function encodeBytescaleQuerystringKVP(key, value) {
626
+ if (key === "a" || key === "artifact") {
627
+ return "".concat(key, "=").concat(encodeURIComponent(value).replace(/%2F/g, "/"));
628
+ }
629
+ return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
616
630
  }
617
631
  var JSONApiResponse = /*#__PURE__*/function () {
618
632
  function JSONApiResponse(raw) {
@@ -1741,7 +1755,7 @@ var UrlBuilder = /*#__PURE__*/function () {
1741
1755
  var _ref4 = _slicedToArray(_ref3, 2),
1742
1756
  key = _ref4[0],
1743
1757
  value = _ref4[1];
1744
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value));
1758
+ return encodeBytescaleQuerystringKVP(key, value);
1745
1759
  }).join("&"));
1746
1760
  }
1747
1761
  }]);
@@ -2535,5 +2549,6 @@ var __lib_exports__UploadManager = __lib_exports__.UploadManager;
2535
2549
  var __lib_exports__UrlBuilder = __lib_exports__.UrlBuilder;
2536
2550
  var __lib_exports__UrlBuilderTypesNoOp = __lib_exports__.UrlBuilderTypesNoOp;
2537
2551
  var __lib_exports__VoidApiResponse = __lib_exports__.VoidApiResponse;
2552
+ var __lib_exports__encodeBytescaleQuerystringKVP = __lib_exports__.encodeBytescaleQuerystringKVP;
2538
2553
  var __lib_exports__querystring = __lib_exports__.querystring;
2539
- export { __lib_exports__AuthManager as AuthManager, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiClientConfigUtils as BytescaleApiClientConfigUtils, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__BytescaleGenericError as BytescaleGenericError, __lib_exports__CancelledError as CancelledError, __lib_exports__CommonTypesNoOp as CommonTypesNoOp, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__UrlBuilder as UrlBuilder, __lib_exports__UrlBuilderTypesNoOp as UrlBuilderTypesNoOp, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__querystring as querystring };
2554
+ export { __lib_exports__AuthManager as AuthManager, __lib_exports__BaseAPI as BaseAPI, __lib_exports__BinaryResult as BinaryResult, __lib_exports__BytescaleApiClientConfigUtils as BytescaleApiClientConfigUtils, __lib_exports__BytescaleApiError as BytescaleApiError, __lib_exports__BytescaleGenericError as BytescaleGenericError, __lib_exports__CancelledError as CancelledError, __lib_exports__CommonTypesNoOp as CommonTypesNoOp, __lib_exports__FileApi as FileApi, __lib_exports__FolderApi as FolderApi, __lib_exports__JSONApiResponse as JSONApiResponse, __lib_exports__JobApi as JobApi, __lib_exports__UploadApi as UploadApi, __lib_exports__UploadManager as UploadManager, __lib_exports__UrlBuilder as UrlBuilder, __lib_exports__UrlBuilderTypesNoOp as UrlBuilderTypesNoOp, __lib_exports__VoidApiResponse as VoidApiResponse, __lib_exports__encodeBytescaleQuerystringKVP as encodeBytescaleQuerystringKVP, __lib_exports__querystring as querystring };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "3.28.0",
3
+ "version": "3.29.0",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@ describe("UrlBuilder", () => {
49
49
  filePath: "/example.jpg",
50
50
  options: { transformation: "preset", transformationPreset: "thumbnail", artifact: "/foo" }
51
51
  });
52
- const expected = "https://upcdn.io/1234abc/thumbnail/example.jpg?artifact=%2Ffoo";
52
+ const expected = "https://upcdn.io/1234abc/thumbnail/example.jpg?artifact=/foo";
53
53
  expect(actual).toEqual(expected);
54
54
  });
55
55
 
@@ -59,7 +59,7 @@ describe("UrlBuilder", () => {
59
59
  filePath: "/example.jpg",
60
60
  options: { transformation: "preset", transformationPreset: "thumbnail", artifact: "/foo" }
61
61
  });
62
- const expected = "https://upcdn.io/1234abc/thumbnail/example.jpg?artifact=%2Ffoo";
62
+ const expected = "https://upcdn.io/1234abc/thumbnail/example.jpg?artifact=/foo";
63
63
  expect(actual).toEqual(expected);
64
64
  });
65
65
 
@@ -74,7 +74,7 @@ describe("UrlBuilder", () => {
74
74
  cachePermanently: false
75
75
  }
76
76
  });
77
- const expected = "https://upcdn.io/1234abc/thumbnail/example.jpg?cache_perm=false&artifact=%2Ffoo";
77
+ const expected = "https://upcdn.io/1234abc/thumbnail/example.jpg?cache_perm=false&artifact=/foo";
78
78
  expect(actual).toEqual(expected);
79
79
  });
80
80
 
@@ -121,7 +121,7 @@ describe("UrlBuilder", () => {
121
121
  auth: true
122
122
  }
123
123
  });
124
- const expected = "https://upcdn.io/1234abc/image/example.jpg?w=42&h=50&version=50&cache_perm=auto&artifact=%2Ffoo";
124
+ const expected = "https://upcdn.io/1234abc/image/example.jpg?w=42&h=50&version=50&cache_perm=auto&artifact=/foo";
125
125
  expect(actual).toEqual(expected);
126
126
  });
127
127