======= 3.4.10 - fixed CSS variables ======= 3.4.9 - added HTML escaping for meta tags - added `insecure` flag into the `U.request()` method - added `RESTBuilder.insecure()` method - fixed security issue when parsing query arguments (reported by ) - fixed security in `U.get()` and `U.set()` (reported by Agustin Gianni) ======= 3.4.8 - fixed measuring dimension for `.gif` images - fixed potential remote code execution in `U.set()` founded by [Snyk](https://snyk.io/vuln) ======= 3.4.7 - fixed: command injection in `Image.pipe()` and `Image.stream()` - fixed `DELETE` method for the schemas (now it works like `PATCH` method) - fixed: `controller.transfer()` ======= 3.4.6 - added: a support for Total.js v4 UIDs - updated: file stats - updated: calculating of `usage` - fixed: applying of `default_root` in static files - fixed: routing evaluation - fixed: parsing of longer WebSocket messages - fixed: mail error handling - fixed: `versions` with `default_root` ======= 3.4.5 - fixed: a problem with persistent images ======= 3.4.4 - added: schema options `$.successful(function(response) {})` - added: `options.reconnectserver {Boolean}` to `WEBSOCKETCLIENT` - added: `req.snapshot(callback(err, request_body))` - added: a new command `CMD('reload_preferences')` - added: a new FILESTORAGE mechanism based on `UID` - added: `sql` extension to `U.getContentType()` - added: `F.stats.performance.usage` which contains percentual usage of the thread - updated: `SchemaOptions` method `$.response([index/operation_name])`, e.g. `$.response('workflow.NAME')` - updated: snapshot `startscript.js.json` contains tabs instead of spaces - updated: `DatabaseBuilder.rule(rule, [param])`, supports string declaration of filter function - updated: `URL` validation - fixed: cleaning of NoSQL embedded databases - fixed: `String.parseCSV()`, now supports multiline strings - fixed: a bug when closing of websocket - fixed: `DatabaseBuilder.search()` method - fixed: `Error` in `CLONE()` method - fixed: `schema.inherit()` by adding `schema.middleware()` and `schema.verify()` - fixed: parsing messages in WebSocket - fixed: a problem in some commands pre-render in the view compiler - fixed: parsing of query strings ======= 3.4.3 - added: `HASH(value, [type])` for creating hash like in jComponent - added: `SchemaOptions.repo` as alias to `SchemaInstance.model.$$repository` - added: a new type `CONVERT syntax` to `schema.define()` (more in docs) - added: `SchemaEntity.verify(name, function($), [cache])` for async verification of values - added: `TEMP` variable as a new global variable (it's cleaned every 7 minutes) - added: `CONF.allow_persistent_images: true` which allows to reuse resized images in temp directory - added: `req.filecache(callback)` as alias for `F.exists()` - added: own QueryParser - added: `RESTBuilderInstance.convert('name:String,age:Number')` method - added: `RESTBuilder.upgrade(fn(restbuilder))` for upgrading of `RESTBuilder` - added: `RESTBuilder` parses Total.js Errors in responses as Error - added: `String.prototype.env()` replaces all values in the form `[key]` for `CONF.key` - added: WebSocket supports a new type - raw `buffer` - added: `Number.fixed(decimals)` - updated: `websocket.send2(message, comparer, replacer, [params])` by adding `params` argument for comparer function - updated: `Websocket.encodedecode` can enable/disable easily encoding of messages - updated: bundling skips all bundles with `-bk.bundle` in filename - updated: bundle filenames are displayed in console - updated: `UPDATE()` method by adding `noarchive` argument - updated: `TEST()` method supports `[subdomain]` keyword and `METHOD url` in URL address - updated: `MODIFY([filename], fn)` by adding `filename` argument - updated: background of schedulers by @fgnm - updated: `U.download()` by adding `param` argument - updated: `U.request()` by adding `param` argument - updated: `schema.cl(name, [value])` method by adding `value` argument for replacing of existing code-list - updated: Tangular version to `v4.0.0` - improved: `filename` in modificators (now filenames contain relative paths) - improved: performance of `U.request()` (around +10%) - improved: performance of `U.download()` (around +10%) - improved: performance of `RESTBuilder` - improved: CSS minifier by compressing single hex color from e.g. `#000000` to `#000` - fixed: localization in `totaljs` executable script - fixed: phone validation - fixed: `DOWNLOAD()` - fixed: `Number.VAT()` by Tomas Novak - fixed: debugging mode in Node.js v14 - fixed: `allow_compile_html` in static files - fixed: `ROUTE()` method, there was a problem with spaces `GET /* ` - fixed: `ACTION()` with json output - fixed: controller in `$ACTION()` with used `get` and `query` actions - fixed: `PATCH` method in `$ACTION()` - fixed: `schema.allow()` in `PATCH` method - fixed: image resizing in debug-mode ======= 3.4.1 - added: `SchemaOptions.parent` returns a parent model - added: Tangular template engine (experimental) - added: `String.makeid()` for creating of unique identifier from string - added: a new property called `message.ua` to `FLOWSTREAM()` - updated: `HttpFile.fs()` by adding `id` argument for updating of existing file - updated: default value for `allow_ssc_validation` to `true` - fixed: `String.parseDate(format)` with defined format - fixed: inheriting of controllers between schemas - fixed: `MailMessage.attachments()` - fixed: calling of `F.snapshotstats` in cache recycle - fixed: `controller.success()` - fixed: removing of unused files when a bundle is extracting - fixed: a processor function in `F.backup()` - improved: `Date.format()` - improved: Total.js translate (supports ErrorBuilder and DBMS) ======= 3.4.0 - added: `date.setTimeZone(timezone)` - added: `NOSQL('~absolute_path.nosql')' loads external NoSQL embedded database - added: `TABLE('~absolute_path.nosql')' loads external Table - added: `(generate)` subtype into the `config` files - added: `String.isBase64()` - added: new schema type `Base64` - added: SchemaEntity supports `schema.addWorkflowExtension(name, fn($, [data]))` - added: SchemaEntity supports `schema.addTransformExtension(name, fn($, [data]))` - added: SchemaEntity supports `schema.addOperationExtension(name, fn($, [data]))` - added: SchemaEntity supports `schema.addHookExtension(name, fn($, [data]))` - added: SchemaEntity supports `schema.setSaveExtension(fn($, [data]))` - added: SchemaEntity supports `schema.setReadExtension(fn($, [data]))` - added: SchemaEntity supports `schema.setQueryExtension(fn($, [data]))` - added: SchemaEntity supports `schema.setRemoveExtension(fn($, [data]))` - added: SchemaEntity supports `schema.setInsertExtension(fn($, [data]))` - added: SchemaEntity supports `schema.setUpdateExtension(fn($, [data]))` - added: SchemaEntity supports `schema.setPatchExtension(fn($, [data]))` - added: SchemaOptions supports `$.extend([data])` for evaluating of all extensions for the current operation - added: `WebSocket.keys` property (it contains all keys with connections) - added: `threads` directory for server-less functionality - added: a global variable called `THREAD` with a name of current thread - added: `require('total.js').http(..., { thread: 'thread_name' })` evaluates only specified thread - added: `require('total.js').cluster.http(..., { thread: 'thread_name' })` evaluates only specified thread in cluster - added: framework creates a file with app stats in the form `your_init_script_name.js.json` - added: a new config key `allow_stats_snapshot` - added: view engine `@{import()}` supports auto-merging JS or CSS files: `@{import('default.js + ui.js')}` - added: `exports.options` delegate to component in `FLOWSTREAM` - added: `DatabaseBuilder.autofill()` from DBMS - added: `HttpFile.extension` property - added: `HttpFile.size` property alias to `HttpFile.length` - added: auto-session cleaner of unused sessions - added: `allow_sessions_unused` config key for cleaning of unused sessions - added: missing `PATH.schemas`, `PATH.operations` and `PATH.tasks` - added: a new method `PATH.updates` - added: easy updating of applications via `UPDATE(versions, [callback], [pause_server_message])` - added: NOSQL counter `.reset([type], [id], [date], [callback])` method- - added: `session.listlive(callback)` returns all live items in session - added: `controller.ua` returns parsed User-Agent - added: `$.ua` returns parsed User-Agent in Schemas, Operations, TaskBuilder, `MIDDLEWARE()` and `AUTH()` - added: support for `.mjs` extensions - added: a simple support for DDOS protection `allow_reqlimit : Number` (max. concurent requests by IP just-in-time) - added: unit-testing supports colors, added by @dacrhu - added: `String.encryptUID()` as alias for `U.encryptUID()` - added: `String.decryptUID()` as alias for `U.decryptUID()` - updated: `WEBSOCKET()` supports `+`, `-` and `🔒` as authorization flags - updated: `LOAD()` supports `service` type - updated: cluster watches `restart` or `restart_NAME_of_THREAD` files for restarting of existing threads - updated: cluster supports `auto` mode - updated: cluster supports watcher in `debug` mode - updated: `*.filefs()`, `*.filenosql()`, `*.imagefs()`, `*.imagenosql()` by adding `checkmeta` argument - updated: `$.done([user_instance])` method in `AUTH()`, added a new argument called `user_instance` (optional) - updated: GZIP is enabled only for JSON bodies which have more than 4096 bytes - updated: `.env` parser supports parsing of `.env-debug` or `.env-release` files according to the mode - updated: list of user-agents in `String.parseUA()` - fixed: `ON('error404')` when the route doens't exist - fixed: `filter` in Schema `workflows`, `transformations` and `operations` - fixed: `NOSQL()` joins with absolute paths - fixed: `TABLE()` joins with absolute paths - fixed: `(random)` subtype in `config` files - fixed: `(response)` phrase in `ROUTE()` for multiple `OPERATIONS` - fixed: a response in `ROUTE()` with mulitple operations if the result contained some error - fixed: a security bug with a path traversal vulnerability - fixed: `debug` watcher for `themes` - fixed: `generators` in schemas with a new declaration - fixed: a problem with handling files in 404 action - fixed: `startup` directory in bundles - fixed: `schema.inherit()` didn't copy `required` fields. - fixed: `SUCCESS()` serialization with `SUCCESS()` argument - fixed: a critial bug with `UID()` generator - fixed: clearing of DNS cache - improved: `LOGMAIL()` mail format - improved: starting logs in console output (added IPv4 local address) - improved: performance with JSON serialization in `controller.success()` and `controller.done()` ======= 3.3.2 - fixed: default time zone (`utc` is default time zone) ======= 3.3.1 - added: `RESTBuilder.callback()` which performs `.exec()` automatically - added: `FLOWSTREAM()` - fixed: `AUDIT()` method - fixed: error handling in `controller.invalid()` - fixed: `req.authorize()` - fixed: CSS auto-vendor-prefixes, fixed `opacity` with `!important` - fixed: `CONVERT()` a problem with arrays ======= 3.3.0 - added: `NEWTASK(name, declaration)` for creating preddefined `TaskBuilder` - added: `TASK(name, taskname, callback, [controller/SchemaOptions/OperationOptions/ErrorBuilder])` for executing preddefined `TaskBuilder` - added: a new config key `directory_tasks` for `TaskBuilder` - added: a global alias `MODIFY()` for `F.modify()` - added: a global alias `VIEWCOMPILE()` for `F.view_compile()` - added: `mail.type = 'html'` can be `html` (default) or `plain` - added: `$.headers` into the `SchemaOptions`, `OperationOptions` and `TaskBuilder` - added: `String.parseCSV([delimiter])` returns `Object Array` - added: `String.parseUA([structured])` a simple user-agent parser - added: `req.useragent([structured])` returns parsed User-Agent - added: a new config key `default_crypto` it can rewrite Total.js crypto mechanism (default: `undefined`) - added: a new config key `default_crypto_iv` it's an initialization vector (default: generated from `secret`) or it can contain a custom `hex` value - added: a new config key `allow_workers_silent` can enable/disable silent workers (default: `false`) - added: a new config sub-type called `random`, example: `secret_key (random) : 10` and `10` means a length of value - added: a new command `clear_dnscache` for clearing DNS cache - added: commands `INSTALL('command', 'command_name', function)` for registering commands and `CMD(name, [a], [b], [c], [d])` for executing commands - added: `ENCRYPTREQ(req, val, [key], [strict])` to encrypt value according to the request meta data - added: `DECRYPTREQ(req, val, [key])` to decrypt value according to the request meta data - added: `controller.nocache()` - added: `controller.nocontent()` - added: `REPO` as a global variable - added: `FUNC` as a global variable - added: `MAIN` as a global variable - added: `DEF` as a global variable for defining of behaviour for some operations (alternative to `F`) - added: `PREF.set(name, [value])` (read+write) or `PREF.propname` (only read) for reading/writing a persistent preferences - added: `F.onPrefSave = function(obj)` to write preferences - added: `F.onPrefLoad = function(next(obj))` to read preferences - added: `RESTBuilder.url(url)` which returns a new instance of `RESTBuilder` for chaining - added: `restbuilder.keepalive()` enables a keepalive for `RESTBuilder` instance - added: `SESSION()` management, more in docs - added: `controller.sessionid` with ID of `SESSION()` - added: `AUTH()` supports a new auth declaration with `$` as `AuthOptions` like `SchemaOptions` or `OperationOptions` - added: `AuthOptions` to prototypes - added: `ErrorBuilder.length` property (alias for `instance.items.length) - added: Schemas `prepare` supports `req` argument - added: `DEF.currencies.eur = function(val) {}` registers a currency formatter - added: `DEF.helpers` registers a new view engine helper (`F.helpers` is alias for for this object) - added: `DEF.validators` is alias for for `F.validators` - added: usage of currency formatter `Number.currency(currency)` - added: new schema type `Number2` with default value is `null`, not zero `0` - added: `@{json2(model, elementID, key1, key2, key3)}` can serialize data with keys defined into the `