files.com 1.0.249 → 1.0.251

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/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.249
1
+ 1.0.251
@@ -26,6 +26,7 @@
26
26
  "bundle_watermark_value": {
27
27
  "key": "example value"
28
28
  },
29
+ "uploads_via_email_authentication": true,
29
30
  "color2_left": "#0066a7",
30
31
  "color2_link": "#d34f5d",
31
32
  "color2_text": "#0066a7",
@@ -171,6 +172,7 @@
171
172
  * `bundle_upload_receipt_notifications` (string): Do Bundle uploaders receive upload confirmation notifications?
172
173
  * `bundle_watermark_attachment` (Image): Preview watermark image applied to all bundle items.
173
174
  * `bundle_watermark_value` (object): Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
175
+ * `uploads_via_email_authentication` (boolean): Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
174
176
  * `color2_left` (string): Page link and button color
175
177
  * `color2_link` (string): Top bar link color
176
178
  * `color2_text` (string): Page link and button color
@@ -434,6 +436,7 @@ await Site.update({
434
436
  'ldap_group_exclusion': "example",
435
437
  'ldap_group_inclusion': "example",
436
438
  'ldap_base_dn': "example",
439
+ 'uploads_via_email_authentication': true,
437
440
  'icon16_delete': true,
438
441
  'icon32_delete': true,
439
442
  'icon48_delete': true,
@@ -564,6 +567,7 @@ await Site.update({
564
567
  * `ldap_group_exclusion` (string): Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
565
568
  * `ldap_group_inclusion` (string): Comma or newline separated list of group names (with optional wildcards) to include when syncing.
566
569
  * `ldap_base_dn` (string): Base DN for looking up users in LDAP server
570
+ * `uploads_via_email_authentication` (boolean): Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
567
571
  * `icon16_file` (file):
568
572
  * `icon16_delete` (boolean): If true, will delete the file stored in icon16
569
573
  * `icon32_file` (file):
@@ -907,7 +907,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
907
907
  });
908
908
  readableStream.on('data', /*#__PURE__*/function () {
909
909
  var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(chunk) {
910
- var nextLength, excessLength, chunkBuffer, lastChunkForPart, firstChunkForNextPart, buffer, nextFileUploadPart;
910
+ var nextLength, excessLength, chunkBuffer, tailLength, lastChunkForPart, firstChunkForNextPart, buffer, nextFileUploadPart;
911
911
  return _regenerator.default.wrap(function _callee14$(_context14) {
912
912
  while (1) switch (_context14.prev = _context14.next) {
913
913
  case 0:
@@ -916,39 +916,42 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
916
916
  excessLength = nextLength - firstFileUploadPart.partsize;
917
917
  chunkBuffer = _safeBuffer.Buffer.from(chunk);
918
918
  if (!(excessLength > 0)) {
919
- _context14.next = 19;
919
+ _context14.next = 20;
920
920
  break;
921
921
  }
922
922
  readableStream.pause();
923
- lastChunkForPart = chunkBuffer.subarray(0, excessLength);
924
- firstChunkForNextPart = chunkBuffer.subarray(excessLength);
923
+
924
+ // the amount to append this last part with to make it exactly the full partsize
925
+ tailLength = chunkBuffer.length - excessLength;
926
+ lastChunkForPart = chunkBuffer.subarray(0, tailLength);
927
+ firstChunkForNextPart = chunkBuffer.subarray(tailLength);
925
928
  chunks.push(lastChunkForPart);
926
929
  buffer = _safeBuffer.Buffer.concat(chunks);
927
- _context14.next = 12;
930
+ _context14.next = 13;
928
931
  return File._continueUpload(destinationPath, ++part, firstFileUploadPart, options);
929
- case 12:
932
+ case 13:
930
933
  nextFileUploadPart = _context14.sent;
931
934
  concurrentUploads.push(_Api.default.sendFilePart(nextFileUploadPart.upload_uri, 'PUT', buffer));
932
935
  chunks = [firstChunkForNextPart];
933
936
  length = firstChunkForNextPart.length;
934
937
  readableStream.resume();
935
- _context14.next = 21;
938
+ _context14.next = 22;
936
939
  break;
937
- case 19:
940
+ case 20:
938
941
  chunks.push(chunkBuffer);
939
942
  length += chunk.length;
940
- case 21:
941
- _context14.next = 26;
943
+ case 22:
944
+ _context14.next = 27;
942
945
  break;
943
- case 23:
944
- _context14.prev = 23;
946
+ case 24:
947
+ _context14.prev = 24;
945
948
  _context14.t0 = _context14["catch"](0);
946
949
  reject(_context14.t0);
947
- case 26:
950
+ case 27:
948
951
  case "end":
949
952
  return _context14.stop();
950
953
  }
951
- }, _callee14, null, [[0, 23]]);
954
+ }, _callee14, null, [[0, 24]]);
952
955
  }));
953
956
  return function (_x20) {
954
957
  return _ref17.apply(this, arguments);
@@ -111,6 +111,10 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
111
111
  (0, _defineProperty2.default)(this, "getBundleWatermarkValue", function () {
112
112
  return _this.attributes.bundle_watermark_value;
113
113
  });
114
+ // boolean # Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
115
+ (0, _defineProperty2.default)(this, "getUploadsViaEmailAuthentication", function () {
116
+ return _this.attributes.uploads_via_email_authentication;
117
+ });
114
118
  // string # Page link and button color
115
119
  (0, _defineProperty2.default)(this, "getColor2Left", function () {
116
120
  return _this.attributes.color2_left;
@@ -767,6 +771,7 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
767
771
  // ldap_group_exclusion - string - Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
768
772
  // ldap_group_inclusion - string - Comma or newline separated list of group names (with optional wildcards) to include when syncing.
769
773
  // ldap_base_dn - string - Base DN for looking up users in LDAP server
774
+ // uploads_via_email_authentication - boolean - Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
770
775
  // icon16_file - file
771
776
  // icon16_delete - boolean - If true, will delete the file stored in icon16
772
777
  // icon32_file - file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.249",
3
+ "version": "1.0.251",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -105,8 +105,11 @@ class File {
105
105
  if (excessLength > 0) {
106
106
  readableStream.pause()
107
107
 
108
- const lastChunkForPart = chunkBuffer.subarray(0, excessLength)
109
- const firstChunkForNextPart = chunkBuffer.subarray(excessLength)
108
+ // the amount to append this last part with to make it exactly the full partsize
109
+ const tailLength = chunkBuffer.length - excessLength
110
+
111
+ const lastChunkForPart = chunkBuffer.subarray(0, tailLength)
112
+ const firstChunkForNextPart = chunkBuffer.subarray(tailLength)
110
113
 
111
114
  chunks.push(lastChunkForPart)
112
115
 
@@ -83,6 +83,9 @@ class Site {
83
83
  // object # Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
84
84
  getBundleWatermarkValue = () => this.attributes.bundle_watermark_value
85
85
 
86
+ // boolean # Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
87
+ getUploadsViaEmailAuthentication = () => this.attributes.uploads_via_email_authentication
88
+
86
89
  // string # Page link and button color
87
90
  getColor2Left = () => this.attributes.color2_left
88
91
 
@@ -579,6 +582,7 @@ class Site {
579
582
  // ldap_group_exclusion - string - Comma or newline separated list of group names (with optional wildcards) to exclude when syncing.
580
583
  // ldap_group_inclusion - string - Comma or newline separated list of group names (with optional wildcards) to include when syncing.
581
584
  // ldap_base_dn - string - Base DN for looking up users in LDAP server
585
+ // uploads_via_email_authentication - boolean - Do incoming emails in the Inboxes require checking for SPF/DKIM/DMARC?
582
586
  // icon16_file - file
583
587
  // icon16_delete - boolean - If true, will delete the file stored in icon16
584
588
  // icon32_file - file