Releases: actionhero/actionhero
Releases · actionhero/actionhero
v3.0.10
Route parsing
You can now extract prams per HTTP(s) request from the route requested by the user via an included utility.
URL routes remain not being a source of RESTful parameters by default, however, you can opt to parse them:
var urlMap = ['userID', 'gameID'];
connection.params = api.utils.mapParamsFromURL(connection, urlMap);
- this is still left up to the action as the choice of which to choose as the default: query params, post params, or RESTful params is a deeply personal mater.
- if your connection is TCP or webSockets,
api.utils.mapParamsFromURL
will return null - map is an array of the param's keys in order (ie:
/:action/:userID/:email/:gameID
=>['userID', 'email', 'gameID']
) - the action itself will be omitted from consideration in the mapping
- these are equivalent: [
localhost:8080/a/path/and/stuff?action=randomNumber
] && [localhost:8080/randomNumber/a/path/and/stuff
]
Socket Communiaction
You can now pass a stringified-JSON message over TCP sockets to request an action to be preformed.
{"action": "myAction", "params": {"key": "value"}}
is now a valid request over TCP- params passed within an action's hash will NOT be 'sticky' to the connection, unlike paramAdd which remains 'sticky'
- general refactoring to the TCP codebase which will ensure that the state of params at the time of the action will be used when computing an action, and changes to the connection's state will not effect the action's execution
- these changes do not break the previous API, and sending single-line 'action' still works!
Bugs
- fixed bug where websocket clients would not return after a actionHero reboot; also allows for more than one socket.io binding point
- Fixed default room assignment for webSocket clients
- only respond with messageCount to TCP/webSocket clients when it is in response to a request they made
- tests for webSockets finally writen and passing
- added connection idle timeout to aid with HTTP(s) server shutdown
- fixed a bug where action generators with 0 params wold generate invalid js
v3.0.9
Development Mode
- actionHero now has a development mode! files in
/actions
and/tasks
will be watched for changes, and reloaded on the fly. - this uses fs.watchFile() and doesn't work on all OSs / file systems.
- new files won't be loaded in just yet, only existing files when the app was booted will be monitored
- as deleting a file might crash your application, we will not attempt to re-load delted files
- if you have changed the
task.frequency
of a periodic task, you will the old timer value will be in use until the event fires at least once after the change - Don't use this in production!
Bugs
- default config does not use redis again
v3.0.8
CLUSTER
- A new, production-ready cluster example (complete with unix signal handling and 0-down time reloads for code changes)
Bugs
- Stopping an actionHero node will remove himself from
actionHero:peerPings
- Cleaned up the colorizer within the logger
- Shutting down the actionHero when no servers were active to begin with returns true on
actionHero.stop()
- final message sent to TCP clients on disconnect or shutdown now matches, "Bye!"
v3.0.7
Action Cluster
- a new global hash, actionHero:peerPings, will store the last pings from each peer. They should ping every ~500ms. This can be used to detect when peers disappear
- disconnected peers are removed from the global list, and any tasks they were working on are re-enqueued
Bugs
- fixed a bug where using the generator to create a new action with no inputs would generate invalid syntax
- refactor redis name-space to be
actionHero:
rather thanactionHero:
- actionHero.restart now returns the api object on success
actionHero.restart(true, api)
v3.0.6
Chat Rooms
- Events Emitted when folks enter/leave the room you are in
Socket / WebSocket Clients
- New Method
detailsView
to retrieve information about yourself (including your public ID)
v3.0.5
File Server
- Files will now be served with a default cache-duration of 0 seconds. Setting added to configure this
- Default files for directories is still "index.html", but this is now configurable.
- accessing directories works without the trailing slash (IE: http://localhost:8080/public resolves the same as http://localhost:8080/public/)
- the
Cache-Controll
is returned along withExpires
header
Better Logging
- separation between file and action logging
- better shared syntax for all types of connections
- files log the path they were accessed from and duration
Project Organization
- You can now orginize your tasks and actions in sub-folders
- You can now symlink actions/taks into your project
- You can now symlink files in /public
General Bug Fixes
- better logic for including base config.json when you don't provide one
- updates for travis.ci
v3.0.4
General Bug Fixes
- fixed bugs regearding load order of initializers and user-added initializers
- fixed a bug introduced in the previous version which may double-enqueue tasks
v3.0.3
Notes
- Configuration to set how many task workers each actionHero node has. You now are required to set
api.configData.general.workers
- Added generators for actions and tasks
npm run-script actionHero generateAction
npm run-script actionHero generateTask
v3.0.2
General Bug Fixes
- fixed bugs where some tasks would not allow the task queue to continue even if they had been completed
- fixed a bug where non-redis tasks wouldn't be re-enqueued
- spelling
v3.0.1
Project Generator
- A project Generator!
- You can start up a new project in an empty directory with
npm install actionHero && npm run-script actionHero generate
. This will create project structure and copy in some default actions and tasks.
- You can start up a new project in an empty directory with
- Only tasks present in your project will be loaded (like actions). Now that there is a generator which will copy in some default actions, loading tasks within actionHero is not needed.
- Project reorganization per the above
- remove hredis from the project
- hredis is awesome, but this makes the project have less complex compiled dependencies. You should add it to your project if you want fast redis communication, but it isn't required for actionHero to function
- This release adds more configuration options to webSockets in the form of
api.configData.webSockets.logLevel
(integer) andconfigData.webSockets.settings
(which is an array strings which will be applied to socketIO's 'set' command)