@prismatic-io/components-sftp 0.0.0-stage → 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.
@@ -0,0 +1,393 @@
1
+ //#region src/types/index.d.ts
2
+ interface FileEntry {
3
+ path: string;
4
+ size: number;
5
+ modifiedAt: number;
6
+ }
7
+ //#endregion
8
+ //#region npm-dist/.entry.d.ts
9
+ declare const _default: import("@prismatic-io/spectral").CallableComponent<{
10
+ key: "sftp";
11
+ documentationUrl: "https://prismatic.io/docs/components/sftp/";
12
+ public: true;
13
+ display: {
14
+ label: string;
15
+ description: string;
16
+ iconPath: string;
17
+ category: "Data Platforms";
18
+ };
19
+ actions: {
20
+ createDirectory: import("@prismatic-io/spectral").ActionDefinition<{
21
+ connection: {
22
+ label: string;
23
+ type: "connection";
24
+ required: true;
25
+ comments: string;
26
+ };
27
+ path: {
28
+ label: string;
29
+ placeholder: string;
30
+ type: "string";
31
+ required: true;
32
+ comments: string;
33
+ example: string;
34
+ clean: (value: unknown, defaultValue?: string) => string;
35
+ };
36
+ recursive: {
37
+ label: string;
38
+ comments: string;
39
+ type: "boolean";
40
+ required: false;
41
+ default: string;
42
+ clean: (value: unknown, defaultValue?: boolean) => boolean;
43
+ };
44
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
45
+ data: string;
46
+ }>;
47
+ listDirectory: import("@prismatic-io/spectral").ActionDefinition<{
48
+ connection: {
49
+ label: string;
50
+ type: "connection";
51
+ required: true;
52
+ comments: string;
53
+ };
54
+ path: {
55
+ label: string;
56
+ placeholder: string;
57
+ type: "string";
58
+ required: true;
59
+ comments: string;
60
+ example: string;
61
+ clean: (value: unknown, defaultValue?: string) => string;
62
+ };
63
+ pattern: {
64
+ label: string;
65
+ default: string;
66
+ placeholder: string;
67
+ type: "string";
68
+ required: false;
69
+ comments: string;
70
+ example: string;
71
+ clean: (value: unknown, defaultValue?: string) => string;
72
+ };
73
+ includeSubdirectories: {
74
+ label: string;
75
+ default: string;
76
+ type: "boolean";
77
+ required: false;
78
+ comments: string;
79
+ clean: (value: unknown, defaultValue?: boolean) => boolean;
80
+ };
81
+ includeDirectories: {
82
+ label: string;
83
+ default: string;
84
+ type: "boolean";
85
+ required: false;
86
+ comments: string;
87
+ clean: (value: unknown, defaultValue?: boolean) => boolean;
88
+ };
89
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
90
+ data: string[];
91
+ }>;
92
+ readFile: import("@prismatic-io/spectral").ActionDefinition<{
93
+ connection: {
94
+ label: string;
95
+ type: "connection";
96
+ required: true;
97
+ comments: string;
98
+ };
99
+ inputPath: {
100
+ label: string;
101
+ placeholder: string;
102
+ type: "string";
103
+ required: true;
104
+ comments: string;
105
+ example: string;
106
+ clean: (value: unknown, defaultValue?: string) => string;
107
+ };
108
+ returnBuffer: {
109
+ label: string;
110
+ type: "boolean";
111
+ required: true;
112
+ default: string;
113
+ comments: string;
114
+ clean: (value: unknown, defaultValue?: boolean) => boolean;
115
+ };
116
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
117
+ data: string | NodeJS.WritableStream | Buffer<ArrayBufferLike>;
118
+ contentType: string;
119
+ }>;
120
+ fastGet: import("@prismatic-io/spectral").ActionDefinition<{
121
+ connection: {
122
+ label: string;
123
+ type: "connection";
124
+ required: true;
125
+ comments: string;
126
+ };
127
+ inputPath: {
128
+ label: string;
129
+ placeholder: string;
130
+ type: "string";
131
+ required: true;
132
+ comments: string;
133
+ example: string;
134
+ clean: (value: unknown, defaultValue?: string) => string;
135
+ };
136
+ returnBuffer: {
137
+ label: string;
138
+ type: "boolean";
139
+ required: true;
140
+ default: string;
141
+ comments: string;
142
+ clean: (value: unknown, defaultValue?: boolean) => boolean;
143
+ };
144
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
145
+ data: NonSharedBuffer;
146
+ contentType: string;
147
+ }>;
148
+ statFile: import("@prismatic-io/spectral").ActionDefinition<{
149
+ connection: {
150
+ label: string;
151
+ type: "connection";
152
+ required: true;
153
+ comments: string;
154
+ };
155
+ inputPath: {
156
+ label: string;
157
+ placeholder: string;
158
+ type: "string";
159
+ required: true;
160
+ comments: string;
161
+ example: string;
162
+ clean: (value: unknown, defaultValue?: string) => string;
163
+ };
164
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
165
+ data: import("ssh2-sftp-client").FileStats;
166
+ }>;
167
+ writeFile: import("@prismatic-io/spectral").ActionDefinition<{
168
+ connection: {
169
+ label: string;
170
+ type: "connection";
171
+ required: true;
172
+ comments: string;
173
+ };
174
+ outputPath: {
175
+ label: string;
176
+ placeholder: string;
177
+ type: "string";
178
+ required: true;
179
+ comments: string;
180
+ example: string;
181
+ clean: (value: unknown, defaultValue?: string) => string;
182
+ };
183
+ data: {
184
+ label: string;
185
+ placeholder: string;
186
+ type: "text";
187
+ required: true;
188
+ comments: string;
189
+ clean: (value: unknown) => Buffer<ArrayBufferLike>;
190
+ };
191
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
192
+ data: string;
193
+ }>;
194
+ appendFile: import("@prismatic-io/spectral").ActionDefinition<{
195
+ connection: {
196
+ label: string;
197
+ type: "connection";
198
+ required: true;
199
+ comments: string;
200
+ };
201
+ outputPath: {
202
+ placeholder: string;
203
+ comments: string;
204
+ example: string;
205
+ label: string;
206
+ type: "string";
207
+ required: true;
208
+ clean: (value: unknown, defaultValue?: string) => string;
209
+ };
210
+ data: {
211
+ placeholder: string;
212
+ comments: string;
213
+ label: string;
214
+ type: "text";
215
+ required: true;
216
+ clean: (value: unknown) => Buffer<ArrayBufferLike>;
217
+ };
218
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, {
219
+ data: string;
220
+ }>;
221
+ deleteFile: import("@prismatic-io/spectral").ActionDefinition<{
222
+ connection: {
223
+ label: string;
224
+ type: "connection";
225
+ required: true;
226
+ comments: string;
227
+ };
228
+ path: {
229
+ label: string;
230
+ placeholder: string;
231
+ type: "string";
232
+ required: true;
233
+ comments: string;
234
+ example: string;
235
+ clean: (value: unknown, defaultValue?: string) => string;
236
+ };
237
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, any>;
238
+ moveFile: import("@prismatic-io/spectral").ActionDefinition<{
239
+ connection: {
240
+ label: string;
241
+ type: "connection";
242
+ required: true;
243
+ comments: string;
244
+ };
245
+ sourcePath: {
246
+ label: string;
247
+ placeholder: string;
248
+ type: "string";
249
+ required: true;
250
+ comments: string;
251
+ example: string;
252
+ clean: (value: unknown, defaultValue?: string) => string;
253
+ };
254
+ destinationPath: {
255
+ label: string;
256
+ placeholder: string;
257
+ type: "string";
258
+ required: true;
259
+ comments: string;
260
+ example: string;
261
+ clean: (value: unknown, defaultValue?: string) => string;
262
+ };
263
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, boolean, any>;
264
+ };
265
+ triggers: {
266
+ newOrModifiedFiles: import("@prismatic-io/spectral").PollingTriggerDefinition<{
267
+ connection: {
268
+ label: string;
269
+ type: "connection";
270
+ required: true;
271
+ comments: string;
272
+ };
273
+ path: {
274
+ label: string;
275
+ placeholder: string;
276
+ type: "string";
277
+ required: true;
278
+ comments: string;
279
+ example: string;
280
+ clean: (value: unknown, defaultValue?: string) => string;
281
+ };
282
+ pattern: {
283
+ label: string;
284
+ default: string;
285
+ placeholder: string;
286
+ type: "string";
287
+ required: false;
288
+ comments: string;
289
+ example: string;
290
+ clean: (value: unknown, defaultValue?: string) => string;
291
+ };
292
+ includeSubdirectories: {
293
+ label: string;
294
+ default: string;
295
+ type: "boolean";
296
+ required: false;
297
+ comments: string;
298
+ clean: (value: unknown, defaultValue?: boolean) => boolean;
299
+ };
300
+ }, import("@prismatic-io/spectral").ConfigVarResultCollection, import("@prismatic-io/spectral").TriggerPayload<Record<string, unknown>>, boolean, {
301
+ payload: {
302
+ body: {
303
+ data: {
304
+ newFiles: FileEntry[];
305
+ modifiedFiles: FileEntry[];
306
+ };
307
+ };
308
+ headers: {
309
+ [key: string]: string;
310
+ };
311
+ queryParameters: {
312
+ [key: string]: string;
313
+ };
314
+ rawBody: {
315
+ data: unknown;
316
+ contentType?: string;
317
+ };
318
+ pathFragment: string;
319
+ webhookUrls: {
320
+ [key: string]: string;
321
+ };
322
+ webhookApiKeys: {
323
+ [key: string]: string[];
324
+ };
325
+ invokeUrl: string;
326
+ executionId: string;
327
+ customer: import("@prismatic-io/spectral").CustomerAttributes;
328
+ instance: import("@prismatic-io/spectral").InstanceAttributes;
329
+ user: import("@prismatic-io/spectral").UserAttributes;
330
+ integration: import("@prismatic-io/spectral").IntegrationAttributes;
331
+ flow: import("@prismatic-io/spectral").FlowAttributes;
332
+ startedAt: string;
333
+ globalDebug: boolean;
334
+ paginationState?: Record<string, unknown>;
335
+ };
336
+ polledNoChanges: boolean;
337
+ }, import("@prismatic-io/spectral").Inputs>;
338
+ };
339
+ connections: (import("@prismatic-io/spectral").KeyedConnection<{
340
+ key: "basic";
341
+ display: {
342
+ label: string;
343
+ description: string;
344
+ };
345
+ inputs: {
346
+ host: import("@prismatic-io/spectral").OnPremConnectionInput;
347
+ port: import("@prismatic-io/spectral").OnPremConnectionInput;
348
+ password: {
349
+ label: string;
350
+ comments: string;
351
+ placeholder: string;
352
+ type: "password";
353
+ required: true;
354
+ example: string;
355
+ };
356
+ };
357
+ }, "basic"> | import("@prismatic-io/spectral").KeyedConnection<{
358
+ key: "privateKey";
359
+ display: {
360
+ label: string;
361
+ description: string;
362
+ };
363
+ inputs: {
364
+ host: import("@prismatic-io/spectral").OnPremConnectionInput;
365
+ port: import("@prismatic-io/spectral").OnPremConnectionInput;
366
+ privateKey: {
367
+ label: string;
368
+ comments: string;
369
+ placeholder: string;
370
+ type: "text";
371
+ required: true;
372
+ example: string;
373
+ };
374
+ passphrase: {
375
+ label: string;
376
+ comments: string;
377
+ placeholder: string;
378
+ type: "password";
379
+ required: false;
380
+ example: string;
381
+ };
382
+ password: {
383
+ label: string;
384
+ comments: string;
385
+ placeholder: string;
386
+ type: "password";
387
+ required: false;
388
+ example: string;
389
+ };
390
+ };
391
+ }, "privateKey">)[];
392
+ }>;
393
+ export = _default;
package/package.json CHANGED
@@ -1,6 +1,59 @@
1
1
  {
2
2
  "name": "@prismatic-io/components-sftp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "main": "./npm-dist/index.cjs",
5
+ "types": "./npm-dist/index.d.cts",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./npm-dist/index.d.cts",
9
+ "default": "./npm-dist/index.cjs"
10
+ }
11
+ },
12
+ "description": "Read, write, move and delete files on an SFTP server",
13
+ "license": "Apache-2.0",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/prismatic-io/components.git",
17
+ "directory": "components/sftp"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "files": [
23
+ "npm-dist",
24
+ "dist"
25
+ ],
26
+ "prismatic": {
27
+ "component": "./dist/index.js"
28
+ },
29
+ "scripts": {
30
+ "build": "npm run format && npm run lint && tsdown",
31
+ "typecheck": "tsc --noEmit",
32
+ "generate:manifest": "npm run build && npx @prismatic-io/spectral component-manifest",
33
+ "generate:manifest:dev": "npm run build && npx @prismatic-io/spectral component-manifest --skip-signature-verify",
34
+ "lint": "biome lint .",
35
+ "format": "biome format --write . --indent-style=space",
36
+ "test": "vitest run",
37
+ "prepare": "npm run build",
38
+ "publish:platform": "npm run build && prism components:publish"
39
+ },
40
+ "peerDependencies": {
41
+ "@prismatic-io/spectral": "^10.39.1"
42
+ },
43
+ "dependencies": {
44
+ "mime-types": "2.1.35",
45
+ "minimatch": "^9.0.3",
46
+ "ssh2-sftp-client": "9.1.0"
47
+ },
48
+ "devDependencies": {
49
+ "@biomejs/biome": "2.6.5",
50
+ "@types/mime-types": "2.1.4",
51
+ "@types/node": "^26.6.4",
52
+ "@types/ssh2-sftp-client": "9.0.4",
53
+ "tsdown": "0.22.3",
54
+ "typescript": "6.0.3",
55
+ "vitest": "4.1.9",
56
+ "@prismatic-io/spectral": "^10.39.1",
57
+ "build-config": "file:../../packages/build-config"
58
+ }
59
+ }