@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.
|
|
314075
|
+
var version16 = "1.28.2-alpha.1";
|
|
314076
314076
|
|
|
314077
314077
|
// src/common/logger.ts
|
|
314078
314078
|
var TurboWinstonLogger = class _TurboWinstonLogger {
|
package/lib/cjs/node/upload.js
CHANGED
|
@@ -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
|
-
|
|
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) {
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/node/upload.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { createReadStream, promises, statSync } from 'fs';
|
|
17
17
|
import { lookup } from 'mime-types';
|
|
18
|
-
import { join
|
|
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
|
-
|
|
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) {
|
package/lib/esm/version.js
CHANGED
|
@@ -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;
|
|
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"}
|
package/lib/types/version.d.ts
CHANGED