cloudinary
Advanced tools
Comparing version 1.4.4 to 1.4.5
1.4.5 / 2016-11-25 | ||
================== | ||
New functionality | ||
----------------- | ||
* Add `remove_all_tags` API | ||
* Add `streaming_profile` transformation parameter. | ||
Other changes | ||
------------- | ||
* Fix face coordinates test | ||
* Sort parameters | ||
* Support `http` mode for tests. | ||
* Add tests for gravity modes | ||
1.4.4 / 2016-10-27 | ||
@@ -3,0 +20,0 @@ ================== |
@@ -8,3 +8,7 @@ // Generated by CoffeeScript 1.10.0 | ||
https = require('https'); | ||
if (process.env.CLOUDINARY_TEST_UNSECURE === 'http') { | ||
https = require('http'); | ||
} else { | ||
https = require('https'); | ||
} | ||
@@ -11,0 +15,0 @@ utils = require("./utils"); |
@@ -363,2 +363,12 @@ // Generated by CoffeeScript 1.10.0 | ||
exports.remove_all_tags = function(public_ids, callback, options) { | ||
if (public_ids == null) { | ||
public_ids = []; | ||
} | ||
if (options == null) { | ||
options = {}; | ||
} | ||
return call_tags_api(null, "remove_all", public_ids, callback, options); | ||
}; | ||
exports.replace_tag = function(tag, public_ids, callback, options) { | ||
@@ -382,11 +392,13 @@ if (public_ids == null) { | ||
return call_api("tags", callback, options, function() { | ||
return [ | ||
{ | ||
timestamp: utils.timestamp(), | ||
tag: tag, | ||
public_ids: utils.build_array(public_ids), | ||
command: command, | ||
type: options.type | ||
} | ||
]; | ||
var params; | ||
params = { | ||
timestamp: utils.timestamp(), | ||
public_ids: utils.build_array(public_ids), | ||
command: command, | ||
type: options.type | ||
}; | ||
if (tag != null) { | ||
params.tag = tag; | ||
} | ||
return [params]; | ||
}); | ||
@@ -393,0 +405,0 @@ }; |
105
lib/utils.js
@@ -66,10 +66,10 @@ // Generated by CoffeeScript 1.10.0 | ||
CONDITIONAL_PARAMETERS = { | ||
"width": "w", | ||
"height": "h", | ||
"aspect_ratio": "ar", | ||
"aspectRatio": "ar", | ||
"face_count": "fc", | ||
"faceCount": "fc", | ||
"height": "h", | ||
"page_count": "pc", | ||
"pageCount": "pc", | ||
"face_count": "fc", | ||
"faceCount": "fc" | ||
"width": "w" | ||
}; | ||
@@ -183,30 +183,30 @@ | ||
params = { | ||
timestamp: exports.timestamp(), | ||
transformation: utils.generate_transformation_string(_.clone(options)), | ||
public_id: options.public_id, | ||
allowed_formats: options.allowed_formats && utils.build_array(options.allowed_formats).join(","), | ||
backup: utils.as_safe_bool(options.backup), | ||
callback: options.callback, | ||
format: options.format, | ||
backup: utils.as_safe_bool(options.backup), | ||
faces: utils.as_safe_bool(options.faces), | ||
exif: utils.as_safe_bool(options.exif), | ||
image_metadata: utils.as_safe_bool(options.image_metadata), | ||
colors: utils.as_safe_bool(options.colors), | ||
type: options.type, | ||
discard_original_filename: utils.as_safe_bool(options.discard_original_filename), | ||
eager: utils.build_eager(options.eager), | ||
use_filename: utils.as_safe_bool(options.use_filename), | ||
unique_filename: utils.as_safe_bool(options.unique_filename), | ||
discard_original_filename: utils.as_safe_bool(options.discard_original_filename), | ||
notification_url: options.notification_url, | ||
eager_async: utils.as_safe_bool(options.eager_async), | ||
eager_notification_url: options.eager_notification_url, | ||
eager_async: utils.as_safe_bool(options.eager_async), | ||
exif: utils.as_safe_bool(options.exif), | ||
faces: utils.as_safe_bool(options.faces), | ||
folder: options.folder, | ||
format: options.format, | ||
image_metadata: utils.as_safe_bool(options.image_metadata), | ||
invalidate: utils.as_safe_bool(options.invalidate), | ||
proxy: options.proxy, | ||
folder: options.folder, | ||
moderation: options.moderation, | ||
notification_url: options.notification_url, | ||
overwrite: utils.as_safe_bool(options.overwrite), | ||
allowed_formats: options.allowed_formats && utils.build_array(options.allowed_formats).join(","), | ||
moderation: options.moderation, | ||
phash: utils.as_safe_bool(options.phash), | ||
proxy: options.proxy, | ||
public_id: options.public_id, | ||
responsive_breakpoints: utils.generate_responsive_breakpoints_string(options["responsive_breakpoints"]), | ||
return_delete_token: utils.as_safe_bool(options.return_delete_token), | ||
timestamp: exports.timestamp(), | ||
transformation: utils.generate_transformation_string(_.clone(options)), | ||
type: options.type, | ||
unique_filename: utils.as_safe_bool(options.unique_filename), | ||
upload_preset: options.upload_preset, | ||
responsive_breakpoints: utils.generate_responsive_breakpoints_string(options["responsive_breakpoints"]), | ||
return_delete_token: utils.as_safe_bool(options.return_delete_token) | ||
use_filename: utils.as_safe_bool(options.use_filename) | ||
}; | ||
@@ -431,2 +431,3 @@ return utils.updateable_resource_params(options, params); | ||
start_offset: "so", | ||
streaming_profile: "sp", | ||
video_codec: "vc", | ||
@@ -482,14 +483,23 @@ video_sampling: "vs", | ||
} | ||
if (options.tags != null) { | ||
params.tags = utils.build_array(options.tags).join(","); | ||
if (options.auto_tagging != null) { | ||
params.auto_tagging = options.auto_tagging; | ||
} | ||
if (options.background_removal != null) { | ||
params.background_removal = options.background_removal; | ||
} | ||
if (options.categorization != null) { | ||
params.categorization = options.categorization; | ||
} | ||
if (options.context != null) { | ||
params.context = utils.encode_key_value(options.context); | ||
} | ||
if (options.custom_coordinates != null) { | ||
params.custom_coordinates = utils.encode_double_array(options.custom_coordinates); | ||
} | ||
if (options.detection != null) { | ||
params.detection = options.detection; | ||
} | ||
if (options.face_coordinates != null) { | ||
params.face_coordinates = utils.encode_double_array(options.face_coordinates); | ||
} | ||
if (options.custom_coordinates != null) { | ||
params.custom_coordinates = utils.encode_double_array(options.custom_coordinates); | ||
} | ||
if (options.headers != null) { | ||
@@ -504,17 +514,8 @@ params.headers = utils.build_custom_headers(options.headers); | ||
} | ||
if (options.categorization != null) { | ||
params.categorization = options.categorization; | ||
} | ||
if (options.detection != null) { | ||
params.detection = options.detection; | ||
} | ||
if (options.similarity_search != null) { | ||
params.similarity_search = options.similarity_search; | ||
} | ||
if (options.auto_tagging != null) { | ||
params.auto_tagging = options.auto_tagging; | ||
if (options.tags != null) { | ||
params.tags = utils.build_array(options.tags).join(","); | ||
} | ||
if (options.background_removal != null) { | ||
params.background_removal = options.background_removal; | ||
} | ||
return params; | ||
@@ -1162,18 +1163,18 @@ }; | ||
return { | ||
timestamp: (ref = options.timestamp) != null ? ref : exports.timestamp(), | ||
type: options.type, | ||
async: exports.as_safe_bool(options.async), | ||
flatten_folders: exports.as_safe_bool(options.flatten_folders), | ||
flatten_transformations: exports.as_safe_bool(options.flatten_transformations), | ||
keep_derived: exports.as_safe_bool(options.keep_derived), | ||
mode: options.mode, | ||
notification_url: options.notification_url, | ||
prefixes: options.prefixes && exports.build_array(options.prefixes), | ||
public_ids: options.public_ids && exports.build_array(options.public_ids), | ||
tags: options.tags && exports.build_array(options.tags), | ||
target_format: options.target_format, | ||
target_public_id: options.target_public_id, | ||
flatten_folders: exports.as_safe_bool(options.flatten_folders), | ||
flatten_transformations: exports.as_safe_bool(options.flatten_transformations), | ||
use_original_filename: exports.as_safe_bool(options.use_original_filename), | ||
async: exports.as_safe_bool(options.async), | ||
notification_url: options.notification_url, | ||
target_tags: options.target_tags && exports.build_array(options.target_tags), | ||
keep_derived: exports.as_safe_bool(options.keep_derived), | ||
tags: options.tags && exports.build_array(options.tags), | ||
public_ids: options.public_ids && exports.build_array(options.public_ids), | ||
prefixes: options.prefixes && exports.build_array(options.prefixes), | ||
transformations: build_eager(options.transformations) | ||
timestamp: (ref = options.timestamp) != null ? ref : exports.timestamp(), | ||
transformations: build_eager(options.transformations), | ||
type: options.type, | ||
use_original_filename: exports.as_safe_bool(options.use_original_filename) | ||
}; | ||
@@ -1180,0 +1181,0 @@ }; |
@@ -27,2 +27,3 @@ // Generated by CoffeeScript 1.10.0 | ||
remove_tag: 2, | ||
remove_all_tags: 1, | ||
replace_tag: 2, | ||
@@ -29,0 +30,0 @@ create_archive: 0, |
@@ -5,3 +5,3 @@ { | ||
"description": "Cloudinary NPM for node.js integration", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"homepage": "http://cloudinary.com", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
713109
67
10746
14
12