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

cloudrail-si

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudrail-si - npm Package Compare versions

Comparing version 2.8.1 to 2.9.0

types/ImageMetaData.js

4

changelog.md
# CloudRail SI Node.JS SDK changelog
* **2.9.0**
* The services in the CloudStorage interface now have an additional method to get thumbnails
* The CloudMetaData objects now have additional dimension information for images
* **2.8.1**

@@ -4,0 +8,0 @@ * Fixed an issue where an Error was thrown when logging out an already logged out instance of Box

4

index.js

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

var RedirectReceivers_1 = require("./RedirectReceivers");
var ImageMetaData_1 = require("./types/ImageMetaData");
module.exports = {

@@ -74,3 +75,4 @@ "services": {

"SubscriptionPlan": SubscriptionPlan_1.SubscriptionPlan,
"SpaceAllocation": SpaceAllocation_1.SpaceAllocation
"SpaceAllocation": SpaceAllocation_1.SpaceAllocation,
"ImageMetaData": ImageMetaData_1.ImageMetaData
},

@@ -77,0 +79,0 @@ "Settings": Settings_1.Settings,

@@ -1,32 +0,3 @@

--
Preamble
Please visit https://cloudrail.com/cloudrail-pricing/ for enterprise licensing options.
--
Please visit https://developers.cloudrail.com/ to sign-up and for further licensing information.
Software License
I. Licobo GmbH ("CloudRail") holds the copyright in the downloadable standalone
software library CloudRail-SI ("Library").
II. CloudRail grants you the non-exclusive, transferable, sub-licensable,
perpetual and irrevocable right to use the Library in connection with the
development, publication, use and exploitation of your software, as long as the
Library itself remains unchanged and unmodified. This includes the right to copy
the Library or to integrate it as a whole into your software.
III. You have no right to edit, change, modify, translate, reverse engineer,
decompile or dissemble the Library. You have also no right to sub-license or
exploit the Library as a separate standalone product, e.g. by selling, renting
or leasing it. Those rights are exclusively reserved for CloudRail. You have
also no right to make the Library publicly available as a standalone product
without explicit prior written permission by Cloudrail. Your rights according
to Sec. 69 d and 69 e German Copyright Act ("Urhebergesetz") remain unaffected.
IV. CloudRail provides the Library free of charge. CloudRail grants you only
rights to the Library in its publicly available form or version ("as is"),
including older versions. You are using the Library at your own risk and
CloudRail does not assume any warranties or guarantees. Therefore, CloudRail
shall only be liable for damage compensation if it caused the damage by gross
negligence or intent. The above-referenced liability limitations do not apply to
liability in the event of injury to life, body and health or in case CloudRail
assumed a guarantee.
Learn more on https://cloudrail.com

@@ -37,3 +37,3 @@ {

"engineStrict": true,
"version": "2.8.1",
"version": "2.9.0",
"main": "index.js",

@@ -40,0 +40,0 @@ "typings": "index.d.ts",

@@ -321,6 +321,4 @@ <p align="center">

CloudRail is **free to use**. For all projects; **commercial and non-commercial**. We want APIs to be accessible to all developers. We want APIs to be easier to manage. This is only possible if there are free, powerful tools out there to do this. The only favor we are asking for, is to spread the word about this library. Thank you!
CloudRail is free to use as long as your app is free as well. Learn more about our pricing on https://cloudrail.com/cloudrail-pricing/
CloudRail also has enterprise licensing options. Please contact us for more information: support@cloudrail.com
## Other Platforms

@@ -327,0 +325,0 @@

@@ -335,2 +335,18 @@ "use strict";

],
"getThumbnail": [
["callFunc", "validatePath", "$P0", "$P2"],
["callFunc", "checkAuthentication", "$P0"],
["callFunc", "resolvePath", "$P0", "$L0", "$P2"],
["create", "$L1", "Object"],
["string.concat", "$L1.url", "https://api.box.com/2.0/files/", "$L0.id", "/thumbnail.jpg?min_height=128&min_width=128"],
["set", "$L1.method", "GET"],
["create", "$L2", "Object"],
["string.concat", "$L2.Authorization", "Bearer ", "$S0.access_token"],
["set", "$L1.requestHeaders", "$L2"],
["http.requestCall", "$L3", "$L1"],
["if==than", "$L3.code", 404, 1],
["return"],
["callFunc", "checkHttpErrors", "$P0", "$L3", "get thumbnail", 200],
["set", "$P1", "$L3.responseBody"]
],
"checkAuthentication": [

@@ -745,2 +761,17 @@ ["create", "$L0", "Date"],

};
Box.prototype.getThumbnail = function (path, callback) {
Statistics_1.Statistics.addCall("Box", "getThumbnail");
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage));
ip.callFunction("getThumbnail", this.interpreterStorage, null, path).then(function () {
Helper_1.Helper.checkSandboxError(ip);
}).then(function () {
var res;
res = ip.getParameter(1);
if (callback != null && typeof callback === "function")
callback(undefined, res);
}, function (err) {
if (callback != null && typeof callback === "function")
callback(err);
});
};
Box.prototype.login = function (callback) {

@@ -747,0 +778,0 @@ Statistics_1.Statistics.addCall("Box", "login");

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

["set", "$L0.path", "$P2"],
["set", "$L0.include_media_info", true],
["callFunc", "standardJSONRequest", "$P0", "$L1", "$L0", "https://api.dropboxapi.com/2/files/get_metadata"],

@@ -205,2 +206,28 @@ ["callFunc", "makeMeta", "$P0", "$P1", "$L1"]

],
"CloudStorage:getThumbnail": [
["callFunc", "validatePath", "$P0", "$P2"],
["callFunc", "checkAuthentication", "$P0"],
["callFunc", "CloudStorage:exists", "$P0", "$L0", "$P2"],
["if==than", "$L0", 0, 2],
["create", "$L0", "Error", "File does not exist.", "NotFound"],
["throwError", "$L0"],
["create", "$L0", "Object"],
["set", "$L0.url", "https://content.dropboxapi.com/2/files/get_thumbnail"],
["set", "$L0.method", "POST"],
["create", "$L1", "Object"],
["set", "$L1.path", "$P2"],
["set", "$L1.format", "jpeg"],
["set", "$L1.size", "w128h128"],
["json.stringify", "$L1", "$L1"],
["create", "$L2", "Object"],
["string.concat", "$L2.Authorization", "Bearer ", "$S0.access_token"],
["set", "$L2", "$L1", "Dropbox-API-Arg"],
["set", "$L0.requestHeaders", "$L2"],
["create", "$L3", "Object"],
["http.requestCall", "$L3", "$L0"],
["if==than", "$L3.code", 409, 1],
["return"],
["callFunc", "validateResponse", "$P0", "$L3"],
["set", "$P1", "$L3.responseBody"]
],
"checkAuthentication": [

@@ -254,3 +281,10 @@ ["if!=than", null, "$S0.access_token", 1],

["set", "$P1.size", "$P2.size"],
["set", "$P1.path", "$P2.path_display"]
["set", "$P1.path", "$P2.path_display"],
["if!=than", "$P2.media_info", null, 6],
["if!=than", "$P2.media_info.metadata.dimensions", null, 5],
["get", "$L2", "$P2.media_info.metadata.dimensions"],
["get", "$L3", "$L2.width"],
["get", "$L4", "$L2.height"],
["create", "$L5", "ImageMetaData", "$L4", "$L3"],
["set", "$P1.imageMetaData", "$L5"]
],

@@ -668,2 +702,17 @@ "processRawMeta": [

};
Dropbox.prototype.getThumbnail = function (path, callback) {
Statistics_1.Statistics.addCall("Dropbox", "getThumbnail");
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage));
ip.callFunction("CloudStorage:getThumbnail", this.interpreterStorage, null, path).then(function () {
Helper_1.Helper.checkSandboxError(ip);
}).then(function () {
var res;
res = ip.getParameter(1);
if (callback != null && typeof callback === "function")
callback(undefined, res);
}, function (err) {
if (callback != null && typeof callback === "function")
callback(err);
});
};
Dropbox.prototype.login = function (callback) {

@@ -670,0 +719,0 @@ Statistics_1.Statistics.addCall("Dropbox", "login");

@@ -402,2 +402,17 @@ "use strict";

],
"getThumbnail": [
["callFunc", "checkAuthentication", "$P0"],
["callFunc", "validatePath", "$P0", "$P2"],
["callFunc", "resolvePath", "$P0", "$L0", "$P2"],
["callFunc", "getRawMetadataByID", "$P0", "$L1", "$L0"],
["get", "$L0", "$L1.thumbnailLink"],
["if==than", "$L0", null, 1],
["return"],
["create", "$L1", "Object"],
["set", "$L1.url", "$L0"],
["set", "$L1.method", "GET"],
["http.requestCall", "$L2", "$L1"],
["callFunc", "validateResponse", "$P0", "$L2"],
["set", "$P1", "$L2.responseBody"]
],
"Authenticating:login": [

@@ -615,3 +630,8 @@ ["callFunc", "checkAuthentication", "$P0"]

["return"],
["set", "$P1.Folder", 0]
["set", "$P1.Folder", 0],
["if!=than", "$L0.imageMediaMetadata", null, 4],
["get", "$L2", "$L0.imageMediaMetadata.height"],
["get", "$L3", "$L0.imageMediaMetadata.width"],
["create", "$L4", "ImageMetaData", "$L2", "$L3"],
["set", "$P1.imageMetaData", "$L4"]
],

@@ -1022,2 +1042,17 @@ "getRawMetadataByID": [

};
GoogleDrive.prototype.getThumbnail = function (path, callback) {
Statistics_1.Statistics.addCall("GoogleDrive", "getThumbnail");
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage));
ip.callFunction("getThumbnail", this.interpreterStorage, null, path).then(function () {
Helper_1.Helper.checkSandboxError(ip);
}).then(function () {
var res;
res = ip.getParameter(1);
if (callback != null && typeof callback === "function")
callback(undefined, res);
}, function (err) {
if (callback != null && typeof callback === "function")
callback(err);
});
};
GoogleDrive.prototype.login = function (callback) {

@@ -1024,0 +1059,0 @@ Statistics_1.Statistics.addCall("GoogleDrive", "login");

@@ -332,2 +332,25 @@ "use strict";

],
"getThumbnail": [
["callFunc", "checkAuth", "$P0"],
["callFunc", "validatePath", "$P0", "$P2"],
["string.urlEncode", "$L0", "$P2"],
["string.concat", "$L1", "https://api.onedrive.com/v1.0/drive/root:", "$L0", "?access_token=", "$S0.accessToken"],
["create", "$L2", "Object"],
["set", "$L2.url", "$L1"],
["set", "$L2.method", "GET"],
["create", "$L3", "Object"],
["http.requestCall", "$L3", "$L2"],
["callFunc", "validateResponse", "$P0", "$L3"],
["json.parse", "$L4", "$L3.responseBody"],
["get", "$L0", "$L4.id"],
["create", "$L1", "Object"],
["string.concat", "$L1.url", "https://api.onedrive.com/v1.0/drive/items/", "$L0", "/thumbnails/0/medium/content?access_token=", "$S0.accessToken"],
["set", "$L1.method", "GET"],
["create", "$L2", "Object"],
["http.requestCall", "$L2", "$L1"],
["if==than", "$L2.code", 404, 1],
["return"],
["callFunc", "validateResponse", "$P0", "$L2"],
["set", "$P1", "$L2.responseBody"]
],
"Authenticating:login": [

@@ -384,2 +407,7 @@ ["callFunc", "checkAuth", "$P0", "$L0"]

["set", "$P1.Folder", 1],
["if!=than", "$L5.image", null, 4],
["get", "$L11", "$L5.image.height"],
["get", "$L12", "$L5.image.width"],
["create", "$L13", "ImageMetaData", "$L11", "$L12"],
["set", "$P1.ImageMetaData", "$L13"],
["set", "$P1.Path", "$P2"]

@@ -812,2 +840,17 @@ ],

};
OneDrive.prototype.getThumbnail = function (path, callback) {
Statistics_1.Statistics.addCall("OneDrive", "getThumbnail");
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage));
ip.callFunction("getThumbnail", this.interpreterStorage, null, path).then(function () {
Helper_1.Helper.checkSandboxError(ip);
}).then(function () {
var res;
res = ip.getParameter(1);
if (callback != null && typeof callback === "function")
callback(undefined, res);
}, function (err) {
if (callback != null && typeof callback === "function")
callback(err);
});
};
OneDrive.prototype.login = function (callback) {

@@ -814,0 +857,0 @@ Statistics_1.Statistics.addCall("OneDrive", "login");

@@ -42,3 +42,5 @@ "use strict";

var body = {
data: Statistics.data
data: Statistics.data,
appKey: Settings_1.Settings.licenseKey,
platform: Statistics.PLATFORM
};

@@ -61,8 +63,7 @@ var promise = Promise.resolve();

body.client = client;
if (Settings_1.Settings.licenseKey != null)
body.appKey = Settings_1.Settings.licenseKey;
body.appKey = Settings_1.Settings.licenseKey;
body.libraryVersion = Statistics.CR_VERSION;
body.appHash = appHash;
body.clientHash = clientHash;
body.platform = "Node.js";
body.platform = Statistics.PLATFORM;
});

@@ -127,2 +128,3 @@ }

Statistics.CR_VERSION = Statistics.getCRVer();
Statistics.PLATFORM = "Node.js";
Statistics.SERVER_URL = "https://developers.cloudrail.com/api/entries";

@@ -129,0 +131,0 @@ Statistics.DELAY = 300000;

@@ -29,3 +29,4 @@ "use strict";

s += "folder -> '" + this.folder + "'\n";
s += "modifiedAt -> '" + this.modifiedAt + "'";
s += "modifiedAt -> '" + this.modifiedAt + "'\n";
s += "imageMetaData -> " + JSON.stringify(this.imageMetaData);
return s;

@@ -32,0 +33,0 @@ };

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

var SpaceAllocation_1 = require("./SpaceAllocation");
var ImageMetaData_1 = require("./ImageMetaData");
var Types = (function () {

@@ -33,3 +34,4 @@ function Types() {

"SubscriptionPlan": SubscriptionPlan_1.SubscriptionPlan,
"SpaceAllocation": SpaceAllocation_1.SpaceAllocation
"SpaceAllocation": SpaceAllocation_1.SpaceAllocation,
"ImageMetaData": ImageMetaData_1.ImageMetaData
};

@@ -36,0 +38,0 @@ return Types;

Sorry, the diff of this file is too big to display

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