mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-13 04:00:35 +08:00
added annonymous session cleanup at startup
This commit is contained in:
30
HISTORY.md
30
HISTORY.md
@@ -3,23 +3,25 @@
|
||||
## 0.7.0
|
||||
|
||||
### New Features
|
||||
- New utilities for extending Resource Types.
|
||||
- Added `Resource.extend("ResourceName", { /* members */ })` syntax for extending Resources. The `init()` function is used as a constructor. The old `util.inherits()` syntax will continue to work.
|
||||
- Moved `Resource` base class to the exports of the deployd module. You can now use `require('deployd').Resource` instead of `require('deployd/lib/resource')`.
|
||||
- Added `get(ctx, next)`, `post(ctx, next)`, `put(ctx, next)`, and `del(ctx, next)` utility functions on `Resource`. You can now override those instead of `handle()`.
|
||||
- New `Module` type in extension API
|
||||
- Modules can define multiple Resource Types with `this.addResourceType()`
|
||||
- [TODO] Modules can register their own dashboards.
|
||||
- Added `dir` to server options - for booting in other directories than `process.cwd()`.
|
||||
- Resources now support custom events by default
|
||||
- New collection permission api
|
||||
|
||||
- New utilities for extending Resource Types.
|
||||
- Added `Resource.extend("ResourceName", { /* members */ })` syntax for extending Resources. The `init()` function is used as a constructor. The old `util.inherits()` syntax will continue to work.
|
||||
- Moved `Resource` base class to the exports of the deployd module. You can now use `require('deployd').Resource` instead of `require('deployd/lib/resource')`.
|
||||
- Added `get(ctx, next)`, `post(ctx, next)`, `put(ctx, next)`, and `del(ctx, next)` utility functions on `Resource`. You can now override those instead of `handle()`.
|
||||
- New `Module` type in extension API
|
||||
- Modules can define multiple Resource Types with `this.addResourceType()`
|
||||
- [TODO] Modules can register their own dashboards.
|
||||
- Added `dir` to server options - for booting in other directories than `process.cwd()`.
|
||||
- Added `errorTemplate` to server options - for overriding the default error template.
|
||||
- Resources now support custom events by default
|
||||
- New collection permission api
|
||||
|
||||
|
||||
### Breaking Changes
|
||||
- Most configuration properties on the `Resource` class have been moved to the prototype: `external`, `events`, `basicDashboard`, and `dashboard`.
|
||||
- The `label` and `defaultType` properties will remain on the constructor, as they shouldn't be inherited.
|
||||
- The configuration option `Resource.events` has been renamed `Resource.eventNames`.
|
||||
|
||||
|
||||
- Most configuration properties on the `Resource` class have been moved to the prototype: `external`, `events`, `basicDashboard`, and `dashboard`.
|
||||
- The `label` and `defaultType` properties will remain on the constructor, as they shouldn't be inherited.
|
||||
- The configuration option `Resource.events` has been renamed `Resource.eventNames`.
|
||||
- Anonymous sessions are now destroyed every time the server starts.
|
||||
|
||||
### Major Bugfixes
|
||||
|
||||
@@ -41,6 +41,9 @@ function SessionStore(namespace, db, sockets) {
|
||||
}
|
||||
|
||||
Store.apply(this, arguments);
|
||||
|
||||
// clear annonymous sessions
|
||||
this.remove({uid: {$exists: false}});
|
||||
}
|
||||
util.inherits(SessionStore, Store);
|
||||
exports.SessionStore = SessionStore;
|
||||
|
||||
Reference in New Issue
Block a user