@datafix/n8n-nodes-smb 0.1.0
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/README.md +46 -0
- package/dist/credentials/Smb.credentials.d.ts +11 -0
- package/dist/credentials/Smb.credentials.js +65 -0
- package/dist/credentials/Smb.credentials.js.map +1 -0
- package/dist/credentials/smb.dark.svg +12 -0
- package/dist/credentials/smb.svg +12 -0
- package/dist/nodes/Smb/GenericFunctions.d.ts +14 -0
- package/dist/nodes/Smb/GenericFunctions.js +107 -0
- package/dist/nodes/Smb/GenericFunctions.js.map +1 -0
- package/dist/nodes/Smb/Smb.node.d.ts +10 -0
- package/dist/nodes/Smb/Smb.node.js +251 -0
- package/dist/nodes/Smb/Smb.node.js.map +1 -0
- package/dist/nodes/Smb/Smb.node.json +18 -0
- package/dist/nodes/Smb/description/FileDescription.d.ts +3 -0
- package/dist/nodes/Smb/description/FileDescription.js +172 -0
- package/dist/nodes/Smb/description/FileDescription.js.map +1 -0
- package/dist/nodes/Smb/description/FolderDescription.d.ts +3 -0
- package/dist/nodes/Smb/description/FolderDescription.js +142 -0
- package/dist/nodes/Smb/description/FolderDescription.js.map +1 -0
- package/dist/nodes/Smb/smb.dark.svg +12 -0
- package/dist/nodes/Smb/smb.svg +12 -0
- package/dist/package.json +53 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +38 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# n8n-nodes-smb
|
|
2
|
+
|
|
3
|
+
This is an n8n community node. It lets you use _app/service name_ in your n8n workflows.
|
|
4
|
+
|
|
5
|
+
_App/service name_ is _one or two sentences describing the service this node integrates with_.
|
|
6
|
+
|
|
7
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
|
|
8
|
+
|
|
9
|
+
[Installation](#installation)
|
|
10
|
+
[Operations](#operations)
|
|
11
|
+
[Credentials](#credentials)
|
|
12
|
+
[Compatibility](#compatibility)
|
|
13
|
+
[Usage](#usage)
|
|
14
|
+
[Resources](#resources)
|
|
15
|
+
[Version history](#version-history)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
20
|
+
|
|
21
|
+
## Operations
|
|
22
|
+
|
|
23
|
+
_List the operations supported by your node._
|
|
24
|
+
|
|
25
|
+
## Credentials
|
|
26
|
+
|
|
27
|
+
_If users need to authenticate with the app/service, provide details here. You should include prerequisites (such as signing up with the service), available authentication methods, and how to set them up._
|
|
28
|
+
|
|
29
|
+
## Compatibility
|
|
30
|
+
|
|
31
|
+
_State the minimum n8n version, as well as which versions you test against. You can also include any known version incompatibility issues._
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
_This is an optional section. Use it to help users with any difficult or confusing aspects of the node._
|
|
36
|
+
|
|
37
|
+
_By the time users are looking for community nodes, they probably already know n8n basics. But if you expect new users, you can link to the [Try it out](https://docs.n8n.io/try-it-out/) documentation to help them get started._
|
|
38
|
+
|
|
39
|
+
## Resources
|
|
40
|
+
|
|
41
|
+
* [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
|
|
42
|
+
* _Link to app/service documentation._
|
|
43
|
+
|
|
44
|
+
## Version history
|
|
45
|
+
|
|
46
|
+
_This is another optional section. If your node has multiple versions, include a short description of available versions and what changed, as well as any compatibility impact._
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class Smb implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
icon: {
|
|
7
|
+
readonly light: "file:smb.svg";
|
|
8
|
+
readonly dark: "file:smb.dark.svg";
|
|
9
|
+
};
|
|
10
|
+
properties: INodeProperties[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Smb = void 0;
|
|
4
|
+
class Smb {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'smb';
|
|
7
|
+
this.displayName = 'SMB';
|
|
8
|
+
this.documentationUrl = 'https://github.com/joffcom/n8n-nodes-smb';
|
|
9
|
+
this.icon = { light: 'file:smb.svg', dark: 'file:smb.dark.svg' };
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Host',
|
|
13
|
+
name: 'host',
|
|
14
|
+
type: 'string',
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
placeholder: '192.168.1.100',
|
|
18
|
+
description: 'The hostname or IP address of the SMB server',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Port',
|
|
22
|
+
name: 'port',
|
|
23
|
+
type: 'number',
|
|
24
|
+
default: 445,
|
|
25
|
+
description: 'The port to connect to (default: 445)',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Domain',
|
|
29
|
+
name: 'domain',
|
|
30
|
+
type: 'string',
|
|
31
|
+
default: '',
|
|
32
|
+
placeholder: 'WORKGROUP',
|
|
33
|
+
description: 'The domain or workgroup name. Leave empty if not required.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Username',
|
|
37
|
+
name: 'username',
|
|
38
|
+
type: 'string',
|
|
39
|
+
default: '',
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Password',
|
|
44
|
+
name: 'password',
|
|
45
|
+
type: 'string',
|
|
46
|
+
typeOptions: {
|
|
47
|
+
password: true,
|
|
48
|
+
},
|
|
49
|
+
default: '',
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
displayName: 'Share',
|
|
54
|
+
name: 'share',
|
|
55
|
+
type: 'string',
|
|
56
|
+
default: '',
|
|
57
|
+
required: true,
|
|
58
|
+
placeholder: 'Data',
|
|
59
|
+
description: 'The name of the share to connect to',
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.Smb = Smb;
|
|
65
|
+
//# sourceMappingURL=Smb.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Smb.credentials.js","sourceRoot":"","sources":["../../credentials/Smb.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,GAAG;IAAhB;QACC,SAAI,GAAG,KAAK,CAAC;QACb,gBAAW,GAAG,KAAK,CAAC;QACpB,qBAAgB,GAAG,0CAA0C,CAAC;QAC9D,SAAI,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,mBAAmB,EAAW,CAAC;QACrE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,eAAe;gBAC5B,WAAW,EAAE,8CAA8C;aAC3D;YACD;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,GAAG;gBACZ,WAAW,EAAE,uCAAuC;aACpD;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,WAAW;gBACxB,WAAW,EAAE,4DAA4D;aACzE;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,MAAM;gBACnB,WAAW,EAAE,qCAAqC;aAClD;SACD,CAAC;IACH,CAAC;CAAA;AAzDD,kBAyDC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#7fdbff"
|
|
2
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
+
<!-- Folder -->
|
|
4
|
+
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>
|
|
5
|
+
<!-- Network nodes -->
|
|
6
|
+
<circle cx="8" cy="13" r="1.5" fill="#7fdbff"></circle>
|
|
7
|
+
<circle cx="12" cy="13" r="1.5" fill="#7fdbff"></circle>
|
|
8
|
+
<circle cx="16" cy="13" r="1.5" fill="#7fdbff"></circle>
|
|
9
|
+
<!-- Connection lines -->
|
|
10
|
+
<line x1="8" y1="13" x2="12" y2="13" stroke-width="1.5"></line>
|
|
11
|
+
<line x1="12" y1="13" x2="16" y2="13" stroke-width="1.5"></line>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#0066cc"
|
|
2
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
+
<!-- Folder -->
|
|
4
|
+
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>
|
|
5
|
+
<!-- Network nodes -->
|
|
6
|
+
<circle cx="8" cy="13" r="1.5" fill="#0066cc"></circle>
|
|
7
|
+
<circle cx="12" cy="13" r="1.5" fill="#0066cc"></circle>
|
|
8
|
+
<circle cx="16" cy="13" r="1.5" fill="#0066cc"></circle>
|
|
9
|
+
<!-- Connection lines -->
|
|
10
|
+
<line x1="8" y1="13" x2="12" y2="13" stroke-width="1.5"></line>
|
|
11
|
+
<line x1="12" y1="13" x2="16" y2="13" stroke-width="1.5"></line>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Client } from 'smb3-client';
|
|
2
|
+
export interface SmbCredentials {
|
|
3
|
+
host: string;
|
|
4
|
+
port?: number;
|
|
5
|
+
domain?: string;
|
|
6
|
+
username: string;
|
|
7
|
+
password: string;
|
|
8
|
+
share: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function buildSmbPath(share: string, filePath: string): string;
|
|
11
|
+
export declare function createSmbClient(credentials: SmbCredentials): Promise<Client>;
|
|
12
|
+
export declare function friendlySmbError(error: unknown, context: string): string;
|
|
13
|
+
export declare function ensureFolders(client: Client, share: string, filePath: string): Promise<void>;
|
|
14
|
+
export declare function closeSmbClient(client: Client): Promise<void>;
|
|
@@ -0,0 +1,107 @@
|
|
|
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.buildSmbPath = buildSmbPath;
|
|
7
|
+
exports.createSmbClient = createSmbClient;
|
|
8
|
+
exports.friendlySmbError = friendlySmbError;
|
|
9
|
+
exports.ensureFolders = ensureFolders;
|
|
10
|
+
exports.closeSmbClient = closeSmbClient;
|
|
11
|
+
const path_1 = __importDefault(require("path"));
|
|
12
|
+
const fs_1 = require("fs");
|
|
13
|
+
const module_1 = require("module");
|
|
14
|
+
const url_1 = require("url");
|
|
15
|
+
const nativeImport = new Function('specifier', 'return import(specifier)');
|
|
16
|
+
const _localRequire = (0, module_1.createRequire)(__filename);
|
|
17
|
+
const smb3ClientUrl = (() => {
|
|
18
|
+
var _a;
|
|
19
|
+
const searchPaths = (_a = _localRequire.resolve.paths('smb3-client')) !== null && _a !== void 0 ? _a : [];
|
|
20
|
+
for (const dir of searchPaths) {
|
|
21
|
+
const candidate = path_1.default.join(dir, 'smb3-client', 'dist', 'index.js');
|
|
22
|
+
if ((0, fs_1.existsSync)(candidate)) {
|
|
23
|
+
return (0, url_1.pathToFileURL)(candidate).href;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
throw new Error('smb3-client not found in node_modules — is it installed?');
|
|
27
|
+
})();
|
|
28
|
+
function buildSmbPath(share, filePath) {
|
|
29
|
+
const cleanPath = filePath.replace(/^\/+/, '').replace(/\/+$/, '');
|
|
30
|
+
return cleanPath ? `${share}/${cleanPath}` : share;
|
|
31
|
+
}
|
|
32
|
+
async function createSmbClient(credentials) {
|
|
33
|
+
var _a;
|
|
34
|
+
const { Client: SmbClient } = await nativeImport(smb3ClientUrl);
|
|
35
|
+
return new SmbClient({
|
|
36
|
+
host: credentials.host,
|
|
37
|
+
port: (_a = credentials.port) !== null && _a !== void 0 ? _a : 445,
|
|
38
|
+
domain: credentials.domain || undefined,
|
|
39
|
+
username: credentials.username,
|
|
40
|
+
password: credentials.password,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const NT_STATUS_MESSAGES = {
|
|
44
|
+
0xc0000016: 'Authentication handshake failed — the server did not respond as expected',
|
|
45
|
+
0xc0000022: 'Access denied — check your username, password, and share permissions',
|
|
46
|
+
0xc000006d: 'Logon failure — incorrect username or password',
|
|
47
|
+
0xc0000071: 'Logon failure — password has expired',
|
|
48
|
+
0xc0000072: 'Logon failure — account is disabled',
|
|
49
|
+
0xc000006e: 'Logon failure — account restriction prevents login',
|
|
50
|
+
0xc0000061: 'Privilege not held — the account lacks the required permissions',
|
|
51
|
+
0xc0000034: 'File or folder not found',
|
|
52
|
+
0xc000000f: 'File or folder not found',
|
|
53
|
+
0xc000003a: 'Path not found — one or more directories in the path do not exist',
|
|
54
|
+
0xc0000035: 'File or folder already exists',
|
|
55
|
+
0xc0000043: 'File is in use by another process',
|
|
56
|
+
0xc0000054: 'File is locked by another process',
|
|
57
|
+
0xc0000056: 'File is pending deletion',
|
|
58
|
+
0xc00000ba: 'Expected a file but found a directory at that path',
|
|
59
|
+
0xc0000103: 'Expected a directory but found a file at that path',
|
|
60
|
+
0xc0000101: 'Directory is not empty',
|
|
61
|
+
0xc000007f: 'Disk full — not enough space on the SMB share',
|
|
62
|
+
0xc0000008: 'Invalid handle — the file or directory may have been closed unexpectedly',
|
|
63
|
+
0xc000000d: 'Invalid parameter — the path or request is malformed',
|
|
64
|
+
0xc0000033: 'Invalid path — directory listing is not supported for this path on this server',
|
|
65
|
+
0xc00000c9: 'Network share was deleted while the connection was open',
|
|
66
|
+
0xc00000cc: 'Share not found — the share name does not exist on the server',
|
|
67
|
+
0xc0000203: 'Session expired — the SMB session was deleted by the server',
|
|
68
|
+
0xc000035c: 'Session expired — the network session has timed out',
|
|
69
|
+
0xc0000120: 'Operation cancelled',
|
|
70
|
+
};
|
|
71
|
+
function friendlySmbError(error, context) {
|
|
72
|
+
var _a;
|
|
73
|
+
const err = error;
|
|
74
|
+
const raw = (_a = err === null || err === void 0 ? void 0 : err.message) !== null && _a !== void 0 ? _a : String(error);
|
|
75
|
+
if (typeof (err === null || err === void 0 ? void 0 : err.status) === 'number' && err.status !== 0) {
|
|
76
|
+
const hex = `0x${err.status.toString(16).toUpperCase().padStart(8, '0')}`;
|
|
77
|
+
const friendly = NT_STATUS_MESSAGES[err.status];
|
|
78
|
+
if (friendly) {
|
|
79
|
+
return `${context}: ${friendly} (${hex})`;
|
|
80
|
+
}
|
|
81
|
+
return `${context}: ${raw} (${hex})`;
|
|
82
|
+
}
|
|
83
|
+
return `${context}: ${raw}`;
|
|
84
|
+
}
|
|
85
|
+
async function ensureFolders(client, share, filePath) {
|
|
86
|
+
const segments = filePath.replace(/^\/+/, '').split('/');
|
|
87
|
+
segments.pop();
|
|
88
|
+
for (let i = 0; i < segments.length; i++) {
|
|
89
|
+
const dirPath = segments.slice(0, i + 1).join('/');
|
|
90
|
+
try {
|
|
91
|
+
await client.mkdir(buildSmbPath(share, dirPath));
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
if (error.status === 0xc0000035)
|
|
95
|
+
continue;
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async function closeSmbClient(client) {
|
|
101
|
+
try {
|
|
102
|
+
await client.close();
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=GenericFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/Smb/GenericFunctions.ts"],"names":[],"mappings":";;;;;AA2CA,oCAGC;AAKD,0CASC;AAwCD,4CAeC;AAOD,sCAoBC;AAKD,wCAMC;AAzJD,gDAAwB;AACxB,2BAAgC;AAChC,mCAAuC;AACvC,6BAAoC;AAgBpC,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAEjD,CAAC;AAGzB,MAAM,aAAa,GAAG,IAAA,sBAAa,EAAC,UAAU,CAAC,CAAC;AAGhD,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;;IAC3B,MAAM,WAAW,GAAG,MAAA,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,mCAAI,EAAE,CAAC;IACrE,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QA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CAAC;IAED,OAAO,GAAG,OAAO,KAAK,GAAG,EAAE,CAAC;AAC7B,CAAC;AAOM,KAAK,UAAU,aAAa,CAClC,MAAc,EACd,KAAa,EACb,QAAgB;IAEhB,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzD,QAAQ,CAAC,GAAG,EAAE,CAAC;IAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,IAAI,CAAC;YACJ,MAAM,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;QAClD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAEhB,IAAK,KAA6B,CAAC,MAAM,KAAK,UAAU;gBAAE,SAAS;YAGnE,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;AACF,CAAC;AAKM,KAAK,UAAU,cAAc,CAAC,MAAc;IAClD,IAAI,CAAC;QACJ,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAAC,MAAM,CAAC;IAET,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ICredentialTestFunctions, ICredentialsDecrypted, IExecuteFunctions, INodeCredentialTestResult, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class Smb implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
credentialTest: {
|
|
6
|
+
testSmbCredentials(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Smb = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const FileDescription_1 = require("./description/FileDescription");
|
|
6
|
+
const FolderDescription_1 = require("./description/FolderDescription");
|
|
7
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
8
|
+
class Smb {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.description = {
|
|
11
|
+
displayName: 'SMB',
|
|
12
|
+
name: 'smb',
|
|
13
|
+
icon: { light: 'file:smb.svg', dark: 'file:smb.dark.svg' },
|
|
14
|
+
group: ['transform'],
|
|
15
|
+
version: [1],
|
|
16
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
17
|
+
description: 'Perform CRUD operations on SMB/Samba file shares',
|
|
18
|
+
defaults: {
|
|
19
|
+
name: 'SMB',
|
|
20
|
+
},
|
|
21
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
22
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
23
|
+
credentials: [
|
|
24
|
+
{
|
|
25
|
+
name: 'smb',
|
|
26
|
+
required: true,
|
|
27
|
+
testedBy: 'testSmbCredentials',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
usableAsTool: true,
|
|
31
|
+
properties: [
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Resource',
|
|
34
|
+
name: 'resource',
|
|
35
|
+
type: 'options',
|
|
36
|
+
noDataExpression: true,
|
|
37
|
+
options: [
|
|
38
|
+
{
|
|
39
|
+
name: 'File',
|
|
40
|
+
value: 'file',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Folder',
|
|
44
|
+
value: 'folder',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
default: 'file',
|
|
48
|
+
},
|
|
49
|
+
...FileDescription_1.fileOperations,
|
|
50
|
+
...FileDescription_1.fileFields,
|
|
51
|
+
...FolderDescription_1.folderOperations,
|
|
52
|
+
...FolderDescription_1.folderFields,
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
this.methods = {
|
|
56
|
+
credentialTest: {
|
|
57
|
+
async testSmbCredentials(credential) {
|
|
58
|
+
const credentials = credential.data;
|
|
59
|
+
const client = await (0, GenericFunctions_1.createSmbClient)(credentials);
|
|
60
|
+
try {
|
|
61
|
+
await client.connect();
|
|
62
|
+
return { status: 'OK', message: 'Connection successful' };
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
return { status: 'Error', message: (0, GenericFunctions_1.friendlySmbError)(error, 'Connection failed') };
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
await (0, GenericFunctions_1.closeSmbClient)(client);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
async execute() {
|
|
75
|
+
var _a;
|
|
76
|
+
const items = this.getInputData();
|
|
77
|
+
const returnData = [];
|
|
78
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
79
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
80
|
+
const credentials = (await this.getCredentials('smb'));
|
|
81
|
+
const client = await (0, GenericFunctions_1.createSmbClient)(credentials);
|
|
82
|
+
try {
|
|
83
|
+
await client.connect();
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), (0, GenericFunctions_1.friendlySmbError)(error, 'Failed to connect to SMB share'));
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
for (let i = 0; i < items.length; i++) {
|
|
90
|
+
try {
|
|
91
|
+
if (resource === 'file') {
|
|
92
|
+
if (operation === 'upload') {
|
|
93
|
+
const filePath = this.getNodeParameter('filePath', i);
|
|
94
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
|
95
|
+
const options = this.getNodeParameter('options', i, {});
|
|
96
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
|
97
|
+
const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
|
98
|
+
if (options.createMissingFolders) {
|
|
99
|
+
await (0, GenericFunctions_1.ensureFolders)(client, credentials.share, filePath);
|
|
100
|
+
}
|
|
101
|
+
const smbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, filePath);
|
|
102
|
+
await client.writeFile(smbPath, buffer);
|
|
103
|
+
returnData.push({
|
|
104
|
+
json: {
|
|
105
|
+
success: true,
|
|
106
|
+
path: filePath,
|
|
107
|
+
size: buffer.length,
|
|
108
|
+
fileName: binaryData.fileName || 'unknown',
|
|
109
|
+
},
|
|
110
|
+
pairedItem: { item: i },
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else if (operation === 'download') {
|
|
114
|
+
const filePath = this.getNodeParameter('filePath', i);
|
|
115
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
|
116
|
+
const smbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, filePath);
|
|
117
|
+
const fileBuffer = await client.readFile(smbPath);
|
|
118
|
+
const fileName = filePath.split('/').pop() || 'downloaded_file';
|
|
119
|
+
const binaryData = await this.helpers.prepareBinaryData(fileBuffer, fileName);
|
|
120
|
+
returnData.push({
|
|
121
|
+
json: {
|
|
122
|
+
success: true,
|
|
123
|
+
path: filePath,
|
|
124
|
+
size: fileBuffer.length,
|
|
125
|
+
},
|
|
126
|
+
binary: {
|
|
127
|
+
[binaryPropertyName]: binaryData,
|
|
128
|
+
},
|
|
129
|
+
pairedItem: { item: i },
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else if (operation === 'delete') {
|
|
133
|
+
const filePath = this.getNodeParameter('filePath', i);
|
|
134
|
+
const smbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, filePath);
|
|
135
|
+
await client.rm(smbPath);
|
|
136
|
+
returnData.push({
|
|
137
|
+
json: {
|
|
138
|
+
success: true,
|
|
139
|
+
path: filePath,
|
|
140
|
+
deleted: true,
|
|
141
|
+
},
|
|
142
|
+
pairedItem: { item: i },
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
else if (operation === 'rename') {
|
|
146
|
+
const filePath = this.getNodeParameter('filePath', i);
|
|
147
|
+
const newFilePath = this.getNodeParameter('newFilePath', i);
|
|
148
|
+
const smbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, filePath);
|
|
149
|
+
const newSmbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, newFilePath);
|
|
150
|
+
await client.rename(smbPath, newSmbPath);
|
|
151
|
+
returnData.push({
|
|
152
|
+
json: {
|
|
153
|
+
success: true,
|
|
154
|
+
oldPath: filePath,
|
|
155
|
+
newPath: newFilePath,
|
|
156
|
+
},
|
|
157
|
+
pairedItem: { item: i },
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else if (resource === 'folder') {
|
|
162
|
+
if (operation === 'create') {
|
|
163
|
+
const folderPath = this.getNodeParameter('folderPath', i);
|
|
164
|
+
const smbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, folderPath);
|
|
165
|
+
await client.mkdir(smbPath);
|
|
166
|
+
returnData.push({
|
|
167
|
+
json: {
|
|
168
|
+
success: true,
|
|
169
|
+
path: folderPath,
|
|
170
|
+
created: true,
|
|
171
|
+
},
|
|
172
|
+
pairedItem: { item: i },
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
else if (operation === 'delete') {
|
|
176
|
+
const folderPath = this.getNodeParameter('folderPath', i);
|
|
177
|
+
const smbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, folderPath);
|
|
178
|
+
await client.rmdir(smbPath);
|
|
179
|
+
returnData.push({
|
|
180
|
+
json: {
|
|
181
|
+
success: true,
|
|
182
|
+
path: folderPath,
|
|
183
|
+
deleted: true,
|
|
184
|
+
},
|
|
185
|
+
pairedItem: { item: i },
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
else if (operation === 'list') {
|
|
189
|
+
const folderPath = this.getNodeParameter('folderPath', i, '/');
|
|
190
|
+
const options = this.getNodeParameter('options', i, {});
|
|
191
|
+
const smbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, folderPath);
|
|
192
|
+
const entries = await client.readdir(smbPath, { withFileTypes: true });
|
|
193
|
+
let filteredEntries = entries;
|
|
194
|
+
if (options.filesOnly) {
|
|
195
|
+
filteredEntries = entries.filter((entry) => entry.isFile());
|
|
196
|
+
}
|
|
197
|
+
const items = filteredEntries.map((entry) => ({
|
|
198
|
+
name: entry.name,
|
|
199
|
+
type: entry.isDirectory() ? 'Directory' : 'File',
|
|
200
|
+
isDirectory: entry.isDirectory(),
|
|
201
|
+
}));
|
|
202
|
+
returnData.push({
|
|
203
|
+
json: {
|
|
204
|
+
path: folderPath,
|
|
205
|
+
items,
|
|
206
|
+
count: items.length,
|
|
207
|
+
},
|
|
208
|
+
pairedItem: { item: i },
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
else if (operation === 'rename') {
|
|
212
|
+
const folderPath = this.getNodeParameter('folderPath', i);
|
|
213
|
+
const newFolderPath = this.getNodeParameter('newFolderPath', i);
|
|
214
|
+
const smbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, folderPath);
|
|
215
|
+
const newSmbPath = (0, GenericFunctions_1.buildSmbPath)(credentials.share, newFolderPath);
|
|
216
|
+
await client.rename(smbPath, newSmbPath);
|
|
217
|
+
returnData.push({
|
|
218
|
+
json: {
|
|
219
|
+
success: true,
|
|
220
|
+
oldPath: folderPath,
|
|
221
|
+
newPath: newFolderPath,
|
|
222
|
+
},
|
|
223
|
+
pairedItem: { item: i },
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
if (this.continueOnFail()) {
|
|
230
|
+
returnData.push({
|
|
231
|
+
json: {
|
|
232
|
+
error: (0, GenericFunctions_1.friendlySmbError)(error, `${resource} ${operation} failed`),
|
|
233
|
+
success: false,
|
|
234
|
+
},
|
|
235
|
+
pairedItem: { item: i },
|
|
236
|
+
});
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
const smbErr = error;
|
|
240
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), { message: (_a = smbErr.message) !== null && _a !== void 0 ? _a : String(error), status: smbErr.status }, { itemIndex: i, message: (0, GenericFunctions_1.friendlySmbError)(error, `${resource} ${operation} failed`) });
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
finally {
|
|
245
|
+
await (0, GenericFunctions_1.closeSmbClient)(client);
|
|
246
|
+
}
|
|
247
|
+
return [returnData];
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
exports.Smb = Smb;
|
|
251
|
+
//# sourceMappingURL=Smb.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Smb.node.js","sourceRoot":"","sources":["../../../nodes/Smb/Smb.node.ts"],"names":[],"mappings":";;;AAUA,+CAAqF;AAErF,mEAA2E;AAC3E,uEAAiF;AACjF,yDAO4B;AAE5B,MAAa,GAAG;IAAhB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,mBAAmB,EAAE;YAC1D,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,CAAC;YACZ,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE;gBACT,IAAI,EAAE,KAAK;aACX;YACD,MAAM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SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,IAAA,mCAAgB,EAAC,KAAK,EAAE,GAAG,QAAQ,IAAI,SAAS,SAAS,CAAC,EAAE,CACrF,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;gBAAS,CAAC;YACV,MAAM,IAAA,iCAAc,EAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AA7QD,kBA6QC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-smb",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Development", "Developer Tools"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/org/repo?tab=readme-ov-file#credentials"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/org/repo?tab=readme-ov-file"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|