Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@chehsunliu/seeder-sftp
Advanced tools
The SFTP implementation for Seeder.js.
Install Seeder.js:
npm install -D @chehsunliu/seeder @chehsunliu/seeder-sftp
Use Docker Compose to serve an SFTP server:
services:
sftp:
image: atmoz/sftp:alpine
restart: always
ports:
- "127.0.0.1:2222:22"
command:
- "foo:bar:1000:1000:upload"
Configure the seeders in setup.ts
, which should be loaded in Jest setupFilesAfterEnv
or in Vitest setupFiles
:
import seederManager from "@chehsunliu/seeder";
import { SftpSeeder } from "@chehsunliu/seeder-sftp";
seederManager.configure([
new SftpSeeder({
connection: {
host: "127.0.0.1",
port: 2222,
username: "foo",
password: "bar",
},
localSrcDir: "sftp",
sftpDestDir: "/upload",
}),
]);
afterAll(async () => {
await seederManager.release();
});
Put some test data in data
:
mkdir -p data/sftp
echo "123" > data/sftp/a.txt
echo "abc" > data/sftp/b.txt
Invoke the seeders in tests:
import seederManager from "@chehsunliu/seeder";
beforeEach(async () => {
await seederManager.truncate();
await seederManager.seed(path.join(__dirname, "data"));
});
test("blah blah blah", () => {
// Data should be available in:
// - /upload/a.txt
// - /upload/b.txt
});
FAQs
The SFTP implementation for Seeder.js
The npm package @chehsunliu/seeder-sftp receives a total of 16 weekly downloads. As such, @chehsunliu/seeder-sftp popularity was classified as not popular.
We found that @chehsunliu/seeder-sftp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.