forked from totaljs/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
changes.txt
executable file
·826 lines (723 loc) · 38 KB
/
changes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
======= 1.8.0
source-code: "tabs" instead of "spaces"
- added: SchemaBuilderEntity->setPrepare(function(name, value, index))
- added: SchemaBuilderEntity–>setPrefix(prefix)
- added: SchemaBuilderEntity->setResource(resourcename)
- added: auto-trim strings in SchemaBuilderEntity
- added: Controller.route;
- added: ErrorBuilder is a global class
- added: F.on('upload-begin', function(req, file) {})
- added: F.on('upload-end', function(req, file) {})
- added: config['static-accepts']: woff2
- added: F.logger(filename, arg1, ...), controller.logger(...), @{logger(...)}
- added: (IMPORTANT) F.exists(req, res, callback(next, filename))
- added: callback: F.responseFile(), controller.file(), response.file()
- added: callback: F.responseImage(), controller.image(), response.image()
- added: callback: F.responseImageWithoutCache()
- added: callback: F.responseStream(), controller.stream(), response.stream()
- added: callback: F.responseStatic(), response.continue()
- added: Array.prototype.findIndex(cb, [value]) returns Number
- added: Array.prototype.toObject([name]) returns Object
- added: Array.prototype.limit(max, fn(items, next), [callback])
- added: Array.prototype.compare(propName, arr, comparer)
- added: Image.geometry(w, h, options)
- added: Image.thumbnail(w, h, options)
- added: Image.filter(type)
- added: `config['default-maximum-file-descriptors'] = 0` (0 = the watcher is disabled)
- added: `config['default-interval-clear-dnscache'] = 2880` for clearing DNS cache of Utils.request(), Utils.download()
- added: Utils.resolve(url, callback(err, uri)) DNS cache
- added: Utils.clearDNS() clears DNS cache
- added: Utils.isObject()
- added: String.prototype.parseJSON()
- added: Date.prototype.diff([date], type)
- added: framework.onCompileView(name, content, model)
- added: framework.on('cache-set', function(name, value, expire))
- added: `@{compile handlerbars}CONTENT TO COMPILE@{end}`
- added: `@{compile}CONTENT TO COMPILE@{end}`
- added: Utils.streamer(delimiter, function(value, index)) returns function
- added: HEAD method support for (controller.json(), .view(), .plain(), .file(), .stream())
- added: global.NEWSCHEMA([group], name) for creating new schemas (more in docs)
- added: global.GETSCHEMA([group], name) for getting new schemas (more in docs)
- added: global.FINISHED(res/stream, callback) --> real end of the stream
- added: global.DESTROY(stream) --> destroys the stream
- added: (IMPORTANT) node.js generators for the routes
- updated: (IMPORTANT): for evaluation multiple roles in routing (@role) framework validates only one role
- updated: GZIP compression for static files (added .md, .json)
- updated: request schema parser and XML parser -> better handling errors
- updated: wrapped decodeURIComponent for prevention of parsing
- updated: removed HTTP cache in DEBUG mode
- updated: Image.miniature(w,h,color,[filter]) --> added filter
- updated: binary supports translation files `--translate my-localization.txt`
- updated: framework.mail() --> returns MailMessage
- updated: controller.mail() --> returns MailMessage
- updated: SchemaBuilderEntity.$async(callback, [return-only-this-index])
- updated: translation @(#KEY) (direct reading) or @(TEXT TO TRANSLATE) (hash reading)
- updated: Utils.request(), Utils.download() supports `dnscache` flag for caching host IP
- updated: SchemaBuilderEntity.validation()
- updated: F.cache.set(key, value, expire, [sync])
- updated: NoSQL
- updated: (IMPORTANT): Websocket ping is disabled by default
- fixed: Image.resize()
- fixed: F.usage() --> fixed queue pendings
- fixed: (CRITICAL) SchemaBuilderEntity preparing (problem with prototypes)
- fixed: (CRITICAL) a package or module installation from the URL address
- fixed: (CRITICAL) response content-length
- fixed: framework.redirect()
- fixed: HTTP cache (added longer time)
- fixed: auto JSON parsing in `json` request
- fixed: Pagination.last() (Nikita Shmidt)
- fixed: loading packages
- fixed: callback error in MailMessage
- fixed: TPM restore package
- fixed: Utils.request() --> double calling of callback()
- fixed: routing with `get` and `json` flag together
- replaced: (IMPORTANT) `uri` to `url` in F.problems, F.changes, F.errors (saves memory)
- improved: U.removeDiacritics() -> increase about 30%
- improved: handling files
- improved: auto-image-resizer (routes)
- improved: Image.miniature() -> increase about 50%
- improved: U.queue()
- improved: (IMPORTANT) SchemaBuilder validation and preparation
__GENERATORS__:
- added: Image.$$save(filename, [writer])
- added: Image.$$measure();
- added: Image.$$identify();
- added: Utils.$$request();
- added: Utils.$$download();
- added: Utils.$$send();
- added: Utils.$$wait();
- added: Utils.$$resolve();
- added: HttpFile.$$copy()
- added: HttpFile.$$read()
- added: HttpFile.$$md5()
======= 1.7.2
- added: Array.prototype.extend(obj, [rewrite])
- added: SchemaBuilderEntity->constant(name, [value])
- added: Utils.minifyHTML(value);
- added: Utils.minifyScript(value);
- added: Utils.minifyStyle(value);
- added: FrameworkImage.measureSVG(buffer);
- added: auto-parsing SVG width/height
- added: framework.translator([language], text);
- added: TRANSLATOR
- added: SUCCESS(boolean, [value]) returns { success: boolean, value: [value] }
- added: framework.onLocate(req, res) --> this method sets the current localization
- added: new installation event framework.on('module#name');
- added: new installation event framework.on('controller#name');
- added: new installation event framework.on('model#name');
- added: new installation event framework.on('definition#name');
- added: new installation event framework.on('config#name');
- updated: CSS compressor (better compression)
- updated: Utils.Request() supports head method
- fixed: binary `total --diff`
- fixed: debug.js (fixed port)
- fixed: F.onCompileStyle and F.onCompileJavaScript (problem with filename)
- fixed: Number.prototype.pluralize()
- fixed: WebSocket message parsing
- fixed: (CRITICAL) mail sender (problem with CRLF in BASE64)
- fixed: (CRITICAL) `../src/node_http_parser.cc, line 392.`
- fixed: the framework duplicates width/height in upload auto-parser
- fixed: JPG width/height auto-parser
======= 1.7.1 (HOTFIX)
This version will work on `io.js` without problems.
- added: framework.schedule(date/string/number, fn);
- added: (IMPORTANT) a prevention for the HeaderSent exception
- added: new option `sleep` for framework.http() & framework.https()
- added: request.ip caching
- added: framework.useConfig(filename-configuration)
- updated: String.toSearch() removes non-word characters
- updated: Utils.trim() supports arrays
- fixed: framework.versionNode (updated for io.js)
- fixed: (CRITICAL) if the controller middleware does not exist framework throws exception correctly
- fixed: Utils.validation() (for Arrays)
- fixed: authorization routing
- fixed: (CRITICAL) request with multipart content-type (+fixed problem XSS)
- fixed: (CRITICAL) controller.memorize() in JSON output
- fixed: (CRITICAL) uploading files, problem with the filename/name field (if it contained `;`)
- removed: mmr
======= 1.7.0
Framework supports a backward compatibility.
Framework supports: one file only (all libraries in one JS file)
Framework loads modules, packages, models, definitions, controllers
- added: SCHEMA(name), returns group of schemas
- added: Builders.Schema() - schema supports onGet, onSave, onRemove, onQuery
- added: Builders.Schema() - schema supports workflows
- added: Builders.Schema() - schema supports composer
- added: Builders.Schema() - schema supports transformations
- added: Builders.Schema() - schema supports grouping `Builders.schema('group').get('schema_name)`
- added: Builders.Schema() - schema supports rules
- added: Builders.Schema().make(obj, callback(err, model)) - make object with $save, $remove, $compose, etc.
- added: framework.mail() - is alias for controller.mail()
- added: framework.view(name, [model], [layout], [repository]) - is alias for controller.view()
- added: validate handler contains new parameter model -> (name, value, path, schema, model)
- added: String.prototype.replaceAt(index, character)
- added: String.prototype.parseXML()
- added: String.prototype.toSearch()
- added: async queue - Utils.queue(name, maximumCalls, fn) (for e.g. EMFILE, too many open files)
- added: Utils.isEqual(obj1, obj2, [properties])
- added: ErrorBuilder.prototype.push()
- added: ErrorBuilder.prototype.transform()
- added: ErrorBuilder.prototype.output()
- added: ErrorBuilder.prototype.setTransform(name) - set default transform
- added: ErrorBuilder.addTransform(name, fn, [isDefault]) - add transform
- added: ErrorBuilder.setDefaultTransform() for all ErrorBuilders
- added: Pagination.addTransform(name, fn, [isDefault]) - add transform
- added: Pagination.setDefaultTransform(name) for all Paginations
- added: Pagination.prototype.transform()
- added: Pagination.prototype.setTransform(name) - set default transform
- added: Pagination.prototype.first()
- added: Pagination.prototype.last()
- added: Pagination.prototype.isFirst
- added: Pagination.prototype.isLast
- added: framework.config['allow-custom-titles'] - (default: false)
- added: new option into Mail: rejectUnauthorized (for TLS)
- added: @{log()} and @{LOG()} into views
- added: @{console} (.log, .info, etc.) into views
- added: framework.on('controller-render-head', function(controller) {})
- added: framework.on('controller-render-meta', function(controller) {})
- added: framework.on('init')
- added: framework.merge('/merge.js', '/js/file1.js', '/js/file2.js')
- added: framework supports X-Forwarded-Protocol header
- added: FrameworkImage supports buffer
- added: auto-vendor-prefixes: box-sizing
- added: new flag `noxhr` or `-xhr` because all route contains +xhr as default
- added: config['default-errorbuilder-resource-name']
- added: config['default-errorbuilder-resource-prefix']
- added: config['allow-handle-static-files']
- added: FrameworkCache.get() alias for FrameworkCache.read()
- added: supports creating route without action (framework wraps action)
- added: .md (markdown) into static-accepts
- added: (modules, models, sources and controllers) exports.id instead of export.name
- added: framework.map(url, new_filename)
- added: framework.config['directory-packages'] for packages
- added: (IMPORTANT) PACKAGES (same as modules but package can contain many files in one file)
- added: framework.stats.request.request (requests count)
- added: FrameworkImage.miniature(w, h, bgColor)
- added: Array.first([def])
- added: Array.last([def])
- added: framework.routing(name)
- added: global --> ROUTING(name)
- added: global --> NOOP() empty function (exists: noop(), Utils.noop())
- added: global --> DEBUG boolean property (is the framework in debug mode?)
- added: global --> RELEASE boolean property (is the framework in release mode?)
- added: global --> TEST boolean property (is the framework in test mode?)
- added: global --> F object property (is alias for "framework")
- added: routing supports schemas `*custom-schema/User` and we can define it in flags
- added: String.prototype.parseBool()
- added: String.prototype.parseJSON()
- added: framework.responseImagePrepare(req, res, fnPrepare, fnProcess, [headers])
- added: response.throw400([problem])
- added: response.throw401([problem])
- added: response.throw403([problem])
- added: response.throw404([problem])
- added: response.throw408([problem])
- added: response.throw431([problem])
- added: response.throw500([error])
- added: response.throw501([problem])
- added: response.redirect(url, [permanent])
- added: view supports localization
- added: assertion testing --> framework sets global.assert = require('assert')
- added: module/controller supports dependencies --> exports.dependencies = ['moduleA', 'moduleB'];
- added: framework.dependencies (this object contains all installed total.js dependencies)
- added: controller.translate([text]);
- added: framework.translate([language], text)
- added: @{body.} instead of @{post.}
- added: @{query.} instead of @{get.}
- added: @{files} uploaded files
- added: .manifest to accept list
- added: BINARY added --diff for creating difference between two resources
- updated: framework.resize(), added: options.cache (true/false, default: true)
- updated: the route flag can contian number (TIMEOUT for current route)
- updated: (IMPORTANT) framework doesn't remove subdirectories with files in temporary directory
- updated: (IMPORTANT) all models are loaded after is the framework loaded
- updated: framework.redirect(url, redirectTo, [permanent]) supports relative redirects
- updated: Utils.request(), timeout is possible to add as cookie, headers or encoding
- updated: Utils.request() returns EventEmitter (begin, end, data(chunk, percentage))
- updated: Utils.request() supports auto-redirect if response status code is 301
- updated: Utils.download() returns EventEmitter (begin, end, data(chunk, percentage))
- updated: Controller.proxy() - returns EventEmitter (begin, end, data(chunk, percentage))
- updated: Array.wait(fnItem, fnCallback, removeItems) - default: function doesn't remove items
- updated: Builders.UrlBuilder() -> toString([skipEmpty])
- updated: Number.format([decimals], [separator], [decimalSeparator])
- updated: Date.format([format]) - format is optional, function returns ISO format without "Z"
- updated: response.send(), response.json() - supports ErrorBuilder
- updated: framework.error() (returns a wrapped delegate if error is undefined)
- updated: controller.baa([message]) - read documentation
- updated: Array.where(), Array.find(), Array.remove() - added a new functionality
- updated: @{view(name, [model], [expire], [expire-key])}
- updated: @{cookie(name)} --> read cookie
- updated: framework.mail(address, subject, view, model, callback, replyTo) - added: replyTo
- updated: controller.view(name) can execute without name (controller.viewname contains name according to URL)
- updated: @{post} is deprecated
- updated: @{get} is deprecated
- updated: String.encode(), String.decode()
- updated: (IMPORTANT) changed the arguments in callback for workflow, compose, transform
- updated: BINARY total --translate SOME TEXT create translate identificator
- renamed: config['directory-angular'] to config['directory-public-virtual']
- renamed: config['allow-compress-html'] to config['allow-compile-html']
- renamed: (IMPORTANT) default view layout from `_layout` to `layout`
- renamed: Utils.parseDateExpire() -> Utils.parseDateExpiration()
- removed: JS CSS
- removed: (IMPORTANT) view markup for Angular.js from the core (it will be a module)
- removed: Controller.fileAsync()
- removed: Controller.await()
- removed: Controller.wait()
- removed: Controller.run()
- removed: Controller.complete()
- removed: Controller.jsonAsync()
- removed: Controller.viewAsync()
- removed: Controller.redirectAsync()
- removed: framework.run()
- fixed: LOG()
- fixed: view engine rendering (fixed problem with undefined and null values)
- fixed: buffer exceeded if a framework receives a data
- fixed: if path starts '/' then is view loaded directly from /views/ directory
- fixed: xml parser
- fixed: problem with parsing a bad JSON datas - framework.decrypt();
- fixed: String.prototype.parseDate()
- fixed: path in framework.resize()
- fixed: framework.responseImageWithoutCache()
- fixed: appending .js or .css through @{head()}
- fixed: WebSocket authorization
- fixed: WebSocketClient.req
- fixed: routing (+ asterix routing)
- fixed: controller.cancel() (after framework.emit('controller', ...))
- fixed: view helpers (calling without arguments)
- fixed: dynamic cache of views
- fixed: mail sending
- fixed: clearing temporary directory
- fixed: parse JSON by the JSON route
- fixed: paths in Windows
- fixed: subject encoding in mail (supports UTF-8)
- fixed: sender name encoding in mail (supports UTF-8)
- fixed: Utils.trim()
- fixed: Utils.validation() (problem with schema array)
- fixed: Response.cookie()
- fixed: String.prototype.format() --> null/undefined --> returns empty string
- fixed: Utils.request() problem with unicode
- fixed: framework.assert() problem with unicode
- fixed: XML parsing
- improvements: routing performance
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/static-file-merge
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/framework-schema-and-validation
======= 1.6.2 (HOTFIX)
- updated: obtaining `req.xhr` before middleware
======= 1.6.1 (HOTFIX)
- added: `ErrorBuilder.errors` list of errors
- added: transform-style, perspective, backface-visibility into the CSS auto-vendor-prefixes
- added: WebSocket supports global middleware
- added: WebSocketClient.isWebSocket (for middleware instead of Response)
- updated: assertion testing (author: @toshipon)
- fixed: controller.callback([view_name]), supports NoSQL Embeded Database
- fixed: WebSocket auto-ping
- fixed: (debug mode) caching of static files
- fixed: global middleware (fixed exception in exception)
- fixed: Mail (problem with secure option, author: @asessa)
- fixed: binary (if debug.pid exists then is deleted and created again)
- improvements: framework (comparison of undefined)
======= 1.6.0
- added: framework.http(mode, [options]) - mode: test, debug or development, release or production
- added: framework.https(mode, [options]) - I recommend to use NGINX as HTTPS proxy
- added: middleware delegate: function(req, res, next, [options], [controller]) { next(); }
- added: middleware to framework.websocket(url, funcInitialize, [flags], [protocols], [allow], [maximumSize], [middleware])
- added: middleware to framework.file([name], [fnValidation], [fnExecute], [middleware])
- added: middleware to framework.use(name), this is global middleware
- added: middleware can add as flag: '#middleware1', '#middleware2'
- added: Response.controller, link to the current controller (if exists)
- added: Response.send([code], body, [contentType])
- added: Response.json(obj);
- added: Response.file(filename, [downloadName], [headers])
- added: Response.stream(contentType, stream, [downloadName], [headers])
- added: Response.continue();
- added: Response.req (current request)
- added: Request.query;
- added: Request.body;
- added: Request.files;
- added: controller.middleware(names, [options], [callback])
- added: controller.body --> is same as Controller.post
- added: controller.query --> is same as Controller.get
- added: controller.isController (for middleware)
- added: controller.json(obj, [beautify], [replacer]) and ErrorBuilder.json([beautify], [replacer]), author: bir <https://github.com/bir>
- added: utils.wait(fnValid, fnCallback, [timeout(default: 5000 ms)], [interval(default: 500 ms)])
- added: new flag: 'xml' in controller.route()
- added: new flag: 'xml' in utils.request()
- added: new flag: 'xml' in framework.assert()
- added: assertion testing: exports.usage = function() {} for custom results of test
- added: assertion testing: exports.disabled = true for disabling current test
- added: assertion testing: priority (example: exports.priority = 1)
- added: routing supports multiple HTTP-VERBS/METHODS together (author: bir <https://github.com/bir>)
- added: routing supports options for middleware, author: bir <https://github.com/bir>
- added: config-test (new config file)
- added: config['default-interval-clear-resources'], default 20 (minutes)
- added: config['default-interval-clear-temporary'], default 3 (minutes)
- added: config['default-interval-precompile-views'], default 61 (minutes)
- added: config['default-interval-websocket-ping'], default 1 (minutes)
- added: config['disable-strict-server-certificate-validation'], default true
- added: create automatically a ping message for websocket clients
- added: global INSTALL(type, name, declaration/url/function, [options], [callback]);
- added: global UNINSTALL(type, name, [options]);
- added: global CONTROLLER(name);
- added: framework.install(type, name, declaration/url/function, [options], [callback]);
- added: framework.uninstall(type, name, [options]);
- added: framework.on('install', function(type, name) {});
- added: framework.on('uninstall', function(type, name) {});
- added: framework.on('route-add', function(type, route) {})
- added: module/model/source/controller: exports.name = 'name ';
- added: module/model/source/controller: exports.version = 'version';
- added: model/source: exports.install = function(framework, options, name) {}
- added: module/model/source/controller: exports.uninstall = function(framework, options) {}
- added: String.prototype.parseDateExpire() - parse expiration date, example: '1 minute', '1 year'
- added: String.parseConfig([default]);
- added: framework.fs.create.database()
- added: framework.fs.rm.database()
- added: controller.isTransfer
- added: Date.compare(date) - for instance of date;
- added: Date.compare(d1, d2);
- added: Controller.date(type, date)
- added: Controller.callback([viewName])
- added: HttpFile.type (HttpFile.contentType is deprecated)
- added: controller.section(name, [value]);
- updated: NoSQL v2.0.8
- updated: String.parseDate('yyyy-MM-dd HH:mm:ss') - time is optional
- updated: module: exports.install = function(framework, options) {};
- updated: (IMPORTANT) INCLUDE(name, [options]), SOURCE(name, [options]) –> object
- updated: (IMPORTANT) SOURCE(name, [options]), framework.source(name, [options]) –> object
- updated: framework.controller(name) - definition was removed (use: framework.install())
- updated: framework.run([http], config, [port], [ip], [options])
- updated: utils.validate(), Builders.validate() –> prepare function (added: schemaName): function(name, value, path, schemaName)
- updated: framework.assert() supports "data" as function (for future data)
- updated: empty-project
- updated: request.signature([key]) - added key param
- updated: middleware function to: function(req, res, next) {}
- update: expiration supports string (framework.cache, response.cookie), example: '1 minute'
- updated: $view(name, model, [expire]), $viewToggle(name, model, [expire]) - added expiration {String}
- updated: controller.validate('schema_name', model);
- updated: Angular.js version
- updated: @{css()} and @{js()} supports multiple values
- updated: @{place()} doesn't add `<script>` tag automatically
- renamed: framework.on('expire') -> framework.on('cache-expire')
- renamed: framework.accepts(extension, [contentType]) -> framework.accept(extension, [contentType])
- fixed: controller.custom()
- fixed: utils.validate()
- fixed: long messages in WebSocket by Andrea Sessa <https://plus.google.com/u/0/104713619368072403016>
- fixed: view engine parser (reported by @tohachan)
- fixed: Builders.prepare()
- fixed: Builders.validate()
- fixed: framework.responseFile()
- fixed: framework.onCompileStatic()
- fixed: framework configuration
- fixed: JS CSS
- fixed: Auto vendor prefixer (CSS)
- fixed: Image.command()
- removed: (IMPORTANT) COMPONENTS()
- removed: (IMPORTANT) prefixes + framework.onPrefix()
- removed: (IMPORTANT) controller.framework (use: framework. instead of self.framework)
- removed: (IMPORTANT) global middleware from controllers
- removed: (IMPORTANT) global module #
- removed: (IMPORTANT) Request.data.get
- removed: (IMPORTANT) Request.data.post
- removed: (IMPORTANT) Request.data.files
- removed: (IMPORTANT) view engine: templates were changed to views
- removed: (IMPORTANT) `@{content()}`
- removed: (IMPORTANT) framework.injectModel() -> framework.install()
- removed: (IMPORTANT) framework.injectModule() -> framework.install()
- removed: (IMPORTANT) framework.injectSource() -> framework.install()
- removed: (IMPORTANT) framework.injectDefinition() -> framework.install()
- removed: (IMPORTANT) framework.injectController() -> framework.install()
- removed: (IMPORTANT) framework.onRoute() - TIP: use middleware
- removed: (IMPORTANT) framework.onRequest() - TIP: use middleware
- removed: (IMPORTANT) controller & module -> exports.request()
- clean code
- improvements: framework
======= 1.5.3 (HOTFIX)
- added: request.query (alias for request.data.get)
- (IMPORTANT) renamed: framework.partial() to framework.middleware()
- fixed: exit code in assertion testing (bug with lowest priority)
- (CRITICAL) fixed: WebSocket event
======= 1.5.2 (HOTFIX)
- added: CONFIG(name) - returns a value from the config file
- added: RESOURCE(name, key) - returns a value from the resource file
- added: utils.parseXML(xml)
- added: config['static-accept'] += '.json'
- added: String.prototype.slug([max])
- added: Array.prototype.orderBy([name], [asc])
- added: framework.on('request', function(req, res) {})
- added: framework.on('websocket', function(req, socket) {})
- updated: assertion testing
- fixed: WebSocket in IE
- fixed: calling global helpers like this: @{someHelper('some-argument')}
- fixed: controller.proxy()
- fixed: request.signature()
- fixed: cache.read() - problem with exact expiration
- fixed: "options" route flag
- fixed: configuration (fixer: @peterkc)
- fixed: schemas
- fixed: assertion testing
- fixed: view @{foreach ....}
======= 1.5.0 & 1.5.1
- added: TOTAL.JS PACKAGE MANAGER (new binary: tpm === [t]otal.js [p]ackage [m]anager)
- added: JS CSS (important: removed LESS)
- added: framework.noCache(req, [res])
- added: request.noCache()
- added: response.noCache()
- added: new config file (this file is loaded in a debug and in a release mode): /some-app/config
- added: String.prototype.startsWith(text, [ignoreCase]);
- added: String.prototype.endsWith(text, [ignoreCase]);
- added: picture auto resizer: framework.resize(url, [width], [height], [extensions], [path], [options])
- added: .webm into the config['static-accepts']
- added: in views - into the repository, model, user, session, get, post, global, config can assign some value: @{repository.name = 'total.js'}
- added: in views - supports @{foreach [property] in [array]} ... @{end}
- added: in views - supports nested conditions
- added: in views - supports inline helpers
- added: in views - supports sections
- added: controller.throw400([problem])
- added: controller.throw401([problem])
- added: controller.throw403([problem])
- added: controller.throw404([problem])
- added: controller.throw500(error)
- added: controller.throw501([problem])
- added: request.signature()
- adedd: Builders.create(schemaName)
- added: controller.exception
- added: framework.onMail(address, subject, body, callback)
- added: controller.mail(address, subject, viewName, [model], [callback])
- added: controller.transfer(url, [flags])
- updated: config['default-websocket-encodedecode'] - default: true
- updated: @{options(array/object)} - supports Object
- updated: utils.request(url, flags, [data], callback, cookies, headers, encoding, timeout)
- updated: utils.download(url, flags, [data], callback, cookies, headers, encoding, timeout)
- updated: framework.eval(string/url/function) - this function supports eval code from another URL
- updated: assertion testing (new features)
- updated: framework.isProcessed(filename or request)
- updated: framework.isProcessing(filename or request)
- updated: binary (some changes and improvements)
- updated: template engine
- updated: ErrorBuidler.toString([delimiter])
- renamed: ErrorBuilder.length -> ErrorBuilder.count
- fixed: framework.isProcessed()
- fixed: binary (test.js in empty-project)
- fixed: @{ngCommon()}
- fixed: @{ngStyle()}
- fixed: measure JPG - extended buffer
- fixed: utils.validate()
- fixed: Mail sender (problem with TLS)
- removed: IMPORTANT: old template engine was removed from templates
- removed: IMPORTANT: LESS CSS
- improvements: views
- improvements: templates
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/controller-transfer
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/controller-mail
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/css-jscss
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/routing-resize
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/views-place-sections
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/views
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/views-custom-helper
======= 1.4.0
- added: new global methods: INCLUDE() - framework.source(), SOURCE() - framework.source(), MODEL(name) -> framework.model(), MODULE(name) -> framework.module(), DATABASE() -> framework.database()
- added: unauthorize flag
- added: config['allow-compress-html'] (default: true)
- added: controller.language (read from request.language)
- added: framework sets response['Content-Length'] for some static files
- updated: debug.js (added "source")
- fixed: View not found (message includes full filename)
- fixed: @{ngFilter()}
- fixed: routing priority
- fixed: config['allow-gzip']
- fixed: utils.decode()
- fixed: utils.request()
- renamed: String.prototype.link([max]) to -> String.prototpye.linker([max])
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/font-awesome
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/websocket
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/angularjs-websocket
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/config-debug-release
- MODULES (NEW): https://github.com/totaljs/modules/tree/master/twitter
======= 1.3.1 (HOTFIX)
- updated: angular.js version (v1.2.15)
- fixed: partial views rendering in the layout
- fixed: internally utils
======= 1.3.0
- added: supports CoffeeScript
- added: framework.isWindows (readonly, boolean)
- added: framework.isCoffee (readonly, boolean)
- added: framework.config['directory-source'], great for business logic
- added: framework.injectSource(name)
- added: framework.source(name), call a business logic
- added: new global methods include() and source() are linked into the config['directory-source']
- added: config['default-websocket-encodedecode'] - encodeURIComponent && decodeURIComponent (IMPORTANT: default: false)
- added: Builders.ErrorBuilder.resource(filename, prefix) - can change resource filename or prefix
- added: new global variables - Builders, Mail, Utils
- added: Builders.validate(schemaName, model) - returns ErrorBuilder from everywhere (uses framework.resource)
- added: allowed controllers in subdirectories
- added: utils.assign(obj, path, value/function) - read more in documentation
- updated: Builders.schema(name, obj, [defaults], [validator]) - validator is new
- updated: Builders.validation(name, [arr] or [function])
- updated: controller.find(id or function)
- updated: utils.copy(source, [target]);
- updated: WebSocket.close([id], [message], [code]);
- updated: WebSocketClient.close([message], [code]);
- fixed: Controller properties on the WebSocket connections
- fixed: binary
- fixed: utils.validation()
- fixed: multipart upload (problem with multiple values)
- fixed: layout in partial views (from the controller)
- fixed: Windows path
IMPORTANT:
rewritten: WebSocket + WebSocket supports: text, JSON, binary, ping + pong
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/angularjs-bootstrap
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/bootstrap
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/framework-schema-validation
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/webrtc (unfinished but for an idea)
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/framework-business-logic-source
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/framework-inject-business-logic-source
======= 1.2.3-1 (HOTFIX)
IMPORTANT:
- fixed: [authorize] flag
- updated: utils.copy(source, target), previous: utils.copy(target, source);
======= 1.2.3
- added: view @{helper('name', [arg1], [arg2], ...)}
- added: controller.helper(name, [arg1], [arg2], ...)
- added: controller.change(message)
- added: new markup /*auto*/ for auto-vendor-prefixes
- added: [authorize] flag
- added: @{ng(name)}
- added: @{ngTemplate(name, [id])}
- added: @{ngController(name)}
- added: @{ngFilter(name)}
- added: @{ngService(name)}
- added: @{ngDirective(name)}
- added: @{ngResource(name)}
- added: @{ngCommon(name)}
- added: @{ngInclude(name)}
- added: @{ngStyle(name)}
- added: @{ngLocale(name)}
- added: @{helper(helperName, [param1], [param2], ...)}
- added: config['directory-angular']
- added: config['angular-version']
- added: config['angular-i18n-version']
- added: binary: total -angular [or] total -a
- added: framework.change(message, [name], [uri], [ip]);
- added: framework.changes;
- added: framework.on('change', message, [name], [uri], [ip]);
IMPORTANT:
- added: routing with asterix, example: framework.route('/subpage/*', ...);
IMPORTANT:
- updated: [logged] flag is obsolete, new flag: authorize
- updated: [unlogged] flag is obsolete (without flag)
- fixed: helpers
- fixed: static files caching in debug mode
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/angularjs
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/angularjs-websocket
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/angularjs-common
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/angularjs-mongodb-rest-resources
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/angularjs-routing
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/changes
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/routing
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/problems
======= 1.2.1-1 (NPM problem)
======= 1.2.1 (NPM problem)
======= 1.2.0
- new: NEW TEMPLATE ENGINE 2.0
- added: route to website, route to file and route to websocket is possible everywhere
- added: node harmony functions (see example)
- added: gc() into framework.on('service')
- added: config['allow-performance'] true/false (default, false)
- added: config['default-image-converter'] (default "gm" - GraphicsMagick, another possibility: "im" - ImageMagick)
- added: new views/templates/contents cache
- added: framework.problem(message, [name], [uri], [ip]);
- added: framework.on('problem', message, [name], [uri], [ip])
- added: framework.problems;
- added: req.language;
- added: controller.title()
- added: controller.description()
- added: controller.keywords()
- added: controller.problem(message)
- added: controller.memorize(key, expire, fnTo, [fnFrom]) - cache for controller.view(), controller.json(), controller.plain()
- added: Array.prototype.trim()
- added: Array.prototype.wait()
- added: Array.prototype.async()
- added: String.prototype.hash([type])
- added: Pagination.next([format]), Pagination.prev([format])
- added: utils.isRegExp(obj)
- updated: license
- updated: parsing of configuration: # and // is a comment
- updated: auto-vendor-prefixes (updated linear-gradient prioraty according to w3schools.com)
- updated: websocket.send(message, [id], [blacklist]), id and blacklist can be a function
- updated: controller.view400([problem])
- updated: controller.view403([problem])
- updated: controller.view404([problem])
- updated: controller.view501([problem])
- updated: controller.plain(contentBody, [headers]) - added JSON serialized for objects
- updated: controller.json(obj, [header], [beaufity]);
- updated: framework.usage([detailed]) - returns OBJECT
- updated: FrameworkCache.removeAll(search or regexp-pattern)
- updated: @{sitemap} is currently: @{sitemap()}
- updated: PageBuilder
- updated: @{template()} and controller.template() - default repository is controller repository
- removed: border-radius and box-shadow from auto-vendor-prefixes
- obsolete: Array.prototype.waiting()
- fixed: controller.view500()
- fixed: controller.proxy(), utils.request(), utils.download() - problem with NGINX, missing Content-Length header
- fixed: WebSocket skips throwing error (socket close, EPIPE)
- fixed: mail (SPAM fixes)
- fixed: buffer.write (new node => 0.11.11)
- fixed: IP and heroku deploy
- rewritten: view engine
- rewritten: template engine (according to view engine)
- improvements: views
- improvements: templates
- improvements: partial routing
IMPORTANT: framework.usage() returns OBJECT
IMPORTANT: markup of template is OBSOLETE. Templates support only view markup.
- EXAMPLE (NEW): https://github.com/totaljs/demo
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/heroku
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/controller-memorize
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/generators
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/routing-inline
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/problems
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/mongoose
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/pagination
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/templates
======= 1.1.0
- added: new feature COMPONENTS
- added: new feature MODELS
- added: framework.id
- added: framework.isDebug
- added: framework.isTest
- added: framework.model(name)
- added: framework.controller(name, definition)
- added: framework.functions
- added: framework.assert(name, callback)
- added: framework.assert(name, url, callback, method, data, headers, xhr)
- added: framework.injectComponent(name, url)
- added: framework.injectModel(name, url)
- added: framework.path.components([filename])
- added: framework.path.models([filename])
- added: controller.model(name)
- added: controller.$model - (property contains current model)
- added: flag: OPTIONS
- updated: framework.usage([detailed])
- updated: BINARY
- updated: WebSocket skips throwing error (ECONNRESET)
- fixed: framework.controller(name)
- fixed: // char in views and templates
- fixed: assertion testing
- fixed: mail attachment (fixed: line too long)
- fixed: "@charset" keyword in CSS
- fixed: cache-control header
- fixed: HTML conditional comments in views
- fixed: controller.cors(), fixed problem with preflight
- fixed: controller.empty() -> added 204 http status code
improvements: views (in release mode)
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/components
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/models
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/minimal
- EXAMPLE (NEW): https://github.com/totaljs/examples/tree/master/framework-functions
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/cors
- EXAMPLE (UPD): https://github.com/totaljs/examples/tree/master/cluster
======= 1.0.2 (HOTFIX)
- fixed: mail message (problem with diacritics in OUTLOOK)
======= 1.0.1 (HOTFIX)
- added: advanced template conditions
- fixed: builders.prepare()
- fixed: binary (command-line tools)
- fixed: views conditions