total.js 2.3.0 发布了。total.js 是一个 web 应用框架,使用 JavaScript,HTML,CSS 和 Node.js(MVC) web 应用框架来构建 web 网站和 web 应用。更新如下:
新增
added: support for
/workflows
file (more in documentation)added:
ShcemaBuilderEntity.$exec(name, callback)
(more in documentation)added:
SchemaBuilder
supports new typesenum
andkeyvalue
added:
controller.$exec(name, [options], [callback])
(more in documentation)added: a new argument
description
to each SchemaBuilderset
+add
method e.g..setSave()
,.addWorkflow()
, etc..added:
SchemaBuilder.meta
contains all registered handlers with their descriptionsadded: a property
controller.schema
added:
F.viewCompile(body, [model], [layout], [repository], [language])
- dynamic viewsadded:
controller.viewCompile(body, [model], [headers], [partial])
- dynamic viewsadded:
{viewCompile(body, [model])}
- dynamic viewsadded:
Controller
is a global variable for extending prototypeadded:
F.validators
with Regular Expressionsadded: View Engine supports
@{continue}
and@{break}
command for loopingadded:
URLBuilder.make(fn)
added:
NOSQLMEMORY(dbName, [viewName])
enables in-memory database collectionadded: NoSQL
nosql.upsert(doc)
inserts a new document where document doesn't exist in DBadded: NoSQL
nosql.release()
for releasing of in-memory DB (framework clears unused in-memory databases automatically)added: NoSQL
nosql.scalar(type, dbName, [view])
performs scalar operation by type:sum
,min
,max
,avg
,count
orgroup
added: NoSQL
nosql.binary.all(callback)
browses all stored filesadded: NoSQL
nosql.binary.clear(callback)
removes all stored filesadded: NoSQL
DatabaseBuilder.random()
added: NoSQL
DatabaseBuilder.join(field, dbName, [view])
returnsDatabaseBuilder
with updated.where(field_JoinedDB, field_currentdb)
method (it supports.fields()
too)added: NoSQL
DatabaseBuilder.join()
supports scalar operation too, e.g.nosql.join(...).scalar('count')
added: NoSQL
DatabaseBuilder.scalar(type, [field])
- types:sum
,min
,max
,avg
,count
orgroup
added: NoSQL
DatabaseBuilder.month(field, [operator], value)
filtersDate
fields according its month numberadded: NoSQL
DatabaseBuilder.year(field, [operator], value)
filtersDate
fields according its year numberadded: NoSQL
DatabaseBuilder.day(field, [operator], value)
filtersDate
fields according its day numberadded: NoSQL events (documents):
insert
,update
,modify
andremove
added: NoSQL events (binary):
insert
,remove
andclear
added: NoSQL events (counter):
hit
,remove
andclear
added: a new alias
NOBIN(dbName)
witch it returnsNOSQL(dbName).binary
(a binary instance)added: a new alias
NOCOUNTER(dbName)
witch it returnsNOSQL(dbName).counter
(a counter instance)added:
F.kill(signal)
for killing an instance of the frameworkadded:
I
alias for `isomorphic code on server-side and client-side together by hhhaker6@gmail.com https://github.com/Creeplaysadded:
F.script(body, value, callback(err, value))
evaluates script securly in safe scope (more in documentation)added: new alias
SCRIPT()
forF.script()
added:
HttpFile.rename(filename, [callback(err)])
moves file to another directory
更新
updated:
F.on('exit', function(signal) {})
added a signal codeupdated: SchemaBuilderEntity contains new argument
controller
, e.g..setSave(function(error, model, options, callback, controller) { ..
updated: removed all validators of email addresses from FrameworkMail
updated:
GETSCHEMA([group], name, [callback(err, schema)])
can wait for a schemaupdated:
F.localize()
supports modificators asstatic
typeupdated:
F.modify()
supports a new typestatic
, it's group of.html
,.txt
and.md
filesupdated:
U.trim(obj, [clean])
supports a new argumentclean
(defaultfalse
) and when it'strue
and a value is''
then it sets the value toundefined
updated:
nosql.update(docToUpdate, [docToInsert])
when the document for updating doesn't exist then database performs insertupdated:
nosql.modify(docToUpdate, [docToInsert])
when the document for updating doesn't exist then database performs insertupdated:
nosql.binary
stores a creation date as meta info
修复
fixed:
Image.stream()
fixed: global variable
Image
(in a single library)fixed: JavaScript compressor (problem with Regular Expressions)
fixed: custom paths in
F.model()
andF.source()
fixed: NoSQL removing documents (problem with different filters in one queue)
fixed: fix view compiler error message
fixed:
String.prototype.capitalize
其他
removed:
nosql
doesn't support cache (DatabaseBuilder.cache
is obsolete)removed:
F.refresh()
the method was uselessreplaced:
Array.randomize()
forArray.random()
improved: code
下载地址: