carp-streamer
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -36,3 +36,3 @@ #!/usr/bin/env node | ||
'alias': { t: 'token', v: 'version', c: 'concurrency' }, | ||
'string': ['t', 'as-user'], | ||
'string': ['t', 'as-user', 'exclude'], | ||
'boolean': ['v', 'dry-run', 'progress'], | ||
@@ -55,2 +55,3 @@ 'number': ['c'], | ||
const needProgress = args['progress']; | ||
const excludes = (args['exclude'] && [].concat(args['exclude']) || []).map(exclude => path_1.default.resolve(process.cwd(), exclude)); | ||
const appConfig = process.env.BOX_APP_CONFIG && JSON.parse(fs_1.default.readFileSync(process.env.BOX_APP_CONFIG).toString()); | ||
@@ -79,2 +80,6 @@ const createBoxClient = (params) => { | ||
const relativePath = path_1.default.relative(rootPath, absolutePath); | ||
if (excludes.some(exclude => absolutePath.startsWith(exclude))) { | ||
spinner.succeed(`'${relativePath}' has been excluded.`); | ||
return done(); | ||
} | ||
try { | ||
@@ -81,0 +86,0 @@ const entry = yield app_1.Entry.create(dirent, rootPath, relativePath, rootFolder, client); |
{ | ||
"name": "carp-streamer", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Carp streamer", | ||
@@ -5,0 +5,0 @@ "bin": "dist/index.js", |
#!/usr/bin/env node | ||
import BoxSDK from 'box-node-sdk'; | ||
import _ from 'lodash'; | ||
import minimist from 'minimist'; | ||
@@ -20,3 +19,3 @@ import async from 'async'; | ||
'alias': { t: 'token', v: 'version', c: 'concurrency' }, | ||
'string': ['t', 'as-user'], | ||
'string': ['t', 'as-user', 'exclude'], | ||
'boolean': ['v', 'dry-run', 'progress'], | ||
@@ -27,3 +26,2 @@ 'number': ['c'], | ||
const args = minimist(process.argv.slice(2), argsOption); | ||
if (args.version) { | ||
@@ -44,2 +42,3 @@ console.log(npmPackage.version); | ||
const needProgress: boolean = args['progress']; | ||
const excludes = (args['exclude'] && [].concat(args['exclude']) || []).map(exclude => path.resolve(process.cwd(), exclude)); | ||
@@ -69,2 +68,6 @@ const appConfig = process.env.BOX_APP_CONFIG && JSON.parse(fs.readFileSync(process.env.BOX_APP_CONFIG).toString()); | ||
const relativePath = path.relative(rootPath, absolutePath); | ||
if (excludes.some(exclude => absolutePath.startsWith(exclude))) { | ||
spinner.succeed(`'${relativePath}' has been excluded.`); | ||
return done(); | ||
} | ||
try { | ||
@@ -71,0 +74,0 @@ const entry = await Entry.create(dirent, rootPath, relativePath, rootFolder, client); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67654
1064