@activepieces/piece-sftp 0.5.0 → 0.5.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.
Files changed (35) hide show
  1. package/package.json +8 -26
  2. package/src/index.js +39 -268
  3. package/README.md +0 -7
  4. package/src/index.d.ts +0 -38
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/common.d.ts +0 -6
  7. package/src/lib/actions/common.js +0 -138
  8. package/src/lib/actions/common.js.map +0 -1
  9. package/src/lib/actions/create-file.d.ts +0 -14
  10. package/src/lib/actions/create-file.js +0 -90
  11. package/src/lib/actions/create-file.js.map +0 -1
  12. package/src/lib/actions/create-folder.d.ts +0 -14
  13. package/src/lib/actions/create-folder.js +0 -70
  14. package/src/lib/actions/create-folder.js.map +0 -1
  15. package/src/lib/actions/delete-file.d.ts +0 -13
  16. package/src/lib/actions/delete-file.js +0 -72
  17. package/src/lib/actions/delete-file.js.map +0 -1
  18. package/src/lib/actions/delete-folder.d.ts +0 -14
  19. package/src/lib/actions/delete-folder.js +0 -85
  20. package/src/lib/actions/delete-folder.js.map +0 -1
  21. package/src/lib/actions/list-files.d.ts +0 -13
  22. package/src/lib/actions/list-files.js +0 -93
  23. package/src/lib/actions/list-files.js.map +0 -1
  24. package/src/lib/actions/read-file.d.ts +0 -13
  25. package/src/lib/actions/read-file.js +0 -91
  26. package/src/lib/actions/read-file.js.map +0 -1
  27. package/src/lib/actions/rename-file-or-folder.d.ts +0 -15
  28. package/src/lib/actions/rename-file-or-folder.js +0 -87
  29. package/src/lib/actions/rename-file-or-folder.js.map +0 -1
  30. package/src/lib/actions/upload-file.d.ts +0 -14
  31. package/src/lib/actions/upload-file.js +0 -88
  32. package/src/lib/actions/upload-file.js.map +0 -1
  33. package/src/lib/triggers/new-modified-file.d.ts +0 -54
  34. package/src/lib/triggers/new-modified-file.js +0 -81
  35. package/src/lib/triggers/new-modified-file.js.map +0 -1
@@ -1,93 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listFolderContentsAction = void 0;
4
- const tslib_1 = require("tslib");
5
- const index_1 = require("../../index");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const basic_ftp_1 = require("basic-ftp");
8
- const __1 = require("../..");
9
- const common_1 = require("./common");
10
- function listSFTP(client, directoryPath) {
11
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
12
- const contents = yield client.list(directoryPath);
13
- yield client.end();
14
- return contents;
15
- });
16
- }
17
- function listFTP(client, directoryPath) {
18
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
- const contents = yield client.list(directoryPath);
20
- return contents.map(item => ({
21
- type: item.type === 1 ? 'd' : '-',
22
- name: item.name,
23
- size: item.size,
24
- modifyTime: item.modifiedAt,
25
- accessTime: item.modifiedAt, // FTP doesn't provide access time
26
- rights: {
27
- user: item.permissions || '',
28
- group: '',
29
- other: ''
30
- },
31
- owner: '',
32
- group: ''
33
- }));
34
- });
35
- }
36
- exports.listFolderContentsAction = (0, pieces_framework_1.createAction)({
37
- auth: index_1.sftpAuth,
38
- name: 'listFolderContents',
39
- displayName: 'List Folder Contents',
40
- description: 'Lists the contents of a given folder.',
41
- props: {
42
- directoryPath: pieces_framework_1.Property.ShortText({
43
- displayName: 'Directory Path',
44
- required: true,
45
- description: 'The path of the folder to list e.g. `./myfolder`',
46
- }),
47
- },
48
- run(context) {
49
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
50
- const client = yield (0, __1.getClient)(context.auth.props);
51
- const directoryPath = context.propsValue.directoryPath;
52
- const protocolBackwardCompatibility = yield (0, __1.getProtocolBackwardCompatibility)(context.auth.props.protocol);
53
- try {
54
- let contents;
55
- switch (protocolBackwardCompatibility) {
56
- case 'ftps':
57
- case 'ftp':
58
- contents = yield listFTP(client, directoryPath);
59
- break;
60
- default:
61
- case 'sftp':
62
- contents = yield listSFTP(client, directoryPath);
63
- break;
64
- }
65
- return {
66
- status: 'success',
67
- contents: contents,
68
- };
69
- }
70
- catch (err) {
71
- if (err instanceof basic_ftp_1.FTPError) {
72
- console.error((0, common_1.getSftpError)(err.code));
73
- return {
74
- status: 'error',
75
- content: null,
76
- error: (0, common_1.getSftpError)(err.code),
77
- };
78
- }
79
- else {
80
- return {
81
- status: 'error',
82
- content: null,
83
- error: err
84
- };
85
- }
86
- }
87
- finally {
88
- yield (0, index_1.endClient)(client, context.auth.props.protocol);
89
- }
90
- });
91
- },
92
- });
93
- //# sourceMappingURL=list-files.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-files.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sftp/src/lib/actions/list-files.ts"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAClD,qEAAwE;AAExE,yCAA0D;AAC1D,6BAAoE;AACpE,qCAAwC;AAGxC,SAAe,QAAQ,CAAC,MAAc,EAAE,aAAqB;;QAC3D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAClD,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC;QACnB,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AAED,SAAe,OAAO,CAAC,MAAiB,EAAE,aAAqB;;QAC7D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAClD,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;YACjC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,UAAU,EAAG,kCAAkC;YAChE,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,CAAC,WAAW,IAAI,EAAE;gBAC5B,KAAK,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KAAK,CAAC,IAAA,qBAAY,EAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;oBACtC,OAAO;wBACL,MAAM,EAAE,OAAO;wBACf,OAAO,EAAE,IAAI;wBACb,KAAK,EAAE,IAAA,qBAAY,EAAC,GAAG,CAAC,IAAI,CAAC;qBAC9B,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACN,OAAO;wBACL,MAAM,EAAE,OAAO;wBACf,OAAO,EAAE,IAAI;wBACb,KAAK,EAAE,GAAG;qBACX,CAAA;gBACH,CAAC;YACH,CAAC;oBAAS,CAAC;gBACT,MAAM,IAAA,iBAAS,EAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- export declare const readFileContent: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- protocol: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
3
- allow_unauthorized_certificates: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- allow_anonymous_login: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
- host: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
- port: import("@activepieces/pieces-framework").NumberProperty<true>;
7
- username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
- password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
9
- privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
10
- algorithm: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
11
- }>, {
12
- filePath: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
- }>;
@@ -1,91 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readFileContent = void 0;
4
- const tslib_1 = require("tslib");
5
- const index_1 = require("../../index");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const basic_ftp_1 = require("basic-ftp");
8
- const __1 = require("../..");
9
- const stream_1 = require("stream");
10
- const common_1 = require("./common");
11
- function readFTP(client, filePath) {
12
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
- const chunks = [];
14
- const writeStream = new stream_1.Writable({
15
- write(chunk, _encoding, callback) {
16
- chunks.push(chunk);
17
- callback();
18
- }
19
- });
20
- yield client.downloadTo(writeStream, filePath);
21
- return Buffer.concat(chunks);
22
- });
23
- }
24
- function readSFTP(client, filePath) {
25
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
26
- const fileContent = yield client.get(filePath);
27
- yield client.end();
28
- return fileContent;
29
- });
30
- }
31
- exports.readFileContent = (0, pieces_framework_1.createAction)({
32
- auth: index_1.sftpAuth,
33
- name: 'read_file_content',
34
- displayName: 'Read File Content',
35
- description: 'Read the content of a file.',
36
- props: {
37
- filePath: pieces_framework_1.Property.ShortText({
38
- displayName: 'File Path',
39
- required: true,
40
- }),
41
- },
42
- run(context) {
43
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
44
- var _a;
45
- const client = yield (0, __1.getClient)(context.auth.props);
46
- const filePath = context.propsValue['filePath'];
47
- const fileName = (_a = filePath.split('/').pop()) !== null && _a !== void 0 ? _a : filePath;
48
- const protocolBackwardCompatibility = yield (0, __1.getProtocolBackwardCompatibility)(context.auth.props.protocol);
49
- try {
50
- let fileContent;
51
- switch (protocolBackwardCompatibility) {
52
- case 'ftps':
53
- case 'ftp':
54
- fileContent = yield readFTP(client, filePath);
55
- break;
56
- default:
57
- case 'sftp':
58
- fileContent = yield readSFTP(client, filePath);
59
- break;
60
- }
61
- return {
62
- file: yield context.files.write({
63
- fileName: fileName,
64
- data: fileContent,
65
- }),
66
- };
67
- }
68
- catch (err) {
69
- if (err instanceof basic_ftp_1.FTPError) {
70
- console.error((0, common_1.getSftpError)(err.code));
71
- return {
72
- status: 'error',
73
- content: null,
74
- error: (0, common_1.getSftpError)(err.code),
75
- };
76
- }
77
- else {
78
- return {
79
- status: 'error',
80
- content: null,
81
- error: err
82
- };
83
- }
84
- }
85
- finally {
86
- yield (0, index_1.endClient)(client, context.auth.props.protocol);
87
- }
88
- });
89
- },
90
- });
91
- //# sourceMappingURL=read-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read-file.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sftp/src/lib/actions/read-file.ts"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAClD,qEAAwE;AAExE,yCAA0D;AAC1D,6BAAoE;AACpE,mCAAkC;AAClC,qCAAwC;AAExC,SAAe,OAAO,CAAC,MAAiB,EAAE,QAAgB;;QACxD,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,IAAI,iBAAQ,CAAC;YAC/B,KAAK,CAAC,KAAa,EAAE,SAAiB,EAAE,QAAoB;gBAC1D,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnB,QAAQ,EAAE,CAAC;YACb,CAAC;SACF,CAAC,CAAC;QACH,MAAM,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CAAA;AAED,SAAe,QAAQ,CAAC,MAAc,EAAE,QAAgB;;QACtD,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC;QACnB,OAAO,WAAqB,CAAC;IAC/B,CAAC;CAAA;AAEY,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,gBAAQ;IACd,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,QAAQ,E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qBAAM,CAAC;oBACN,OAAO;wBACL,MAAM,EAAE,OAAO;wBACf,OAAO,EAAE,IAAI;wBACb,KAAK,EAAE,GAAG;qBACX,CAAA;gBACH,CAAC;YACH,CAAC;oBAAS,CAAC;gBACT,MAAM,IAAA,iBAAS,EAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- export declare const renameFileOrFolderAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- protocol: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
3
- allow_unauthorized_certificates: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- allow_anonymous_login: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
- host: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
- port: import("@activepieces/pieces-framework").NumberProperty<true>;
7
- username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
- password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
9
- privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
10
- algorithm: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
11
- }>, {
12
- information: import("dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
13
- oldPath: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- newPath: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
- }>;
@@ -1,87 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.renameFileOrFolderAction = void 0;
4
- const tslib_1 = require("tslib");
5
- const index_1 = require("../../index");
6
- const pieces_framework_1 = require("@activepieces/pieces-framework");
7
- const basic_ftp_1 = require("basic-ftp");
8
- const __1 = require("../..");
9
- const shared_1 = require("@activepieces/shared");
10
- const common_1 = require("./common");
11
- function renameFTP(client, oldPath, newPath) {
12
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
- yield client.rename(oldPath, newPath);
14
- });
15
- }
16
- function renameSFTP(client, oldPath, newPath) {
17
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
- yield client.rename(oldPath, newPath);
19
- yield client.end();
20
- });
21
- }
22
- exports.renameFileOrFolderAction = (0, pieces_framework_1.createAction)({
23
- auth: index_1.sftpAuth,
24
- name: 'renameFileOrFolder',
25
- displayName: 'Rename File or Folder',
26
- description: 'Renames a file or folder at given path.',
27
- props: {
28
- information: pieces_framework_1.Property.MarkDown({
29
- value: 'Depending on the server you can also use this to move a file to another directory, as long as the directory exists.',
30
- variant: shared_1.MarkdownVariant.INFO,
31
- }),
32
- oldPath: pieces_framework_1.Property.ShortText({
33
- displayName: 'Old Path',
34
- required: true,
35
- description: 'The path of the file or folder to rename e.g. `./myfolder/test.mp3`',
36
- }),
37
- newPath: pieces_framework_1.Property.ShortText({
38
- displayName: 'New Path',
39
- required: true,
40
- description: 'The new path of the file or folder e.g. `./myfolder/new-name.mp3`',
41
- }),
42
- },
43
- run(context) {
44
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
45
- const client = yield (0, __1.getClient)(context.auth.props);
46
- const oldPath = context.propsValue.oldPath;
47
- const newPath = context.propsValue.newPath;
48
- const protocolBackwardCompatibility = yield (0, __1.getProtocolBackwardCompatibility)(context.auth.props.protocol);
49
- try {
50
- switch (protocolBackwardCompatibility) {
51
- case 'ftps':
52
- case 'ftp':
53
- yield renameFTP(client, oldPath, newPath);
54
- break;
55
- default:
56
- case 'sftp':
57
- yield renameSFTP(client, oldPath, newPath);
58
- break;
59
- }
60
- return {
61
- status: 'success',
62
- };
63
- }
64
- catch (err) {
65
- if (err instanceof basic_ftp_1.FTPError) {
66
- console.error((0, common_1.getSftpError)(err.code));
67
- return {
68
- status: 'error',
69
- content: null,
70
- error: (0, common_1.getSftpError)(err.code),
71
- };
72
- }
73
- else {
74
- return {
75
- status: 'error',
76
- content: null,
77
- error: err
78
- };
79
- }
80
- }
81
- finally {
82
- yield (0, index_1.endClient)(client, context.auth.props.protocol);
83
- }
84
- });
85
- },
86
- });
87
- //# sourceMappingURL=rename-file-or-folder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rename-file-or-folder.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sftp/src/lib/actions/rename-file-or-folder.ts"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAClD,qEAAwE;AAExE,yCAA0D;AAC1D,6BAAoE;AACpE,iDAAuD;AACvD,qCAAwC;AAExC,SAAe,SAAS,CAAC,MAAiB,EAAE,OAAe,EAAE,OAAe;;QAC1E,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;CAAA;AAED,SAAe,UAAU,CAAC,MAAc,EAAE,OAAe,EAAE,OAAe;;QACxE,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACtC,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC;IACrB,CAAC;CAAA;AAEY,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,gBAAQ;IACd,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,yCAAyC;IACtD,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,KAAK,EAAE,qHAAqH;YAC5H,OAAO,EAAE,wBAAe,CAAC,IAAI;SAC9B,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,qEAAqE;SACxE,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,mEAAmE;SACtE,CAAC;KAC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C,KAAK,CAAC,QAAQ,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- export declare const uploadFileAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- protocol: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
3
- allow_unauthorized_certificates: import("@activepieces/pieces-framework").CheckboxProperty<false>;
4
- allow_anonymous_login: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
- host: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
- port: import("@activepieces/pieces-framework").NumberProperty<true>;
7
- username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
- password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
9
- privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
10
- algorithm: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
11
- }>, {
12
- fileName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
- fileContent: import("@activepieces/pieces-framework").FileProperty<true>;
14
- }>;
@@ -1,88 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uploadFileAction = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const basic_ftp_1 = require("basic-ftp");
7
- const __1 = require("../..");
8
- const stream_1 = require("stream");
9
- const common_1 = require("./common");
10
- function uploadFileToFTP(client, fileName, fileContent) {
11
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
12
- const remoteDirectory = fileName.substring(0, fileName.lastIndexOf('/'));
13
- yield client.ensureDir(remoteDirectory);
14
- yield client.uploadFrom(stream_1.Readable.from(fileContent.data), fileName);
15
- });
16
- }
17
- function uploadFileToSFTP(client, fileName, fileContent) {
18
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
- const remotePathExists = yield client.exists(fileName);
20
- if (!remotePathExists) {
21
- const remoteDirectory = fileName.substring(0, fileName.lastIndexOf('/'));
22
- yield client.mkdir(remoteDirectory, true);
23
- }
24
- yield client.put(fileContent.data, fileName);
25
- yield client.end();
26
- });
27
- }
28
- exports.uploadFileAction = (0, pieces_framework_1.createAction)({
29
- auth: __1.sftpAuth,
30
- name: 'upload_file',
31
- displayName: 'Upload File',
32
- description: 'Upload a file to the given path.',
33
- props: {
34
- fileName: pieces_framework_1.Property.ShortText({
35
- displayName: 'File Path',
36
- required: true,
37
- description: 'The path on the sftp server to store the file. e.g. `./myfolder/test.mp3`',
38
- }),
39
- fileContent: pieces_framework_1.Property.File({
40
- displayName: 'File content',
41
- required: true,
42
- }),
43
- },
44
- run(context) {
45
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
46
- const client = yield (0, __1.getClient)(context.auth.props);
47
- const fileName = context.propsValue['fileName'];
48
- const fileContent = context.propsValue['fileContent'];
49
- const protocolBackwardCompatibility = yield (0, __1.getProtocolBackwardCompatibility)(context.auth.props.protocol);
50
- try {
51
- switch (protocolBackwardCompatibility) {
52
- case 'ftps':
53
- case 'ftp':
54
- yield uploadFileToFTP(client, fileName, fileContent);
55
- break;
56
- default:
57
- case 'sftp':
58
- yield uploadFileToSFTP(client, fileName, fileContent);
59
- break;
60
- }
61
- return {
62
- status: 'success',
63
- };
64
- }
65
- catch (err) {
66
- if (err instanceof basic_ftp_1.FTPError) {
67
- console.error((0, common_1.getSftpError)(err.code));
68
- return {
69
- status: 'error',
70
- content: null,
71
- error: (0, common_1.getSftpError)(err.code),
72
- };
73
- }
74
- else {
75
- return {
76
- status: 'error',
77
- content: null,
78
- error: err
79
- };
80
- }
81
- }
82
- finally {
83
- yield (0, __1.endClient)(client, context.auth.props.protocol);
84
- }
85
- });
86
- },
87
- });
88
- //# sourceMappingURL=upload-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"upload-file.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sftp/src/lib/actions/upload-file.ts"],"names":[],"mappings":";;;;A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,GAAG;qBACX,CAAA;gBACH,CAAC;YACH,CAAC;oBAAS,CAAC;gBACT,MAAM,IAAA,aAAS,EAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,54 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newOrModifiedFile: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- protocol: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
4
- allow_unauthorized_certificates: import("@activepieces/pieces-framework").CheckboxProperty<false>;
5
- allow_anonymous_login: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
- host: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- port: import("@activepieces/pieces-framework").NumberProperty<true>;
8
- username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
- password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
10
- privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
11
- algorithm: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
12
- }>, {
13
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- ignoreHiddenFiles: import("@activepieces/pieces-framework").CheckboxProperty<false>;
15
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
16
- protocol: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
17
- allow_unauthorized_certificates: import("@activepieces/pieces-framework").CheckboxProperty<false>;
18
- allow_anonymous_login: import("@activepieces/pieces-framework").CheckboxProperty<false>;
19
- host: import("@activepieces/pieces-framework").ShortTextProperty<true>;
20
- port: import("@activepieces/pieces-framework").NumberProperty<true>;
21
- username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
22
- password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
23
- privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
24
- algorithm: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
25
- }>, {
26
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
27
- ignoreHiddenFiles: import("@activepieces/pieces-framework").CheckboxProperty<false>;
28
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
29
- protocol: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
30
- allow_unauthorized_certificates: import("@activepieces/pieces-framework").CheckboxProperty<false>;
31
- allow_anonymous_login: import("@activepieces/pieces-framework").CheckboxProperty<false>;
32
- host: import("@activepieces/pieces-framework").ShortTextProperty<true>;
33
- port: import("@activepieces/pieces-framework").NumberProperty<true>;
34
- username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
35
- password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
36
- privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
37
- algorithm: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
38
- }>, {
39
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
40
- ignoreHiddenFiles: import("@activepieces/pieces-framework").CheckboxProperty<false>;
41
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
42
- protocol: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
43
- allow_unauthorized_certificates: import("@activepieces/pieces-framework").CheckboxProperty<false>;
44
- allow_anonymous_login: import("@activepieces/pieces-framework").CheckboxProperty<false>;
45
- host: import("@activepieces/pieces-framework").ShortTextProperty<true>;
46
- port: import("@activepieces/pieces-framework").NumberProperty<true>;
47
- username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
48
- password: import("@activepieces/pieces-framework").SecretTextProperty<false>;
49
- privateKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
50
- algorithm: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
51
- }>, {
52
- path: import("@activepieces/pieces-framework").ShortTextProperty<true>;
53
- ignoreHiddenFiles: import("@activepieces/pieces-framework").CheckboxProperty<false>;
54
- }>;
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newOrModifiedFile = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
9
- function getModifyTime(file, protocol) {
10
- return protocol === 'sftp' ?
11
- file.modifyTime :
12
- (0, dayjs_1.default)(file.modifiedAt).valueOf();
13
- }
14
- const polling = {
15
- strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
16
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, lastFetchEpochMS }) {
17
- let client = null;
18
- try {
19
- const protocolBackwardCompatibility = yield (0, __1.getProtocolBackwardCompatibility)(auth.props.protocol);
20
- client = yield (0, __1.getClient)(auth.props);
21
- const files = yield client.list(propsValue.path);
22
- const filteredFiles = files.filter(file => {
23
- const modTime = getModifyTime(file, protocolBackwardCompatibility);
24
- return (0, dayjs_1.default)(modTime).valueOf() > lastFetchEpochMS;
25
- });
26
- const finalFiles = propsValue.ignoreHiddenFiles ?
27
- filteredFiles.filter(file => !file.name.startsWith('.')) :
28
- filteredFiles;
29
- return finalFiles.map(file => {
30
- const modTime = getModifyTime(file, protocolBackwardCompatibility);
31
- return {
32
- data: Object.assign(Object.assign({}, file), { path: `${propsValue.path}/${file.name}` }),
33
- epochMilliSeconds: (0, dayjs_1.default)(modTime).valueOf(),
34
- };
35
- });
36
- }
37
- catch (err) {
38
- return [];
39
- }
40
- finally {
41
- if (client) {
42
- yield (0, __1.endClient)(client, auth.props.protocol);
43
- }
44
- }
45
- }),
46
- };
47
- exports.newOrModifiedFile = (0, pieces_framework_1.createTrigger)({
48
- auth: __1.sftpAuth,
49
- name: 'new_file',
50
- displayName: 'New File',
51
- description: 'Trigger when a new file is created or modified.',
52
- props: {
53
- path: pieces_framework_1.Property.ShortText({
54
- displayName: 'Path',
55
- description: 'The path to watch for new files',
56
- required: true,
57
- defaultValue: './',
58
- }),
59
- ignoreHiddenFiles: pieces_framework_1.Property.Checkbox({
60
- displayName: 'Ignore hidden files',
61
- description: 'Ignore hidden files',
62
- required: false,
63
- defaultValue: false,
64
- }),
65
- },
66
- type: pieces_framework_1.TriggerStrategy.POLLING,
67
- onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
68
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
69
- }),
70
- onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
71
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
72
- }),
73
- run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
74
- return yield pieces_common_1.pollingHelper.poll(polling, context);
75
- }),
76
- test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
77
- return yield pieces_common_1.pollingHelper.test(polling, context);
78
- }),
79
- sampleData: null,
80
- });
81
- //# sourceMappingURL=new-modified-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-modified-file.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sftp/src/lib/triggers/new-modified-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAmJ;AACnJ,+DAAqF;AACrF,6BAAyF;AACzF,0DAA0B;AAI1B,SAAS,aAAa,CAAC,IAAmC,EAAE,QAAgB;IAC1E,OAAO,QAAQ,KAAK,MAAM,CAAC,CAAC;QACzB,IAAwB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAA,eAAK,EAAE,IAAoB,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC;AACtD,CAAC;AAED,MAAM,OAAO,GAA+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