akamai-filerobot-converter
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -0,0 +0,0 @@ module.exports = function (api) { |
@@ -0,0 +0,0 @@ # Changelog |
@@ -39,8 +39,13 @@ "use strict"; | ||
var imageResizingInstruction = (0, _filerobotToAkamai.imageResizingSchema)(props); | ||
var watermarkInstruction = (0, _filerobotToAkamai.watermarkSchema)(props); | ||
var watermarkImageInstruction = (0, _filerobotToAkamai.watermarkImageSchema)(props); | ||
var watermarkTextInstruction = (0, _filerobotToAkamai.watermarkTextSchema)(props); | ||
if (watermarkInstruction.shouldProcess(queryString)) { | ||
resultOperations = [].concat(_toConsumableArray(resultOperations), _toConsumableArray(watermarkInstruction.process(queryString))); | ||
if (watermarkImageInstruction.shouldProcess(queryString)) { | ||
resultOperations = [].concat(_toConsumableArray(resultOperations), _toConsumableArray(watermarkImageInstruction.process(queryString))); | ||
} | ||
if (watermarkTextInstruction.shouldProcess(queryString)) { | ||
resultOperations = [].concat(_toConsumableArray(resultOperations), _toConsumableArray(watermarkTextInstruction.process(queryString))); | ||
} | ||
if (imageResizingInstruction.shouldProcess(queryString)) { | ||
@@ -47,0 +52,0 @@ resultOperations = [].concat(_toConsumableArray(resultOperations), _toConsumableArray(imageResizingInstruction.process(queryString))); |
@@ -18,2 +18,28 @@ "use strict"; | ||
}); | ||
}); | ||
var _normalizeTextWatermark = require("./akamai-to-filerobot/normalize-text-watermark"); | ||
Object.keys(_normalizeTextWatermark).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _normalizeTextWatermark[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function get() { | ||
return _normalizeTextWatermark[key]; | ||
} | ||
}); | ||
}); | ||
var _normalizeTextWatermark2 = require("./filerobot-to-akamai/normalize-text-watermark"); | ||
Object.keys(_normalizeTextWatermark2).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in exports && exports[key] === _normalizeTextWatermark2[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function get() { | ||
return _normalizeTextWatermark2[key]; | ||
} | ||
}); | ||
}); |
@@ -15,5 +15,5 @@ "use strict"; | ||
WATERMARK_IMAGE: /image=\(url=(.*)\)/, | ||
WATERMARK_TEXT: /text=([^,]*)(?=(,|\)))/, | ||
WATERMARK_TEXT: /text=([^\),]*)(?=(,|\)))/, | ||
WATERMARK_TEXT_SIZE: /size=(\d*)/, | ||
WATERMARK_TEXT_COLOR: /fill=([0-9a-f]{6})/, | ||
WATERMARK_TEXT_COLOR: /fill=([0-9a-fA-F]{6})/, | ||
WATERMARK_X_POSITION: /xPosition=(\d*)/, | ||
@@ -20,0 +20,0 @@ WATERMARK_Y_POSITION: /yPosition=(\d*)/, |
@@ -19,5 +19,5 @@ "use strict"; | ||
WATERMARK_SCALE: /wat_scale=(\d*)/, | ||
WATERMARK_TEXT_COLOR: /wat_color=([0-9a-f]{6})|wat_colour=([0-9a-f]{6})/, | ||
WATERMARK_POSITION: /wat_pad=(\d*),(\d*)|wat_pad=(\d*)/ | ||
WATERMARK_TEXT_COLOR: /wat_color=([0-9a-fA-F]{6})|wat_colour=([0-9a-fA-F]{6})/, | ||
WATERMARK_POSITION: /wat_pad=(\d*),((-?)\d*)|wat_pad=(\d*)/ | ||
}; | ||
exports.default = _default; |
@@ -18,4 +18,6 @@ "use strict"; | ||
var _watermarkSchema = _interopRequireDefault(require("./watermark-schema")); | ||
var _watermarkImageSchema = _interopRequireDefault(require("./watermark-image-schema")); | ||
var _watermarkTextSchema = _interopRequireDefault(require("./watermark-text-schema")); | ||
var _regionOfInterestCropSchema = _interopRequireDefault(require("./region-of-interest-crop-schema")); | ||
@@ -26,5 +28,5 @@ | ||
var getAkamaiInstructions = function getAkamaiInstructions(props) { | ||
return [(0, _rotateSchema.default)(props), (0, _backgroundColorSchema.default)(props), (0, _cropSchema.default)(props), (0, _positionableCropSchema.default)(props), (0, _resizeSchema.default)(props), (0, _watermarkSchema.default)(props), (0, _regionOfInterestCropSchema.default)(props)]; | ||
return [(0, _rotateSchema.default)(props), (0, _backgroundColorSchema.default)(props), (0, _cropSchema.default)(props), (0, _positionableCropSchema.default)(props), (0, _resizeSchema.default)(props), (0, _watermarkImageSchema.default)(props), (0, _watermarkTextSchema.default)(props), (0, _regionOfInterestCropSchema.default)(props)]; | ||
}; | ||
exports.getAkamaiInstructions = getAkamaiInstructions; |
@@ -12,8 +12,14 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "watermarkSchema", { | ||
Object.defineProperty(exports, "watermarkImageSchema", { | ||
enumerable: true, | ||
get: function get() { | ||
return _watermarkSchema.default; | ||
return _watermarkImageSchema.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "watermarkTextSchema", { | ||
enumerable: true, | ||
get: function get() { | ||
return _watermarkTextSchema.default; | ||
} | ||
}); | ||
exports.getFilerobotInstructions = void 0; | ||
@@ -27,4 +33,6 @@ | ||
var _watermarkSchema = _interopRequireDefault(require("./watermark-schema")); | ||
var _watermarkImageSchema = _interopRequireDefault(require("./watermark-image-schema")); | ||
var _watermarkTextSchema = _interopRequireDefault(require("./watermark-text-schema")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -31,0 +39,0 @@ |
{ | ||
"name": "akamai-filerobot-converter", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "", | ||
@@ -10,3 +10,3 @@ "private": false, | ||
"build": "webpack --mode production --config webpack-demo.config.js", | ||
"clean-dist": "rm -rf dist", | ||
"clean-dist": "rimraf dist", | ||
"dist": "npm run clean-dist && npx babel src --out-dir dist --copy-files", | ||
@@ -20,4 +20,2 @@ "deploy": "gh-pages -d build", | ||
"devDependencies": { | ||
"webpack": "^5.52.0", | ||
"webpack-cli": "^4.8.0", | ||
"@babel/cli": "^7.12.17", | ||
@@ -33,4 +31,7 @@ "@babel/core": "^7.12.17", | ||
"babel-loader": "^8.1.0", | ||
"gh-pages": "^2.2.0" | ||
"gh-pages": "^2.2.0", | ||
"rimraf": "^3.0.2", | ||
"webpack": "^5.52.0", | ||
"webpack-cli": "^4.8.0" | ||
} | ||
} |
@@ -0,0 +0,0 @@ [![Release](https://img.shields.io/badge/release-v0.1.4-blue.svg)](https://github.com/scaleflex/akamai-filerobot-converter) |
@@ -0,0 +0,0 @@ const path = require('path'); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
49138
29
777
14
1