@fleekhq/space-client
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -14,3 +14,4 @@ "use strict"; | ||
const request = new space_pb_1.ListDirectoryRequest(); | ||
request.setPath(payload.path); | ||
const path = payload.path.replace(/^\//, ''); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -46,3 +47,4 @@ this.instance.listDirectory(request, metadata, (err, res) => { | ||
const request = new space_pb_1.OpenFileRequest(); | ||
request.setPath(payload.path); | ||
const path = payload.path.replace(/^\//, ''); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -73,4 +75,5 @@ this.instance.openFile(request, metadata, (err, res) => { | ||
const request = new space_pb_1.AddItemsRequest(); | ||
const targetPath = payload.targetPath.replace(/^\//, ''); | ||
request.setBucket(payload.bucket); | ||
request.setTargetpath(payload.targetPath); | ||
request.setTargetpath(targetPath); | ||
request.setSourcepathsList(payload.sourcePaths); | ||
@@ -83,3 +86,4 @@ const stream = this.instance.addItems(request, metadata); | ||
const request = new space_pb_1.CreateFolderRequest(); | ||
request.setPath(payload.path); | ||
const path = payload.path.replace(/^\//, ''); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -86,0 +90,0 @@ this.instance.createFolder(request, metadata, (err, res) => { |
@@ -14,3 +14,4 @@ import { Empty } from 'google-protobuf/google/protobuf/empty_pb'; | ||
var request = new ListDirectoryRequest(); | ||
request.setPath(payload.path); | ||
var path = payload.path.replace(/^\//, ''); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -51,3 +52,4 @@ _this.instance.listDirectory(request, metadata, function (err, res) { | ||
var request = new OpenFileRequest(); | ||
request.setPath(payload.path); | ||
var path = payload.path.replace(/^\//, ''); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -81,4 +83,5 @@ _this.instance.openFile(request, metadata, function (err, res) { | ||
var request = new AddItemsRequest(); | ||
var targetPath = payload.targetPath.replace(/^\//, ''); | ||
request.setBucket(payload.bucket); | ||
request.setTargetpath(payload.targetPath); | ||
request.setTargetpath(targetPath); | ||
request.setSourcepathsList(payload.sourcePaths); | ||
@@ -93,3 +96,4 @@ var stream = this.instance.addItems(request, metadata); | ||
var request = new CreateFolderRequest(); | ||
request.setPath(payload.path); | ||
var path = payload.path.replace(/^\//, ''); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -96,0 +100,0 @@ _this.instance.createFolder(request, metadata, function (err, res) { |
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
resetMocks: true, | ||
globals: { | ||
@@ -5,0 +6,0 @@ 'ts-jest': { |
{ | ||
"name": "@fleekhq/space-client", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/esm/index.js", |
@@ -91,3 +91,5 @@ import grpcWeb, { ClientReadableStream } from 'grpc-web'; | ||
const request = new ListDirectoryRequest(); | ||
request.setPath(payload.path); | ||
const path = payload.path.replace(/^\//, ''); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -147,4 +149,5 @@ | ||
const request = new OpenFileRequest(); | ||
const path = payload.path.replace(/^\//, ''); | ||
request.setPath(payload.path); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -195,4 +198,6 @@ | ||
const request = new AddItemsRequest(); | ||
const targetPath = payload.targetPath.replace(/^\//, ''); | ||
request.setBucket(payload.bucket); | ||
request.setTargetpath(payload.targetPath); | ||
request.setTargetpath(targetPath); | ||
request.setSourcepathsList(payload.sourcePaths); | ||
@@ -210,3 +215,5 @@ const stream = this.instance.addItems(request, metadata); | ||
const request = new CreateFolderRequest(); | ||
request.setPath(payload.path); | ||
const path = payload.path.replace(/^\//, ''); | ||
request.setPath(path); | ||
request.setBucket(payload.bucket); | ||
@@ -213,0 +220,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1308323
41
24619