@ardrive/turbo-sdk 1.28.1 → 1.28.2

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.
@@ -314072,7 +314072,7 @@ var import_winston = __toESM(require_winston(), 1);
314072
314072
  init_dirname();
314073
314073
  init_buffer2();
314074
314074
  init_process2();
314075
- var version16 = "1.28.1-alpha.1";
314075
+ var version16 = "1.28.2-alpha.1";
314076
314076
 
314077
314077
  // src/common/logger.ts
314078
314078
  var TurboWinstonLogger = class _TurboWinstonLogger {
@@ -40,6 +40,9 @@ class TurboAuthenticatedUploadService extends upload_js_1.TurboAuthenticatedBase
40
40
  if (file === '.DS_Store') {
41
41
  continue;
42
42
  }
43
+ else if (file.includes('\\')) {
44
+ throw Error('Files/Sub-folders with backslashes are not supported');
45
+ }
43
46
  const absoluteFilePath = (0, path_1.join)(folderPath, file);
44
47
  const stat = await fs_1.promises.stat(absoluteFilePath);
45
48
  if (stat.isDirectory()) {
@@ -72,7 +75,8 @@ class TurboAuthenticatedUploadService extends upload_js_1.TurboAuthenticatedBase
72
75
  if (folderPath.startsWith('./')) {
73
76
  folderPath = folderPath.slice(2);
74
77
  }
75
- const relativePath = file.replace((0, path_1.normalize)(folderPath + '/'), '');
78
+ let relativePath = file.replace((0, path_1.join)(folderPath + '/'), '');
79
+ relativePath = relativePath.replace(/\\/g, '/'); // only needed for windows sub-folders
76
80
  return relativePath;
77
81
  }
78
82
  contentTypeFromFile(file) {
@@ -17,4 +17,4 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.version = void 0;
19
19
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
20
- exports.version = '1.28.1';
20
+ exports.version = '1.28.2';
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { createReadStream, promises, statSync } from 'fs';
17
17
  import { lookup } from 'mime-types';
18
- import { join, normalize } from 'path';
18
+ import { join } from 'path';
19
19
  import { Readable } from 'stream';
20
20
  import { TurboAuthenticatedBaseUploadService, defaultUploadServiceURL, } from '../common/upload.js';
21
21
  import { isNodeUploadFolderParams, } from '../types.js';
@@ -37,6 +37,9 @@ export class TurboAuthenticatedUploadService extends TurboAuthenticatedBaseUploa
37
37
  if (file === '.DS_Store') {
38
38
  continue;
39
39
  }
40
+ else if (file.includes('\\')) {
41
+ throw Error('Files/Sub-folders with backslashes are not supported');
42
+ }
40
43
  const absoluteFilePath = join(folderPath, file);
41
44
  const stat = await promises.stat(absoluteFilePath);
42
45
  if (stat.isDirectory()) {
@@ -69,7 +72,8 @@ export class TurboAuthenticatedUploadService extends TurboAuthenticatedBaseUploa
69
72
  if (folderPath.startsWith('./')) {
70
73
  folderPath = folderPath.slice(2);
71
74
  }
72
- const relativePath = file.replace(normalize(folderPath + '/'), '');
75
+ let relativePath = file.replace(join(folderPath + '/'), '');
76
+ relativePath = relativePath.replace(/\\/g, '/'); // only needed for windows sub-folders
73
77
  return relativePath;
74
78
  }
75
79
  contentTypeFromFile(file) {
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '1.28.1';
17
+ export const version = '1.28.2';
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/node/upload.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EACL,mCAAmC,EAEpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,4CAA4C,EAC5C,uBAAuB,EAExB,MAAM,aAAa,CAAC;AAErB,qBAAa,+BAAgC,SAAQ,mCAAmC;gBAC1E,EACV,GAA6B,EAC7B,WAAW,EACX,MAAM,EACN,MAAM,EACN,KAAK,GACN,EAAE,4CAA4C;YAUjC,8BAA8B;IAyB5C,QAAQ,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO5D,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;IAI5C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIjC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIjC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,GAAG,MAAM;IAWtE,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKzC,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,QAAQ;CAGvD"}
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/node/upload.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EACL,mCAAmC,EAEpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,4CAA4C,EAC5C,uBAAuB,EAExB,MAAM,aAAa,CAAC;AAErB,qBAAa,+BAAgC,SAAQ,mCAAmC;gBAC1E,EACV,GAA6B,EAC7B,WAAW,EACX,MAAM,EACN,MAAM,EACN,KAAK,GACN,EAAE,4CAA4C;YAUjC,8BAA8B;IA2B5C,QAAQ,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO5D,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;IAI5C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIjC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIjC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,GAAG,MAAM;IAYtE,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKzC,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,QAAQ;CAGvD"}
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "1.28.1-alpha.1";
16
+ export declare const version = "1.28.2-alpha.1";
17
17
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.28.1",
3
+ "version": "1.28.2",
4
4
  "main": "./lib/cjs/node/index.js",
5
5
  "types": "./lib/types/node/index.d.ts",
6
6
  "module": "./lib/esm/node/index.js",