Skip to content

Commit

Permalink
chore: build
Browse files Browse the repository at this point in the history
  • Loading branch information
marcj committed Oct 10, 2023
1 parent 063da8f commit 386b66c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:
- "40000-40009:40000-40009"
storage-sftp:
image: atmoz/sftp:alpine
env:
SFTP_USERS: user:123:::upload
ports:
- "22:22"
options: user:123:::upload
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
5 changes: 1 addition & 4 deletions packages/storage-sftp/src/sftp-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Client, { ConnectOptions, FileInfo } from 'ssh2-sftp-client';
import { Readable } from 'stream';
import { asyncOperation } from '@deepkit/core';

export interface StorageFtpOptions {
export interface StorageFtpOptions extends ConnectOptions {
/**
* The root path where all files are stored. Optional, default is )" (standard working directory of FTP server_.
*/
Expand All @@ -28,8 +28,6 @@ export interface StorageFtpOptions {

password: string;

options?: ConnectOptions;

permissions: {
file: {
public: number; //default 0o644
Expand Down Expand Up @@ -78,7 +76,6 @@ export class StorageSftpAdapter implements StorageAdapter {

constructor(options: Partial<StorageFtpOptions> = {}) {
Object.assign(this.options, options);
if (options.options) Object.assign(this.options, options.options);
this.client = new Client();
this.client.on('end', (err) => {
this.closed = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/storage-sftp/tests/storage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ setAdapterFactory(async () => {
root: 'upload'
});;
if (platform() === 'darwin') {
// docker run -d --name storage-sftp -p 22:22 -d atmoz/sftp user:123:::upload
// docker run -d --name storage-sftp -p 22:22 -e SFTP_USERS=user:123:::upload -d atmoz/sftp:alpine
adapter = new StorageSftpAdapter({
host: 'storage-sftp.orb.local',
user: 'user',
Expand Down

0 comments on commit 386b66c

Please # to comment.