Node.js framework
News:
debugging
supports live reloadingschema.setInsert()
and schema.setUpdate()
RESTBuilder.patch([data])
RESTBuilder.type(new-content-type)
CONVERT(obj, schema)
for quick converting values like Schema (more in docs.)Capitalize2
schema type which converts only the first charMailMessage.high()
sets high
priority of the email messsageMailMessage.low()
sets low
priority of the email messsageMailMessage.confidential()
sets Sensitivity
header with confidential
valueMailMessage.attachmentnosql(db, id, [name])
sends a file from NoSQL embedded databaseMailMessage.attachmentfs(storage_name, id, [name])
sends a file from FileStorageSchemaBuilderEntity.$stop()
stops the async listSchemaOptions.stop()
alias to $.model.$stop()
SchemaOptions.next()
alias to $.model.$next()
SchemaOptions.output()
alias to $.model.$output()
SchemaOptions.clean()
alias to $.model.$clean()
SchemaOptions.response()
alias to $.model.$response([index])
SchemaOptions.$async(callback, [index])
alias to $.model.$async()
SchemaOptions.$get([options], [callback])
alias to $.model.$get()
SchemaOptions.$insert([options], [callback])
alias to $.model.$insert()
SchemaOptions.$query([options], [callback])
alias to $.model.$query()
SchemaOptions.$remove([options], [callback])
alias to $.model.$remove()
SchemaOptions.$save([options], [callback])
alias to $.model.$save()
SchemaOptions.$update([options], [callback])
alias to $.model.$update()
SchemaOptions.$workflow(name, [options], [callback])
alias to $.model.$workflow()
SchemaOptions.$transform(name, [options], [callback])
alias to $.model.$transform()
SchemaOptions.$operation(name, [options], [callback])
alias to $.model.$operation()
SchemaOptions.$hook(name, [options], [callback])
alias to $.model.$hook()
SchemaOptions.stop()
alias to $.model.$stop()
&group
something like roles
but groups aren't evaluatedroute.groups
with defined groupsdatabase.listing([view])
which generates a listing responseDatabaseBuilder.insert(fn(doc))
can modify a document after update
or modify
has insert
modeDatabaseBuilder.query(code)
can contain a raw JS condition in the form e.g. doc.age > 18 && doc.age < 33
DatabaseBuilder.regexp(name, regexp)
RegExp search in stringsDatabaseBuilder.fulltext(name, regexp, [weight])
full text search in strings, more info in docs.DatabaseBuilder.hour(name, [compare], value)
creates a condition for hoursDatabaseBuilder.minute(name, [compare], value)
creates a condition for minutesDatabase.find2()
performs faster and reverse reading of documents (from end to begin of the file)Database.stream(fn, [repository], [callback(err, repository, count)])
for streaming documentsDatabase.lock(callback(next))
locks all internal DB operationsDatabase.ready(callback)
executes a callback when DB is ready to use (only for special cases if you use indexes)schemas
with a new configuration item `directory-schemas'operations
with a new configuration item `directory-operations'String.crc32([unsigned])
U.hash('crc32')
and U.hash('crc32unsigned')
nosql-worker' for enabling worker for NoSQL embedded database (default:
false`)nosql-inmemory' can contain name of databases e.g. (
users, products`) or String Arraynosql-cleaner
for cleaning databases from removed documents (default: 1440
=== 24 hours)nosql-logger
(default true
) enables simple logs when re-indexing and cleaningsecurity.txt
for auto-generating security.txt content (more in docs)default-proxy
for default web proxy serverallow-cache-cluster
(default true
) allow/disallow cache synchronizationGUID()
a global alias for U.GUID()
VIEW()
a global alias for F.view()
SchemaBuilderEntity.$response([index])
returns a specific response from an operation in async
queue$SAVE(schema, model, [options], [callback], [controller])
performs schema.save()
$INSERT(schema, model, [options], [callback], [controller])
performs schema.insert()
$UPDATE(schema, model, [options], [callback], [controller])
performs schema.update()
$REMOVE(schema, [options], [callback], [controller])
performs schema.remove()
U.streamer2()
same functionality as U.streamer()
but it returns Buffer
instead of String
Number.round([precision])
UID([type])
supports custom types, e.g. UID('users')
or UID('orders')
REQUEST()
global method, it's alias to U.request()
NOW
global property, it's alias to F.datetime
DatabaseBuilder.promise()
RESTBuilder.promise()
RESTBuilder.plain()
it returns a raw string from the response bodyversions
file supports auto
value for generating auto-checksum of filesF.load()
supports test
custom
small data attributescontroller.split
alias to controller.req.split
RESTBuilder.proxy(proxy)
for HTTP proxyU.request()
supports a new flag proxy
, for example proxy 127.0.0.1:8080
change
, more in docsschema.define()(DEFAULT_VALUE)
added DEFAULT_VALUE
TESTUSER([user])
for faking of F.onAuthorize
delegate, targeted for unit-testing onlyG
as a global alias for F.global
ERROR([name])
is an improved F.error()
without arguments.heic
and .heif
image formatcontroller.sitemap_url2()
controller.sitemap_name2()
@{sitemap_url2()}
@{sitemap_name2()}
F.syshash
contains a simple MD5 hash with OS infoSchemaEntity.clear()
for removing all current definition@{#}
for simulating of root URL@{root}
for getting sub-root pathString.ROOT()
for replacing @{#}
markup in stringsU.decryptUID(value, key)
for encrypting number/string valuesU.encryptUID(value, key)
for decrypting of number/string valuesF.config['secret-uid']
as a hidden secret for encrypting/decrypting valuesF.dir(path)
for changing of root directoryNOSQL()/TABLE().memory(count, [size])
for memory consumption, more in docsHttpFile.fs(storage_name, [custom], [callback])
saves a file into the FileStorageHttpFile.nosql(db_name, [custom], [callback])
saves a file into the FileStorageres.filefs(storage_name, id, [download], [headers], [callback])
returns file from FileStorageres.filenosql(db_name, id, [download], [headers], [callback])
returns file from NoSQL binaryres.imagefs(storage_name, id, image_make_fn, [headers], [callback])
returns file from FileStorageres.imagenosql(db_name, id, image_make_fn, [headers], [callback])
returns file from NoSQL binaryF.stats.performance
contains count of request
and file
per minutecontroller.operation(name, value, [callback], [options])
for evaluating of operationUpdates:
GROUP()
by adding a new argument url_prefix
NEWSCHEMA()
supports NEWSCHEMA('group/name')
ROUTE()
, extended syntax for schemas, for example: Schema --> @name
(more in docs.)ROUTE()
supports a new HTTP method definition ROUTE('GET /api/users/')
, ROUTE('POST /api/users/')
, etc.ROUTE()
supports a schema definition directly in the URL ROUTE('GET /api/users/ *User --> @save')
, etc.tpm
supports a new command called bundle
, for example: tpm bundle cms
F.restore()
filter can return a new filename (for files only)@{import('livereload')}
or @{import('livereload wss://mywebsite.com')}
supports livereload
value and it's rendered in debug
mode onlyschema.define('name', null)
removes a schema fieldcompression
, default true
autoremove
processed files in each()
or read()
method, default true
String.parseConfig(def, [onError])
can handle errors bettermiddleware
, now Total.js supports new declaration F.middleware(function($) {})
F.wait()
HTML templatevar
declarationsCORS()
without arguments for all routes, methods and originsCORS()
tries to join multiple same preferences to oneCORS(path)
without additional arguments allows all HTTP methodsU.keywords()
for Chinese/Japan characters@{import()}
by adding manifest
value linked to /manifest.json
F.use()
supports function
instead of middleware
name33
from 69
when the query string is parsingschema.required(name, (model, workflow) => workflow.update)
, more in docs.$MAKE(schema, model, [filter/workflows], ...)
supports workflows
(array or object) instead of filter for schema.required()
OPERATION()
by adding controller
Fixes:
message.manually()
origin
headerfavicon
Date.extend()
String.isJSON()
validatorString.parseDate()
now it parses date to UTC correctlyDate.format()
now it formats a date as UTC correctly\r\n
(Windows line endings)U.atob()
U.btoa()
String.arg()
controller.href()
with Array valuesU.get()
a problem with path with -
U.set()
a problem with path with -
F.path.mkdir()
in Windows and LinuxChanges:
disable-clear-temporary-directory
to allow-clear-temp : true|false
disable-strict-server-certificate-validation
to allow-ssc-validation : true|false
default-websocket-request-length
to default-websocket-maxlength
default-request-length
to default-request-maxlength
default-maximum-file-descriptors
to default-maxopenfiles
controller.proxy()
functionality (the name remains) via controller.proxy2()
functionalityRemoved:
F.responseFile()
F.responsePipe()
F.responseImage()
F.responseImageWithoutCache()
F.responseStream()
F.responseBinary()
F.responseContent()
F.responseRedirect()
F.response400()
F.response401()
F.response404()
F.response408()
F.response431()
F.response500()
F.response501()
F.responseStatic()
F.setModified()
F.notModified()
F.responseCode()
F.noCache()
controller.$modified()
controller.$etag()
Improvements:
debug
mode timing with improved consumptionU.streamer()
Fixes:
origin
header in WebSocketNews:
String.arg(obj)
for a simple templating Hello {variable}!
ON('@controllername', function() {})
-> is executed if the controller is evaluatedUpdates:
content-disposition
header by adding utf-8
according to RFC 5987
Fixes:
controller.params
in WebSocket controller$ASYNC()
execution in some casesSCRIPT()
code with commentsOPERATION()
409
system routerange
header and bad valuesclearSchedule()
Date.extend()
problem with monthsNews:
controller.html(body, [headers])
F.cluster.master(name, [data])
- for child processes, this method emits an event in master processF.cluster.on(name, callback(data))
- master event listenerLOGMAIL()
global alias for F.logmail()
MAIL()
global alias for F.mail()
onFinished
RESTBuilder.cookies(obj)
can set cookies as raw objectRESTBuilder.cook([true/false])
enables persistent cookiesSchemaOptions.params
which returns dynamic params from the controller's actionSchemaOptions.done([arg])
as a callback (contains wrapped SUCCESS())SchemaOptions.DB()
which returns DB(this.error)
instance (for SQL Agent)OperationOptions.done([arg])
as a callback (contains wrapped SUCCESS())OperationOptions.DB()
which returns DB(this.error)
instance (for SQL Agent)Image.measure(type, buffer)
for measuring width/height of imageEACHOPERATION(function(name) {})
for obtaining all registered operationscontroller.params
which returns dynamic params from the actionUpdates:
F.load()
, now supports string
for debug
or release
modeF.cluster.request()
can be executed from master processImage.miniature()
change a default filter from Box
to Hamming
U.request()
supports a new flag cookies
which enables a parsing cookies from responseFixes:
x-forwarded-proto
Removal:
string
lengthauto
appending .css
and .js
extension in view enginedefer
featureImprovements:
News:
controller.throw409()
, req.throw409()
@{R.something}
for repository
, @{M.something}
for model
and @{G.something}
for global
Updates:
ErrorBuilder.push()
supports .push(name, status_code)
or .push(name, error, status_code)
Fixes:
builder.paginate()
a problem with zero limit (default limit will be maxlimit
)News:
WebSocketClient
$ASYNC(schema, callback, [index], [controlller])
alias to SchemaBuilderEntity.$async()
ArrayBuffer.prototype.toBuffer()
AUTH(fn)
is an alias to F.onAuthorize = fn
controller.success()
alias to controller.json(SUCCESS(value))
CORS()
alias to F.cors()
DatabaseBuilder.paginate(page, limit)
F.config['allow-compile']
can disable the whole compilation of static filesF.config['default-dependency-timeout']
it's a timeout for module dependenciesF.path.rmdir(directory/directories, callback)
F.path.unlink(file/files, callback)
LOCALIZE()
a new global alias to F.localize()
MAP()
a new global alias to F.map()
MERGE()
a new global alias to F.merge()
MIDDLEWARE()
a new global alias to F.middleware()
NOSQL('users').backups([filter(doc)], callback(err, response))
returns all backupsSchemaOptions.invalid(name, [value], [path], [index])
alias to $.errors.push() + callback()
SchemaOptions.success()
alias to callback(SUCCESS(value))
controller.sitemapid
contains a sitemap identificatorcontroller.sitemap_add(parent, name, url)
appends a new item into the sitemap per request@{sitemap_add(parent, name, url)}
appends a new item into the sitemap per requestSchemaEntity.required('fieldname', boolean/function(model))
which can disable/enable validation for this fieldUpdates:
sitemap
routing can contain an additional path, e.g. #sitemapid/path/
F.localize()
supports sitemap routingF.merge()
supports sitemap routingF.map()
supports sitemap routingF.http(mode, [options], [middleware(listen)])
added a new argument middleware
debug.js
now reads directories according to the config (author: @luoage)config
sub-typecontroller.$exec()
--> callback
is by default controller.callback()
F.localize()
has enabled compression
by defaultF.prototypes()
by adding OperationOptions
F.noCache()
is obsoleteallow-handle-static-files
to allow-static-files
Fixes:
DatabaseBuilder.in()
U.ls2()
WebSocket
implementation (author: @jozefgula)ArrayBuffer
in webosocketF.path.mkdir()
on Windows (author: @molda)F.restore()
on Windows (author: @molda)F.rmdir
removes all files and directoriesJSON
type in Total.js schemasMODEL()
, MODULE()
, INCLUDE()
now are direct aliasesa
value@()
or
range
headerschema.setPrefix()
in nested schemasImprovements:
News:
NOSQL().restore()
restores a database (its package)xoauth2
(it needs to contain a BASE64
value) for sending emails via OAuth 2.0 tokens (more in docs)F.path.mkdir(path)
creates all directories according to the pathMailMessage.send2([callback])
sends a message according to the framework configurationDatabaseBuilder.contains(name)
DatabaseBuilder.empty(name)
db.counter.daily_sum([id], callback)
for reading statsdb.counter.daily_max([id], callback)
for reading statsdb.counter.daily_min([id], callback)
for reading statsdb.counter.monthly_sum([id], callback)
for reading statsdb.counter.monthly_max([id], callback)
for reading statsdb.counter.monthly_min([id], callback)
for reading statsdb.counter.yearly_sum([id], callback)
for reading statsdb.counter.yearly_max([id], callback)
for reading statsdb.counter.yearly_min([id], callback)
for reading statsdb.counter.stats_sum(top, [year], [month], [day], callback)
for reading statsdb.counter.stats_max(top, [year], [month], [day], callback)
for reading statsdb.counter.stats_min(top, [year], [month], [day], callback)
for reading statsdb.counter.minimum([id], callback)
for reading statsdb.counter.maximum([id], callback)
for reading statsdb.counter.min(id, value)
for writing statsdb.counter.max(id, value)
for writing statsdb.counter.sum(id, value)
for writing stats (alias for db.counter.hit()
)stats
when the stats are changedDatabaseBuilder.log(msg, [user])
DatabaseBuilder.backup([user])
CLONE(obj)
alias for U.clone()
GROUP(flags, fn)
alias for F.group()
F.cache.set2()
it creates a persistent cache (persistent items are stored in a file)@{'%config'}
which reads a value from config directlyF.config['allow-filter-errors']
for filtering network unhandled errorsREDIRECT()
alias for F.redirect()
Updates:
NOSQL().backup()
!!! was changed !!!!controller.view(name/url, [model], [headers], [partial])
can render a view from URL addressF.backup()
argument path
can contain String Array
file listcontroller.viewCompile(body, model, [headers], [partial], [cacheKey])
add a cache keyimage.command(arg, value, [priority], [escape])
a priority
argument can be escape
when it contains boolean
valueU.getExtension()
returns lower-case extensionstotal.js/debug
watchs /workflows
file/workflows
supports custom options
, more in docsArray.random()
algorithm (+70% faster than older)RESTBuilder.file(name, filetarget, [filename])
can contain filename
instead of bufferU.streamer(beg, [end], onItem(item, index), [skip], [stream])
added a new argument stream
for flushing bufferErrorBuilder.addTransform(name, callback(isResponse))
by adding new argument isresponse
sorting
(framework + NoSQL embedded), now supports internationalization
total.js/debugger
by adding a new option options.watch = ['directory']
U.streamer()
supports "cancelation", just return false
repeating-linear-gradient
, radial-gradient
, repeating-radial-gradient
and removed -o
prefixFixes:
controller
param in schemasMailMessage.callback()
to better placeoptions.user
and options.password
are blankF.prototypes()
F.decrypt()
a problem with parsing JSON and date formatsdebug.js
sometimes was created a problem with output informationsImprovements:
News:
F.prototypes(function(proto) {})
for extending all internal prototypesHttpFile
is set in global
for extending of prototypefile.move()
a new alias for file.rename()
SchemaBuilderEntity.$controller(new_controller)
EMPTYCONTROLLER
is a global variableNOSQL.set()
and NOSQL.get()
for NOSQL.meta()
RESTBuilder.file(name, filename, [buffer])
supports uploading filesRESTBuilder.mobile()
adds iPhone
phrase into the User-Agent
headerRESTBuilder.robot()
adds Bot
phrase into the User-Agent
headerROUTE()
--> F.route()
, FILE()
--> F.file()
and WEBSOCKET()
--> F.websocket()
Updates:
F.cluster
each operation checks whether cluster is activated0.0.0.0
Date.prototype.format()
with ddd
renders name of day with 2 capital lettersFixes:
function($)
config-test
file (added rewriting of existing values)debug.js
Improvements:
cors
in F.restful()
and F.restful2()
auto-vendor-prefixes
Fixes
debug.js
Fixes:
RESTBuilder
and U.request()
F.merge()
a problem with .js
or .css
extension in some directory