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

bitballoon

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitballoon - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

51

lib/site.js

@@ -1,2 +0,3 @@

var model = require("./model"),
var path = require("path"),
model = require("./model"),
Form = require("./form").Form,

@@ -71,3 +72,3 @@ Submission = require("./submission").Submission,

var createFromDir = function(client, dir, siteId, cb) {
var fullDir = dir.match(/^\//) ? dir : process.cwd() + "/" + dir;
var fullDir = path.resolve(dir);

@@ -96,3 +97,3 @@ fs.stat(fullDir, function(err, stat) {

});
});
});
});

@@ -103,6 +104,6 @@ };

var fullPath = zip.match(/^\//) ? zip : process.cwd() + "/" + zip;
fs.readFile(fullPath, function(err, zipData) {
if (err) return cb(err);
client.request({

@@ -115,3 +116,3 @@ url: "/sites" + (siteId ? "/" + siteId : ""),

if (err) return cb(err);
return cb(null, new Site(client, data));

@@ -130,7 +131,7 @@ });

result = {};
for (var key in attributes) {
if (mapping[key]) result[mapping[key]] = attributes[key];
}
return result;

@@ -166,3 +167,3 @@ };

var self = this;
if (attributes.dir) {

@@ -176,7 +177,7 @@ createFromDir(this.client, attributes.dir, this.id, cb);

},
destroy: function(cb) {
this.client.destroy({element: this}, cb);
},
waitForReady: function(cb) {

@@ -188,3 +189,3 @@ var self = this;

} else {
setTimeout(function() {
setTimeout(function() {
self.refresh(function(err) {

@@ -197,39 +198,39 @@ if (err) return cb(err);

},
forms: function(options, cb) {
this.client.collection({prefix: this.apiPath, model: Form}, options, cb);
},
submissions: function(options, cb) {
this.client.collection({prefix: this.apiPath, model: Submission}, options, cb);
},
files: function(cb) {
this.client.collection({prefix: this.apiPath, model: File}, cb);
},
file: function(path, cb) {
this.client.element({prefix: this.apiPath, model: File, id: path}, cb);
},
snippets: function(cb) {
this.client.collection({prefix: this.apiPath, model: Snippet}, cb);
},
snippet: function(id, cb) {
this.client.element({prefix: this.apiPath, model: Snippet, id: id}, cb);
},
createSnippet: function(attributes, cb) {
this.client.create({prefix: this.apiPath, model: Snippet, attributes: attributes}, cb);
},
deploys: function(options, cb) {
this.client.collection({prefix: this.apiPath, model: Deploy}, options, cb);
},
deploy: function(id, cb) {
this.client.element({prefix: this.apiPath, model: Deploy, id: id}, cb);
},
uploadFiles: function(files, cb) {

@@ -242,3 +243,3 @@ if (this.state !== "uploading") return cb(null, this);

uploaded = [];
files.forEach(function(file) {

@@ -259,3 +260,3 @@ fs.readFile(file.abs, function(err, data) {

uploaded.push(file);
if (uploaded.length == files.length) {

@@ -270,2 +271,2 @@ self.refresh(cb);

exports.Site = Site;
exports.Site = Site;

@@ -5,3 +5,3 @@ {

"description": "BitBalloon API client",
"version": "0.1.2",
"version": "0.1.3",
"repository": {

@@ -23,2 +23,2 @@ "url": ""

"optionalDependencies": {}
}
}

@@ -17,3 +17,3 @@ BitBalloon Node Client

You'll need an application client id and a client secret before you can access the BitBalloon API. Please contact us at team@bitballoon.com for your credentials.
Register a new application at https://www.bitballoon.com/applications to get your Oauth2 secret and key.

@@ -556,2 +556,2 @@ Once you have your credentials you can instantiate a BitBalloon client.

});
```
```
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