Releases: veo-labs/openveo-api
Releases · veo-labs/openveo-api
6.2.0
6.2.0 / 2019-03-25
NEW FEATURES
- Add require('@openveo/api').imageProcessor to help manipulate images
- Add require('@openveo/api').imageProcessor.generateThumbnail to be able to generate a thumbnail of an image with the possibility to crop it and set its quality
- Add require('@openveo/api').imageProcessor.append to create an image using several input images appended in lines (horizontally or vertically)
- Add require('@openveo/api').imageProcessor.generateSprite to create a sprite image (as a grid of images) using several input images
- Add require('@openveo/api').imageProcessor.generateSprites to create sprite images using several input images. Depending on the number of input images and the size of the sprite grid, it might create several sprite images
- Add require('@openveo/api').grunt.copyTask as a grunt task to copy directories or files
6.1.0
6.1.0 / 2018-10-26
NEW FEATURES
- require('@openveo/api').util.getPropertyFromArray can now start collecting values at a specified value
- require('@openveo/api').storages.ResourceFilter now supports regular expressions
- require('@openveo/api').util.escapeTextForRegExp has been added to help escape a text that will be used in a JavaScript regular expression
DEPENDENCIES
- chai has been upgraded from 4.0.2 to 4.2.0
- chai-spies has been upgraded from 0.7.1 to 1.0.0
- grunt has been upgraded from 1.0.1 to 1.0.3
- grunt-eslint has been upgraded from 19.0.0 to 21.0.0
- grunt-gh-pages has been upgraded from 2.0.0 to 3.1.0
- grunt-mocha-test has been upgraded from 0.13.2 to 0.13.3
- mocha has been upgraded from 3.2.0 to 5.2.0
- mock-require has been upgraded from 3.0.1 to 3.0.2
6.0.0
6.0.0 / 2018-10-16
BREAKING CHANGES
- Drop support for NodeJS < 8.9.4 and NPM < 5.6.0
- multipart.MultipartParser.getFileDestination has been removed, use multipart.MultipartParser.getField
NEW FEATURES
- multipart.MultipartParser can now specify the uniqueness of file names with the property "unique". Set "unique" property of a field to true will generate a unique file name for all files corresponding to the field
BUG FIXES
- require('@openveo/api').util.shallowValidateObject now throws an error when trying to validate an Object (other than a Date) as a Date
5.1.1
5.1.1 / 2018-05-30
BUG FIXES
- Fix missing esprima module when installing
5.1.0
5.1.0 / 2018-05-04
NEW FEATURES
- Add NPM package-lock.json file
5.0.0
5.0.0 / 2018-05-03
BREAKING CHANGES
- require('@openveo/api').util.shallowValidateObject now throws an error when trying to validate an Object as an array<string>, array<number> or array<object>
- Controller / Model / Provider / Database system has been revised into a Controller / Provider / Storage system with the following important consequences:
- Models have been entirely removed as the notion of Model was confusing. Consequently require('@openveo/api').models does not exist anymore. You should now directly use Provider and EntityProvider instead of Model and EntityModel. If you were using ContentModel, content access verification based on a user has been moved into ContentController, thus you should use ContentController or implement content access controls yourself.
- require('@openveo/api').databases.factory is now accessible on require('@openveo/api').storages.factory
- require('@openveo/api').databases.Database is now accessible on require('@openveo/api').storages.databases.Database, this is because a new level of abstraction has been added to databases: the Storage. Database now extends Storage.
- EntityController.getEntitiesAction does not return all entities anymore but paginated results.
- EntityController.getEntityAction can now return an HTTP error 404 if entity has not been found.
- EntityController.updateEntityAction and ContentController.updateEntityAction now return property total with value 1 if everything went fine.
- EntityController.addEntityAction and ContentController.addEntityAction have been renamed into EntityController.addEntitiesAction and ContentController.addEntitiesAction because it is now possible to add several entities at once.
- EntityController.removeEntityAction and ContentController.removeEntityAction have been renamed into EntityController.removeEntitiesAction and ContentController.removeEntitiesAction because it is now possible to remove several entities at once.
- EntityController.removeEntitiesAction and ContentController.removeEntitiesAction now return property total with the number of removed entities.
- ContentController.updateEntityAction can now return an HTTP error 404 if entity has not been found.
- ContentController sub classes need to implement the method isUserManager.
- ContentController.isUserAuthorized now return false if user is not specified.
- ContentController.isUserAuthorized now return true if user is a manager (if ContentController.isUserManager return true).
- ContentController.updateEntityAction authorizes managers to update the entity owner.
- Classes extending EntityController must now implement a getProvider method instead of a getModel method.
- EntityProvider.getOne now expects a ResourceFilter and new fields format.
- EntityProvider.getPaginatedFilteredEntities has been removed, use EntityProvider.get instead.
- EntityProvider.get does not return all entities anymore but paginated results, it expects a ResourceFilter and new fields format.
- EntityProvider.update has been renamed into EntityProvider.updateOne and now expects a ResourceFilter.
- EntityProvider.remove now expects a ResourceFilter.
- EntityProvider.removeProp has been renamed into EntityProvider.removeField and now expects a ResourceFilter.
- EntityProvider.increase has been removed, use EntityProvider.updateOne instead.
- Database.insert has been renamed into Database.add an now expects a ResourceFilter.
- Database.remove now expects a ResourceFilter.
- Database.removeProp has been renamed into Database.removeField and now expects a ResourceFilter.
- Database.update now expects a ResourceFilter.
- Database.get now expects a ResourceFilter and new fields format.
- Database.search has been removed, use Database.get instead.
- Database.increase has been removed, use Database.updateOne instead.
- HTTP error code 512(10) does not correspond anymore to a forbidden error when fetching entities but to a forbidden error when removing entities.
- HTTP error code 515(10) which corresponded to a forbidden error when adding entities has been removed.
NEW FEATURES
- Add cropping parameter to image style definition, image can be cropped when both height & width are specified.
- Add require('@openveo/api').grunt.ngDpTask as a grunt task to analyze an AngularJS application and generate a file containing the list of CSS and JavaScript files respecting the order of AngularJS dependencies. Use it to make sure that your AngularJS files and their associated CSS files are loaded in the right order. Is is based on the premise that the AngularJS application is organiszed in components and sub components
- Add require('@openveo/api').middlewares.imageProcessorMiddleware as an ExpressJS middleware to preprocess images before sending them to the client. Actually only one kind of image manipulation is available: generate a thumbnail
- Add require('@openveo/api').controllers.HttpController which is a new level of abstraction for the EntityController as an EntityController is intimately linked to the HTTP protocol. EntityController now extends HttpController which extends Controller.
- Add fields on require('@openveo/api').controllers.EntityController, require('@openveo/api').controllers.ContentController, require('@openveo/api').providers.EntityProvider and require('@openveo/api').storages.Storage. This lets you precise which entity fields you want to include / exclude from returned entities.
- Add require('@openveo/api').storages.ResourceFilter to be used between controllers, providers and storage to unify the writing of query filters.
- Add EntityProvider.getAll to fetch all entities automatically by requesting pages one by one. This should be used wisely.
- Add Provider.executeCallback as an helper function to execute a callback or log the message if callback is not defined.
- Add require('@openveo/api').storages.databaseErrors holding all error codes relative to databases.
- Add require('@openveo/api').fileSystem.rm to remove either a directory or a file. Use it instead of require('@openveo/api').fileSystem.rmdir.
- Add the notion of content entities manager. Controllers of type ContentController should now implement the method "isUserManager" to indicate if the current user must have the same privileges as the super administrator on the content entities. Managers of content entities are always authorized to perform CRUD operations on a particular type of content entities.
BUG FIXES
- require('@openveo/api').multipart.MultipartParser now removes temporary files if client aborts the request
4.3.1
4.3.1 / 2018-01-16
BUG FIXES
- require('@openveo/api').util.validateFiles now considers M4V files as valid MP4 files
4.3.0
4.3.0 / 2017-11-15
NEW FEATURES
- require('@openveo/api').util.validateFiles is now capable of also validating file extensions
4.2.0
4.2.0 / 2017-10-18
NEW FEATURES
- Add require('@openveo/api').util.areSameArrays to shallow validates that two arrays contain the same values, no more no less
- Add require('@openveo/api').util.evaluateDeepObjectProperties to evaluate a path of properties on an object without making use of the JavaScript eval function
- Add hook mechanism for plugins. Plugins can now use PluginApi.registerAction, PluginApi.unregisterAction and PluginApi.executeHook to respectively register an action on a hook, unregister an action from a hook and execute all registered actions for a hook
- Add local, LDAP and CAS passport strategies with a factory. You can use this to facilitate the integration of passport authentications. Modules are exposed under require('@openveo/api').passport
4.1.0
4.1.0 / 2017-09-12
DEPENDENCIES
- chai has been upgraded from 3.5.0 to 4.0.2
NEW FEATURES
- Add require('@openveo/api').multipart.MultipartParser to help parse a request containing multipart data (including files)
- Improve require('@openveo/api').util.shadowValidateObject to add the possibility to validate values of array<string> and array<number> against a list of values using the in property
- Add require('@openveo/api').fileSystem.readFile to read part of a file
- Add require('@openveo/api').fileSystem.getFileTypeFromBuffer to get the type of a file as a buffer
- Add require('@openveo/api').util.validateFiles to validate that files types are as expected
- Add require('@openveo/api').util.getPropertyFromArray to retrieve values of a property inside an array of objects
- Add support for MP4 and TAR for require('@openveo/api').util.shadowValidateObject