@ardrive/turbo-sdk 1.19.1 → 1.19.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.
@@ -310551,7 +310551,7 @@ var import_winston = __toESM(require_winston(), 1);
310551
310551
  init_dirname();
310552
310552
  init_buffer2();
310553
310553
  init_process2();
310554
- var version16 = "1.19.0";
310554
+ var version16 = "1.19.2-alpha.1";
310555
310555
 
310556
310556
  // src/common/logger.ts
310557
310557
  var TurboWinstonLogger = class _TurboWinstonLogger {
@@ -61,7 +61,13 @@ class TurboAuthenticatedUploadService extends upload_js_1.TurboAuthenticatedBase
61
61
  return file;
62
62
  }
63
63
  getRelativePath(file, params) {
64
- return file.replace(params.folderPath + '/', '');
64
+ let folderPath = params.folderPath;
65
+ // slice leading `./` if exists
66
+ if (folderPath.startsWith('./')) {
67
+ folderPath = folderPath.slice(2);
68
+ }
69
+ const relativePath = file.replace(folderPath + '/', '');
70
+ return relativePath;
65
71
  }
66
72
  contentTypeFromFile(file) {
67
73
  const mimeType = (0, mime_types_1.lookup)(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.19.1';
20
+ exports.version = '1.19.2';
@@ -58,7 +58,13 @@ export class TurboAuthenticatedUploadService extends TurboAuthenticatedBaseUploa
58
58
  return file;
59
59
  }
60
60
  getRelativePath(file, params) {
61
- return file.replace(params.folderPath + '/', '');
61
+ let folderPath = params.folderPath;
62
+ // slice leading `./` if exists
63
+ if (folderPath.startsWith('./')) {
64
+ folderPath = folderPath.slice(2);
65
+ }
66
+ const relativePath = file.replace(folderPath + '/', '');
67
+ return relativePath;
62
68
  }
63
69
  contentTypeFromFile(file) {
64
70
  const mimeType = lookup(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.19.1';
17
+ export const version = '1.19.2';
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/node/upload.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,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;YAIjC,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;IAOtE,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":"AAiBA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,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;YAIjC,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;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.19.0";
16
+ export declare const version = "1.19.2-alpha.1";
17
17
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.19.1",
3
+ "version": "1.19.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",