@things-factory/integration-sftp 4.3.668 → 4.3.671
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/package.json +6 -6
- package/dist-server/controllers/herbalife/apis/create-serial-number.js +0 -47
- package/dist-server/controllers/herbalife/apis/create-serial-number.js.map +0 -1
- package/dist-server/controllers/herbalife/apis/create-shipment.js +0 -85
- package/dist-server/controllers/herbalife/apis/create-shipment.js.map +0 -1
- package/dist-server/controllers/herbalife/apis/echo.js +0 -19
- package/dist-server/controllers/herbalife/apis/echo.js.map +0 -1
- package/dist-server/controllers/herbalife/apis/get-outbound-order.js +0 -115
- package/dist-server/controllers/herbalife/apis/get-outbound-order.js.map +0 -1
- package/dist-server/controllers/herbalife/apis/index.js +0 -21
- package/dist-server/controllers/herbalife/apis/index.js.map +0 -1
- package/dist-server/controllers/herbalife/herbalife.js +0 -44
- package/dist-server/controllers/herbalife/herbalife.js.map +0 -1
- package/dist-server/controllers/herbalife/index.js +0 -34
- package/dist-server/controllers/herbalife/index.js.map +0 -1
- package/dist-server/controllers/herbalife/platform-action.js +0 -30
- package/dist-server/controllers/herbalife/platform-action.js.map +0 -1
- package/dist-server/controllers/index.js +0 -20
- package/dist-server/controllers/index.js.map +0 -1
- package/dist-server/controllers/sftp-api/decorators.js +0 -30
- package/dist-server/controllers/sftp-api/decorators.js.map +0 -1
- package/dist-server/controllers/sftp-api/index.js +0 -71
- package/dist-server/controllers/sftp-api/index.js.map +0 -1
- package/dist-server/controllers/sftp-api/types.js +0 -1
- package/dist-server/controllers/sftp-api/types.js.map +0 -1
- package/dist-server/controllers/yltc/apis/create-yltc-inventory-report.js +0 -40
- package/dist-server/controllers/yltc/apis/create-yltc-inventory-report.js.map +0 -1
- package/dist-server/controllers/yltc/apis/echo.js +0 -19
- package/dist-server/controllers/yltc/apis/echo.js.map +0 -1
- package/dist-server/controllers/yltc/apis/index.js +0 -19
- package/dist-server/controllers/yltc/apis/index.js.map +0 -1
- package/dist-server/controllers/yltc/index.js +0 -34
- package/dist-server/controllers/yltc/index.js.map +0 -1
- package/dist-server/controllers/yltc/platform-action.js +0 -30
- package/dist-server/controllers/yltc/platform-action.js.map +0 -1
- package/dist-server/controllers/yltc/yltc.js +0 -71
- package/dist-server/controllers/yltc/yltc.js.map +0 -1
- package/dist-server/index.js +0 -23
- package/dist-server/index.js.map +0 -1
- package/dist-server/middlewares/index.js +0 -8
- package/dist-server/middlewares/index.js.map +0 -1
- package/dist-server/routes.js +0 -25
- package/dist-server/routes.js.map +0 -1
- package/dist-server/service/index.js +0 -32
- package/dist-server/service/index.js.map +0 -1
- package/dist-server/service/sftp/index.js +0 -9
- package/dist-server/service/sftp/index.js.map +0 -1
- package/dist-server/service/sftp/sftp-mutation.js +0 -280
- package/dist-server/service/sftp/sftp-mutation.js.map +0 -1
- package/dist-server/service/sftp/sftp-query.js +0 -87
- package/dist-server/service/sftp/sftp-query.js.map +0 -1
- package/dist-server/service/sftp/sftp-type.js +0 -121
- package/dist-server/service/sftp/sftp-type.js.map +0 -1
- package/dist-server/service/sftp/sftp.js +0 -213
- package/dist-server/service/sftp/sftp.js.map +0 -1
- package/dist-server/sftp-const.js +0 -50
- package/dist-server/sftp-const.js.map +0 -1
- package/dist-server/sftp-s3.js +0 -113
- package/dist-server/sftp-s3.js.map +0 -1
- package/dist-server/storage/providers/ftp-storage.provider.js +0 -178
- package/dist-server/storage/providers/ftp-storage.provider.js.map +0 -1
- package/dist-server/storage/providers/local-storage.provider.js +0 -153
- package/dist-server/storage/providers/local-storage.provider.js.map +0 -1
- package/dist-server/storage/providers/s3-storage.provider.js +0 -181
- package/dist-server/storage/providers/s3-storage.provider.js.map +0 -1
- package/dist-server/storage/providers/sftp-storage.provider.js +0 -133
- package/dist-server/storage/providers/sftp-storage.provider.js.map +0 -1
- package/dist-server/storage/storage-factory.js +0 -55
- package/dist-server/storage/storage-factory.js.map +0 -1
- package/dist-server/storage/storage-manager.js +0 -86
- package/dist-server/storage/storage-manager.js.map +0 -1
- package/dist-server/storage/storage-provider.interface.js +0 -3
- package/dist-server/storage/storage-provider.interface.js.map +0 -1
- package/dist-server/util/file-formatters.js +0 -100
- package/dist-server/util/file-formatters.js.map +0 -1
- package/dist-server/util/generate-files.js +0 -90
- package/dist-server/util/generate-files.js.map +0 -1
- package/dist-server/util/get-permitted-directories.js +0 -20
- package/dist-server/util/get-permitted-directories.js.map +0 -1
- package/dist-server/util/index.js +0 -19
- package/dist-server/util/index.js.map +0 -1
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.FtpStorageProvider = void 0;
|
|
27
|
-
const ftp = __importStar(require("basic-ftp"));
|
|
28
|
-
const basic_ftp_1 = require("basic-ftp");
|
|
29
|
-
const env_1 = require("@things-factory/env");
|
|
30
|
-
class FtpStorageProvider {
|
|
31
|
-
constructor(config) {
|
|
32
|
-
this.connected = false;
|
|
33
|
-
this.config = config;
|
|
34
|
-
this.client = new ftp.Client();
|
|
35
|
-
this.client.ftp.verbose = false;
|
|
36
|
-
}
|
|
37
|
-
async connect() {
|
|
38
|
-
try {
|
|
39
|
-
await this.client.access({
|
|
40
|
-
host: this.config.host,
|
|
41
|
-
port: this.config.port || 21,
|
|
42
|
-
user: this.config.username,
|
|
43
|
-
password: this.config.password,
|
|
44
|
-
secure: false // Set to true for FTPS
|
|
45
|
-
});
|
|
46
|
-
this.connected = true;
|
|
47
|
-
env_1.logger.info('FTP Storage Provider connected successfully');
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
this.connected = false;
|
|
51
|
-
throw new Error(`Failed to connect to FTP: ${error}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
async disconnect() {
|
|
55
|
-
if (this.connected) {
|
|
56
|
-
this.client.close();
|
|
57
|
-
this.connected = false;
|
|
58
|
-
env_1.logger.info('FTP Storage Provider disconnected');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
isConnected() {
|
|
62
|
-
return this.connected;
|
|
63
|
-
}
|
|
64
|
-
async readFile(path, encoding) {
|
|
65
|
-
const fullPath = this.getFullPath(path);
|
|
66
|
-
// Create a temporary file to download to
|
|
67
|
-
const tempFile = `/tmp/temp_${Date.now()}.tmp`;
|
|
68
|
-
try {
|
|
69
|
-
await this.client.downloadTo(tempFile, fullPath);
|
|
70
|
-
const fs = require('fs');
|
|
71
|
-
const content = fs.readFileSync(tempFile);
|
|
72
|
-
fs.unlinkSync(tempFile); // Clean up temp file
|
|
73
|
-
if (encoding) {
|
|
74
|
-
return content.toString(encoding);
|
|
75
|
-
}
|
|
76
|
-
return content;
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
// Clean up temp file if it exists
|
|
80
|
-
const fs = require('fs');
|
|
81
|
-
if (fs.existsSync(tempFile)) {
|
|
82
|
-
fs.unlinkSync(tempFile);
|
|
83
|
-
}
|
|
84
|
-
throw error;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
async writeFile(path, content, encoding) {
|
|
88
|
-
const fullPath = this.getFullPath(path);
|
|
89
|
-
if (typeof content === 'string') {
|
|
90
|
-
await this.client.uploadFrom(content, fullPath);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
// Convert to string if it's a buffer or other type
|
|
94
|
-
const contentString = content.toString(encoding || 'utf8');
|
|
95
|
-
await this.client.uploadFrom(contentString, fullPath);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
async uploadFile(params) {
|
|
99
|
-
const fullPath = this.getFullPath(`${params.uploadPath}/${params.filename}`);
|
|
100
|
-
let size = 0;
|
|
101
|
-
return new Promise((resolve, reject) => {
|
|
102
|
-
params.stream
|
|
103
|
-
.on('data', (chunk) => (size += chunk.length))
|
|
104
|
-
.on('error', (error) => reject(error))
|
|
105
|
-
.on('end', async () => {
|
|
106
|
-
try {
|
|
107
|
-
await this.client.uploadFrom(params.stream, fullPath);
|
|
108
|
-
resolve({
|
|
109
|
-
id: Date.now().toString(),
|
|
110
|
-
path: params.uploadPath,
|
|
111
|
-
size
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
catch (error) {
|
|
115
|
-
reject(error);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
async deleteFile(path) {
|
|
121
|
-
const fullPath = this.getFullPath(path);
|
|
122
|
-
await this.client.remove(fullPath);
|
|
123
|
-
}
|
|
124
|
-
async moveFile(params) {
|
|
125
|
-
const sourcePath = this.getFullPath(params.source);
|
|
126
|
-
const destPath = this.getFullPath(params.destination);
|
|
127
|
-
// FTP doesn't have native move, so we copy then delete
|
|
128
|
-
const tempFile = `/tmp/temp_move_${Date.now()}.tmp`;
|
|
129
|
-
try {
|
|
130
|
-
await this.client.downloadTo(tempFile, sourcePath);
|
|
131
|
-
await this.client.uploadFrom(tempFile, destPath);
|
|
132
|
-
await this.client.remove(sourcePath);
|
|
133
|
-
}
|
|
134
|
-
finally {
|
|
135
|
-
// Clean up temp file
|
|
136
|
-
const fs = require('fs');
|
|
137
|
-
if (fs.existsSync(tempFile)) {
|
|
138
|
-
fs.unlinkSync(tempFile);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
async readFolders(params) {
|
|
143
|
-
const fullPath = this.getFullPath(params.path);
|
|
144
|
-
const list = await this.client.list(fullPath);
|
|
145
|
-
// Filter for files only, checking if it's not a directory
|
|
146
|
-
return list.filter(item => item.type !== basic_ftp_1.FileType.Directory);
|
|
147
|
-
}
|
|
148
|
-
async createDirectory(path) {
|
|
149
|
-
const fullPath = this.getFullPath(path);
|
|
150
|
-
await this.client.ensureDir(fullPath);
|
|
151
|
-
}
|
|
152
|
-
async deleteDirectory(path) {
|
|
153
|
-
const fullPath = this.getFullPath(path);
|
|
154
|
-
await this.client.removeDir(fullPath);
|
|
155
|
-
}
|
|
156
|
-
async fileExists(path) {
|
|
157
|
-
try {
|
|
158
|
-
const fullPath = this.getFullPath(path);
|
|
159
|
-
await this.client.size(fullPath);
|
|
160
|
-
return true;
|
|
161
|
-
}
|
|
162
|
-
catch (error) {
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
async getFileSize(path) {
|
|
167
|
-
const fullPath = this.getFullPath(path);
|
|
168
|
-
return await this.client.size(fullPath);
|
|
169
|
-
}
|
|
170
|
-
getFullPath(path) {
|
|
171
|
-
if (this.config.basePath) {
|
|
172
|
-
return `${this.config.basePath}/${path}`.replace(/\/+/g, '/');
|
|
173
|
-
}
|
|
174
|
-
return path;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
exports.FtpStorageProvider = FtpStorageProvider;
|
|
178
|
-
//# sourceMappingURL=ftp-storage.provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ftp-storage.provider.js","sourceRoot":"","sources":["../../../server/storage/providers/ftp-storage.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,yCAAoC;AAEpC,6CAA4C;AAE5C,MAAa,kBAAkB;IAK7B,YAAY,MAAqB;QAFzB,cAAS,GAAY,KAAK,CAAA;QAGhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAA;QAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAA;IACjC,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI;YACF,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;gBACvB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAK;gBACvB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE;gBAC5B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,QAAS;gBAC3B,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAS;gBAC/B,MAAM,EAAE,KAAK,CAAC,uBAAuB;aACtC,CAAC,CAAA;YAEF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;YACrB,YAAM,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAA;SAC3D;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;YACtB,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAA;SACtD;IACH,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,MAAM,CAAC,KAAK,E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M,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACvC,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,IAAY;QAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACvC,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAY;QAC3B,IAAI;YACF,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;YACvC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YAChC,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,KAAK,CAAA;SACb;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAY;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACvC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACzC,CAAC;IAEO,WAAW,CAAC,IAAY;QAC9B,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxB,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;SAC9D;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AA3KD,gDA2KC"}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.LocalStorageProvider = void 0;
|
|
27
|
-
const fs = __importStar(require("fs"));
|
|
28
|
-
const path = __importStar(require("path"));
|
|
29
|
-
const env_1 = require("@things-factory/env");
|
|
30
|
-
class LocalStorageProvider {
|
|
31
|
-
constructor(config) {
|
|
32
|
-
this.connected = false;
|
|
33
|
-
this.config = config;
|
|
34
|
-
}
|
|
35
|
-
async connect() {
|
|
36
|
-
try {
|
|
37
|
-
const basePath = this.config.basePath || './storage';
|
|
38
|
-
// Ensure base directory exists
|
|
39
|
-
if (!fs.existsSync(basePath)) {
|
|
40
|
-
fs.mkdirSync(basePath, { recursive: true });
|
|
41
|
-
}
|
|
42
|
-
this.connected = true;
|
|
43
|
-
env_1.logger.info('Local Storage Provider connected successfully');
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
this.connected = false;
|
|
47
|
-
throw new Error(`Failed to connect to Local Storage: ${error}`);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
async disconnect() {
|
|
51
|
-
this.connected = false;
|
|
52
|
-
env_1.logger.info('Local Storage Provider disconnected');
|
|
53
|
-
}
|
|
54
|
-
isConnected() {
|
|
55
|
-
return this.connected;
|
|
56
|
-
}
|
|
57
|
-
async readFile(filePath, encoding) {
|
|
58
|
-
const fullPath = this.getFullPath(filePath);
|
|
59
|
-
if (encoding) {
|
|
60
|
-
return fs.readFileSync(fullPath, encoding);
|
|
61
|
-
}
|
|
62
|
-
return fs.readFileSync(fullPath);
|
|
63
|
-
}
|
|
64
|
-
async writeFile(filePath, content, encoding) {
|
|
65
|
-
const fullPath = this.getFullPath(filePath);
|
|
66
|
-
// Ensure directory exists
|
|
67
|
-
const dir = path.dirname(fullPath);
|
|
68
|
-
if (!fs.existsSync(dir)) {
|
|
69
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
70
|
-
}
|
|
71
|
-
if (encoding) {
|
|
72
|
-
fs.writeFileSync(fullPath, content, encoding);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
fs.writeFileSync(fullPath, content);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
async uploadFile(params) {
|
|
79
|
-
const fullPath = this.getFullPath(`${params.uploadPath}/${params.filename}`);
|
|
80
|
-
// Ensure directory exists
|
|
81
|
-
const dir = path.dirname(fullPath);
|
|
82
|
-
if (!fs.existsSync(dir)) {
|
|
83
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
84
|
-
}
|
|
85
|
-
let size = 0;
|
|
86
|
-
return new Promise((resolve, reject) => {
|
|
87
|
-
const writeStream = fs.createWriteStream(fullPath);
|
|
88
|
-
params.stream
|
|
89
|
-
.pipe(writeStream)
|
|
90
|
-
.on('error', (error) => reject(error))
|
|
91
|
-
.on('data', (chunk) => (size += chunk.length))
|
|
92
|
-
.on('finish', () => {
|
|
93
|
-
resolve({
|
|
94
|
-
id: Date.now().toString(),
|
|
95
|
-
path: params.uploadPath,
|
|
96
|
-
size
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
async deleteFile(filePath) {
|
|
102
|
-
const fullPath = this.getFullPath(filePath);
|
|
103
|
-
fs.unlinkSync(fullPath);
|
|
104
|
-
}
|
|
105
|
-
async moveFile(params) {
|
|
106
|
-
const sourcePath = this.getFullPath(params.source);
|
|
107
|
-
const destPath = this.getFullPath(params.destination);
|
|
108
|
-
// Ensure destination directory exists
|
|
109
|
-
const dir = path.dirname(destPath);
|
|
110
|
-
if (!fs.existsSync(dir)) {
|
|
111
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
112
|
-
}
|
|
113
|
-
fs.renameSync(sourcePath, destPath);
|
|
114
|
-
}
|
|
115
|
-
async readFolders(params) {
|
|
116
|
-
const fullPath = this.getFullPath(params.path);
|
|
117
|
-
if (!fs.existsSync(fullPath)) {
|
|
118
|
-
return [];
|
|
119
|
-
}
|
|
120
|
-
const items = fs.readdirSync(fullPath, { withFileTypes: true });
|
|
121
|
-
return items
|
|
122
|
-
.filter(item => item.isFile())
|
|
123
|
-
.map(item => ({
|
|
124
|
-
Key: path.join(params.path, item.name),
|
|
125
|
-
Size: fs.statSync(path.join(fullPath, item.name)).size
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
async createDirectory(dirPath) {
|
|
129
|
-
const fullPath = this.getFullPath(dirPath);
|
|
130
|
-
fs.mkdirSync(fullPath, { recursive: true });
|
|
131
|
-
}
|
|
132
|
-
async deleteDirectory(dirPath) {
|
|
133
|
-
const fullPath = this.getFullPath(dirPath);
|
|
134
|
-
fs.rmSync(fullPath, { recursive: true, force: true });
|
|
135
|
-
}
|
|
136
|
-
async fileExists(filePath) {
|
|
137
|
-
const fullPath = this.getFullPath(filePath);
|
|
138
|
-
return fs.existsSync(fullPath) && fs.statSync(fullPath).isFile();
|
|
139
|
-
}
|
|
140
|
-
async getFileSize(filePath) {
|
|
141
|
-
const fullPath = this.getFullPath(filePath);
|
|
142
|
-
const stats = fs.statSync(fullPath);
|
|
143
|
-
return stats.size;
|
|
144
|
-
}
|
|
145
|
-
getFullPath(filePath) {
|
|
146
|
-
if (this.config.basePath) {
|
|
147
|
-
return path.resolve(this.config.basePath, filePath);
|
|
148
|
-
}
|
|
149
|
-
return path.resolve(filePath);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
exports.LocalStorageProvider = LocalStorageProvider;
|
|
153
|
-
//# sourceMappingURL=local-storage.provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage.provider.js","sourceRoot":"","sources":["../../../server/storage/providers/local-storage.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4B;AAE5B,6CAA4C;AAE5C,MAAa,oBAAoB;IAI/B,YAAY,MAAqB;QAFzB,cAAS,GAAY,KAAK,CAAA;QAGhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI;YACF,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,WAAW,CAAA;YAEpD,+BAA+B;YAC/B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;gBAC5B,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;aAC5C;YAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;YACrB,YAAM,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAA;SAC7D;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;YACtB,MAAM,IAAI,KAAK,CAAC,uCAAuC,KAAK,EAAE,CAAC,CAAA;SAChE;IACH,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI,C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AC,WAAW,CAAC,OAAO,CAAC,CAAA;QAC1C,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IACvD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,QAAgB;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;QAC3C,OAAO,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAA;IAClE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,QAAgB;QAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;QAC3C,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QACnC,OAAO,KAAK,CAAC,IAAI,CAAA;IACnB,CAAC;IAEO,WAAW,CAAC,QAAgB;QAClC,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;SACpD;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC/B,CAAC;CACF;AAzJD,oDAyJC"}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.S3StorageProvider = void 0;
|
|
7
|
-
const aws_sdk_1 = __importDefault(require("aws-sdk"));
|
|
8
|
-
const uuid_1 = require("uuid");
|
|
9
|
-
const env_1 = require("@things-factory/env");
|
|
10
|
-
const { PassThrough } = require('stream');
|
|
11
|
-
class S3StorageProvider {
|
|
12
|
-
constructor(config) {
|
|
13
|
-
this.connected = false;
|
|
14
|
-
this.config = config;
|
|
15
|
-
this.s3 = new aws_sdk_1.default.S3({
|
|
16
|
-
accessKeyId: config.accessKeyId,
|
|
17
|
-
secretAccessKey: config.secretAccessKey,
|
|
18
|
-
region: config.region
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
async connect() {
|
|
22
|
-
try {
|
|
23
|
-
// Assume client ready; defer validation to first real operation (write/read)
|
|
24
|
-
this.connected = true;
|
|
25
|
-
env_1.logger.info('S3 Storage Provider ready');
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
this.connected = false;
|
|
29
|
-
throw new Error(`Failed to initialize S3 client: ${error}`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
async disconnect() {
|
|
33
|
-
this.connected = false;
|
|
34
|
-
env_1.logger.info('S3 Storage Provider disconnected');
|
|
35
|
-
}
|
|
36
|
-
isConnected() {
|
|
37
|
-
return this.connected;
|
|
38
|
-
}
|
|
39
|
-
async readFile(path, encoding) {
|
|
40
|
-
const result = await this.s3
|
|
41
|
-
.getObject({
|
|
42
|
-
Bucket: this.config.bucketName,
|
|
43
|
-
Key: path
|
|
44
|
-
})
|
|
45
|
-
.promise();
|
|
46
|
-
const body = result.Body;
|
|
47
|
-
if (encoding) {
|
|
48
|
-
return body.toString(encoding);
|
|
49
|
-
}
|
|
50
|
-
return body;
|
|
51
|
-
}
|
|
52
|
-
async writeFile(path, content, encoding) {
|
|
53
|
-
let body;
|
|
54
|
-
if (typeof content === 'string' && encoding) {
|
|
55
|
-
body = Buffer.from(content, encoding);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
body = Buffer.from(content);
|
|
59
|
-
}
|
|
60
|
-
const putParams = {
|
|
61
|
-
Bucket: this.config.bucketName,
|
|
62
|
-
Key: path,
|
|
63
|
-
Body: body
|
|
64
|
-
};
|
|
65
|
-
// Optional SSE if configured via env/config
|
|
66
|
-
const sse = this.config.serverSideEncryption;
|
|
67
|
-
const kmsKeyId = this.config.sseKmsKeyId;
|
|
68
|
-
if (sse) {
|
|
69
|
-
putParams.ServerSideEncryption = sse;
|
|
70
|
-
if (sse === 'aws:kms' && kmsKeyId) {
|
|
71
|
-
putParams.SSEKMSKeyId = kmsKeyId;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
await this.s3.putObject(putParams).promise();
|
|
75
|
-
}
|
|
76
|
-
async uploadFile(params) {
|
|
77
|
-
const id = (0, uuid_1.v4)();
|
|
78
|
-
let size = 0;
|
|
79
|
-
return new Promise((resolve, reject) => params.stream
|
|
80
|
-
.pipe((() => {
|
|
81
|
-
var pass = new PassThrough();
|
|
82
|
-
this.s3.upload({
|
|
83
|
-
Bucket: this.config.bucketName,
|
|
84
|
-
Key: params.uploadPath + '/' + params.filename,
|
|
85
|
-
Body: pass,
|
|
86
|
-
ServerSideEncryption: this.config.serverSideEncryption,
|
|
87
|
-
SSEKMSKeyId: this.config.sseKmsKeyId
|
|
88
|
-
}, (err, data) => (err ? reject(err) : resolve({ id, path: params.uploadPath, size })));
|
|
89
|
-
return pass;
|
|
90
|
-
})())
|
|
91
|
-
.on('error', error => reject(error))
|
|
92
|
-
.on('data', chunk => (size += chunk.length)));
|
|
93
|
-
}
|
|
94
|
-
async deleteFile(path) {
|
|
95
|
-
await this.s3
|
|
96
|
-
.deleteObject({
|
|
97
|
-
Bucket: this.config.bucketName,
|
|
98
|
-
Key: path
|
|
99
|
-
})
|
|
100
|
-
.promise();
|
|
101
|
-
}
|
|
102
|
-
async moveFile(params) {
|
|
103
|
-
try {
|
|
104
|
-
// Copy file to new location
|
|
105
|
-
await this.s3
|
|
106
|
-
.copyObject({
|
|
107
|
-
Bucket: this.config.bucketName,
|
|
108
|
-
CopySource: this.config.bucketName + '/' + params.source,
|
|
109
|
-
Key: params.destination
|
|
110
|
-
})
|
|
111
|
-
.promise();
|
|
112
|
-
// Delete original file
|
|
113
|
-
await this.deleteFile(params.source);
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
throw new Error(`Failed to move file: ${error}`);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
async readFolders(params) {
|
|
120
|
-
const s3Params = {
|
|
121
|
-
Bucket: this.config.bucketName,
|
|
122
|
-
Delimiter: '/',
|
|
123
|
-
Prefix: params.path
|
|
124
|
-
};
|
|
125
|
-
const result = await this.s3.listObjects(s3Params).promise();
|
|
126
|
-
return result.Contents || [];
|
|
127
|
-
}
|
|
128
|
-
async createDirectory(path) {
|
|
129
|
-
// S3 doesn't have real directories, but we can create an empty object
|
|
130
|
-
await this.s3
|
|
131
|
-
.putObject({
|
|
132
|
-
Bucket: this.config.bucketName,
|
|
133
|
-
Key: path.endsWith('/') ? path : path + '/',
|
|
134
|
-
Body: ''
|
|
135
|
-
})
|
|
136
|
-
.promise();
|
|
137
|
-
}
|
|
138
|
-
async deleteDirectory(path) {
|
|
139
|
-
// List all objects with the prefix and delete them
|
|
140
|
-
const objects = await this.s3
|
|
141
|
-
.listObjects({
|
|
142
|
-
Bucket: this.config.bucketName,
|
|
143
|
-
Prefix: path
|
|
144
|
-
})
|
|
145
|
-
.promise();
|
|
146
|
-
if (objects.Contents && objects.Contents.length > 0) {
|
|
147
|
-
const deleteParams = {
|
|
148
|
-
Bucket: this.config.bucketName,
|
|
149
|
-
Delete: {
|
|
150
|
-
Objects: objects.Contents.map(obj => ({ Key: obj.Key }))
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
await this.s3.deleteObjects(deleteParams).promise();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
async fileExists(path) {
|
|
157
|
-
try {
|
|
158
|
-
await this.s3
|
|
159
|
-
.headObject({
|
|
160
|
-
Bucket: this.config.bucketName,
|
|
161
|
-
Key: path
|
|
162
|
-
})
|
|
163
|
-
.promise();
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
catch (error) {
|
|
167
|
-
return false;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
async getFileSize(path) {
|
|
171
|
-
const result = await this.s3
|
|
172
|
-
.headObject({
|
|
173
|
-
Bucket: this.config.bucketName,
|
|
174
|
-
Key: path
|
|
175
|
-
})
|
|
176
|
-
.promise();
|
|
177
|
-
return result.ContentLength || 0;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
exports.S3StorageProvider = S3StorageProvider;
|
|
181
|
-
//# sourceMappingURL=s3-storage.provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"s3-storage.provider.js","sourceRoot":"","sources":["../../../server/storage/providers/s3-storage.provider.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,+BAAmC;AAEnC,6CAA4C;AAE5C,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEzC,MAAa,iBAAiB;IAK5B,YAAY,MAAqB;QAFzB,cAAS,GAAY,KAAK,CAAA;QAGhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,EAAE,GAAG,IAAI,iBAAG,CAAC,EAAE,CAAC;YACnB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI;YACF,6EAA6E;YAC7E,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;YACrB,YAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA;SACzC;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;YACtB,MAAM,IAAI,KAAK,CAAC,mCAAmC,KAAK,EAAE,CAAC,CAAA;SAC5D;IACH,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI,CAAC,SAA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AAM,CAAC,UAAW;YAC/B,GAAG,EAAE,IAAI;SACV,CAAC;aACD,OAAO,EAAE,CAAA;QAEZ,OAAO,MAAM,CAAC,aAAa,IAAI,CAAC,CAAA;IAClC,CAAC;CACF;AA9MD,8CA8MC"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SftpStorageProvider = void 0;
|
|
7
|
-
const ssh2_sftp_client_1 = __importDefault(require("ssh2-sftp-client"));
|
|
8
|
-
const env_1 = require("@things-factory/env");
|
|
9
|
-
class SftpStorageProvider {
|
|
10
|
-
constructor(config) {
|
|
11
|
-
this.connected = false;
|
|
12
|
-
this.config = config;
|
|
13
|
-
this.sftp = new ssh2_sftp_client_1.default();
|
|
14
|
-
}
|
|
15
|
-
async connect() {
|
|
16
|
-
try {
|
|
17
|
-
const connectionConfig = {
|
|
18
|
-
host: this.config.host,
|
|
19
|
-
port: this.config.port || 22,
|
|
20
|
-
username: this.config.username,
|
|
21
|
-
password: this.config.password,
|
|
22
|
-
privateKey: this.config.privateKey,
|
|
23
|
-
readyTimeout: this.config.timeout || 20000,
|
|
24
|
-
retries: this.config.retries || 3
|
|
25
|
-
};
|
|
26
|
-
await this.sftp.connect(connectionConfig);
|
|
27
|
-
this.connected = true;
|
|
28
|
-
env_1.logger.info('SFTP Storage Provider connected successfully');
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
this.connected = false;
|
|
32
|
-
throw new Error(`Failed to connect to SFTP: ${error}`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
async disconnect() {
|
|
36
|
-
if (this.connected) {
|
|
37
|
-
await this.sftp.end();
|
|
38
|
-
this.connected = false;
|
|
39
|
-
env_1.logger.info('SFTP Storage Provider disconnected');
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
isConnected() {
|
|
43
|
-
return this.connected;
|
|
44
|
-
}
|
|
45
|
-
async readFile(path, encoding) {
|
|
46
|
-
const fullPath = this.getFullPath(path);
|
|
47
|
-
const buffer = await this.sftp.get(fullPath);
|
|
48
|
-
if (encoding) {
|
|
49
|
-
return buffer.toString(encoding);
|
|
50
|
-
}
|
|
51
|
-
return buffer;
|
|
52
|
-
}
|
|
53
|
-
async writeFile(path, content, encoding) {
|
|
54
|
-
const fullPath = this.getFullPath(path);
|
|
55
|
-
const buffer = Buffer.from(content);
|
|
56
|
-
await this.sftp.put(buffer, fullPath);
|
|
57
|
-
}
|
|
58
|
-
async uploadFile(params) {
|
|
59
|
-
const fullPath = this.getFullPath(`${params.uploadPath}/${params.filename}`);
|
|
60
|
-
let size = 0;
|
|
61
|
-
return new Promise((resolve, reject) => {
|
|
62
|
-
const uploadStream = this.sftp.createWriteStream(fullPath);
|
|
63
|
-
// Safety timeout to avoid hanging indefinitely
|
|
64
|
-
const timeoutMs = this.config.timeout || 30000;
|
|
65
|
-
const timer = setTimeout(() => {
|
|
66
|
-
reject(new Error(`SFTP upload timed out for ${fullPath}`));
|
|
67
|
-
}, timeoutMs);
|
|
68
|
-
const onResolve = () => {
|
|
69
|
-
clearTimeout(timer);
|
|
70
|
-
resolve({ id: Date.now().toString(), path: params.uploadPath, size });
|
|
71
|
-
};
|
|
72
|
-
uploadStream.on('error', (error) => {
|
|
73
|
-
clearTimeout(timer);
|
|
74
|
-
reject(error);
|
|
75
|
-
});
|
|
76
|
-
uploadStream.on('close', onResolve);
|
|
77
|
-
uploadStream.on('finish', onResolve);
|
|
78
|
-
params.stream
|
|
79
|
-
.on('error', (error) => {
|
|
80
|
-
clearTimeout(timer);
|
|
81
|
-
reject(error);
|
|
82
|
-
})
|
|
83
|
-
.on('data', (chunk) => (size += chunk.length))
|
|
84
|
-
.pipe(uploadStream);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
async deleteFile(path) {
|
|
88
|
-
const fullPath = this.getFullPath(path);
|
|
89
|
-
await this.sftp.delete(fullPath);
|
|
90
|
-
}
|
|
91
|
-
async moveFile(params) {
|
|
92
|
-
const sourcePath = this.getFullPath(params.source);
|
|
93
|
-
const destPath = this.getFullPath(params.destination);
|
|
94
|
-
await this.sftp.rename(sourcePath, destPath);
|
|
95
|
-
}
|
|
96
|
-
async readFolders(params) {
|
|
97
|
-
const fullPath = this.getFullPath(params.path);
|
|
98
|
-
const list = await this.sftp.list(fullPath);
|
|
99
|
-
return list.filter(item => item.type === '-'); // Only files, not directories
|
|
100
|
-
}
|
|
101
|
-
async createDirectory(path) {
|
|
102
|
-
const fullPath = this.getFullPath(path);
|
|
103
|
-
await this.sftp.mkdir(fullPath, true); // true for recursive
|
|
104
|
-
}
|
|
105
|
-
async deleteDirectory(path) {
|
|
106
|
-
const fullPath = this.getFullPath(path);
|
|
107
|
-
await this.sftp.rmdir(fullPath, true); // true for recursive
|
|
108
|
-
}
|
|
109
|
-
async fileExists(path) {
|
|
110
|
-
try {
|
|
111
|
-
const fullPath = this.getFullPath(path);
|
|
112
|
-
await this.sftp.stat(fullPath);
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
async getFileSize(path) {
|
|
120
|
-
const fullPath = this.getFullPath(path);
|
|
121
|
-
const stats = await this.sftp.stat(fullPath);
|
|
122
|
-
return stats.size;
|
|
123
|
-
}
|
|
124
|
-
getFullPath(path) {
|
|
125
|
-
if (this.config.basePath) {
|
|
126
|
-
const base = this.config.basePath.startsWith('/') ? this.config.basePath : `/${this.config.basePath}`;
|
|
127
|
-
return `${base}/${path}`.replace(/\/+/g, '/');
|
|
128
|
-
}
|
|
129
|
-
return path.startsWith('/') ? path : `/${path}`;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
exports.SftpStorageProvider = SftpStorageProvider;
|
|
133
|
-
//# sourceMappingURL=sftp-storage.provider.js.map
|