New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

box-appauth

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

box-appauth - npm Package Compare versions

Comparing version 1.3.9 to 1.3.10

87

lib/collections/folder.js

@@ -6,3 +6,2 @@ "use strict";

var _ = require('lodash');
var Promise = require('bluebird')

@@ -47,4 +46,4 @@ // @param env {Object} Various call environment methods.

// request a limited set of fields.
// https://developers.box.com/docs/#folders-get-information-about-a-folder
// https://developers.box.com/docs/#folders-folder-object
//
// https://box-content.readme.io/reference#folder-object
//

@@ -65,3 +64,3 @@ info: function(args, cb) {

// Get meta-info on all items in folder
// Get all items in folder
//

@@ -76,3 +75,3 @@ // @param args {Object} Call signature

//
// https://developers.box.com/docs/#folders-retrieve-a-folders-items
// https://box-content.readme.io/reference#get-a-folders-items
//

@@ -106,3 +105,3 @@ list: function(args, cb) {

//
// https://developers.box.com/docs/#folders-create-a-new-folder
// https://box-content.readme.io/reference#create-a-new-folder
//

@@ -140,6 +139,6 @@ create: function(args, cb) {

// @param [args.name] {String} Optional new name for folder copy.
// @param args.fields {Array} Request non-standard fields and/or
// @param [args.fields] {Array} Request non-standard fields and/or
// request a limited set of fields.
//
// https://developers.box.com/docs/#folders-copy-a-folder
// https://box-content.readme.io/reference#copy-a-folder
//

@@ -180,7 +179,7 @@ copy: function(args, cb) {

// @param args.id {Integer} The numeric id of the folder
// @param args.recursive {Boolean} Whether to delete subfolders.
// @param args.fields {Array} Request non-standard fields and/or
// @param [args.recursive] {Boolean} Whether to delete subfolders. Default false.
// @param [args.fields] {Array} Request non-standard fields and/or
// request a limited set of fields.
//
// https://developers.box.com/docs/#folders-delete-a-folder
// https://box-content.readme.io/reference#delete-a-folder
//

@@ -210,8 +209,8 @@ delete: function(args, cb) {

// @param args.name {String} The (new) name of the folder.
// @param args.description {String} A folder description.
// @param args.tags {Array} A list of (String) tags.
// @param args.fields {Array} Request non-standard fields and/or
// @param [args.description] {String} A folder description.
// @param [args.tags] {Array} A list of (String) tags.
// @param [args.fields] {Array} Request non-standard fields and/or
// request a limited set of fields.
//
// https://developers.box.com/docs/#folders-update-information-about-a-folder
// https://box-content.readme.io/reference#update-information-about-a-folder
//

@@ -274,2 +273,3 @@ update: function(args, cb) {

// which #id folder is moved.
// @param [args.recursive] {Boolean} Whether to delete subfolders. Default false.
// @param args.fields {Array} Request non-standard fields and/or

@@ -283,23 +283,20 @@ // request a limited set of fields.

return Promise.resolve()
.bind(this)
.then(function() {
this.copy(args, function(err, copied) {
this.copy(args, function(err, copied) {
if(err) {
return cb(err);
}
if(err) {
return cb(err);
}
this.delete({
id : args.sourceId
}, function(err, res) {
if(err) {
return cb(err);
}
this.delete({
id : args.sourceId,
recursive : args.recursive
}, function(err, res) {
if(err) {
return cb(err);
}
cb(null, copied);
});
cb(null, copied);
});
}.bind(this));
})
}.bind(this));
},

@@ -341,5 +338,4 @@

// Re: #id. We've already established this id in the path.
//
return[{
id: info.id,
type: info.type,

@@ -357,15 +353,14 @@ name: info.name,

if(entry.id) {
var lup = {
name: entry.name
}
var lup = {
type: entry.type,
name: entry.name
}
if(verbose) {
lup.desc = entry.description;
lup.etag = entry.etag;
}
lookupTable[entry.id] = lup;
if(verbose) {
lup.desc = entry.description;
lup.etag = entry.etag;
}
lookupTable[entry.id] = lup;
if(entry.type === 'folder' && !entry.terminal) {

@@ -376,3 +371,5 @@

return util.format('%s%s', path, entry.id ? '/' + entry.id : '');
// If terminal, the path already contains the entity id
//
return util.format('%s%s', path, entry.terminal ? '' : '/' + entry.id);
})

@@ -379,0 +376,0 @@ .reduce(function(prev, next) {

{
"name": "box-appauth",
"version": "1.3.9",
"version": "1.3.10",
"description": "https://box-content.readme.io/v2.0/docs/app-auth",

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

@@ -19,2 +19,16 @@ "use strict";

console.log(util.inspect(graph, {depth: 10}));
/*
api.folder.move({
sourceId: 4900457265,
destinationId: 4900414029,
name: 'fuzzy floozie',
recursive: true
})
.then(function(boxR) {
console.log('MOVING-->', boxR)
})
.catch(function(err) {
console.log('moving error', err)
})
*/
})

@@ -21,0 +35,0 @@ .catch(function(err) {

Sorry, the diff of this file is not supported yet

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