Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alexbainter/s3-sync

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alexbainter/s3-sync - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

lib/diff/diff.js

23

bin/s3-sync.js

@@ -143,2 +143,25 @@ #!/usr/bin/env node

)
.command(
'diff',
"Show files which aren't shared between the bucket and local directory",
{
bucket: {
descrption:
'The name of the bucket to download from (requires read access)',
type: 'string',
requiresArg: true,
nargs: 1,
demand: true,
},
directory: {
alias: 'dir',
descrption: 'The local directory to download files to',
type: 'string',
requiresArg: true,
nargs: 1,
demand: true,
default: 'dist',
},
}
)
.env('S3_SYNC')

@@ -145,0 +168,0 @@ .help()

4

lib/prune/prune-remote.js
'use strict';
const getFilenames = require('../shared/get-filenames');
const getDestinationFilename = require('../shared/get-destination-filename');
const getLocalDestinationFilename = require('../shared/get-local-destination-filename');

@@ -21,3 +21,3 @@ const MAX_OBJECT_COUNT_PER_REQUEST = 1000;

const deleteFilenames = remoteFilenames.filter((remoteFilename) => {
const destinationFilename = getDestinationFilename(
const destinationFilename = getLocalDestinationFilename(
remoteFilename,

@@ -24,0 +24,0 @@ distDir

@@ -5,3 +5,3 @@ 'use strict';

const getFilenames = require('../shared/get-filenames');
const getDestinationFilename = require('../shared/get-destination-filename');
const getLocalDestinationFilename = require('../shared/get-local-destination-filename');
const downloadFile = require('./download-file');

@@ -14,3 +14,3 @@

const downloadFilenames = remoteFilenames.filter((remoteFilename) => {
const destinationFilename = getDestinationFilename(
const destinationFilename = getLocalDestinationFilename(
remoteFilename,

@@ -39,3 +39,6 @@ distDir

downloadFilenames.map((remotePath) => {
const destinationPath = getDestinationFilename(remotePath, distDir);
const destinationPath = getLocalDestinationFilename(
remotePath,
distDir
);
const downloadPromise = dryRun

@@ -42,0 +45,0 @@ ? Promise.resolve()

@@ -7,6 +7,4 @@ 'use strict';

const uploadFile = require('./upload-file');
const getRemoteDestinationFilename = require('../shared/get-remote-destination-filename');
const getDestinationFilename = (localFilename, distDir) =>
localFilename.replace(distDir.endsWith('/') ? distDir : `${distDir}/`, '');
const push = ({

@@ -23,3 +21,3 @@ s3,

const uploadFilenames = localFilenames.filter((localFilename) => {
const destinationFilename = getDestinationFilename(
const destinationFilename = getRemoteDestinationFilename(
localFilename,

@@ -55,3 +53,6 @@ distDir

uploadFilenames.map((localPath) => {
const destinationPath = getDestinationFilename(localPath, distDir);
const destinationPath = getRemoteDestinationFilename(
localPath,
distDir
);
const uploadPromise = dryRun

@@ -58,0 +59,0 @@ ? Promise.resolve({ Key: destinationPath })

{
"name": "@alexbainter/s3-sync",
"version": "0.2.2",
"version": "0.3.0",
"description": "Transfer files to and from S3",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc