All Versions
55
Latest Version
Avg Release Cycle
8 days
Latest Release
1235 days ago

Changelog History
Page 3

  • v23.0.2 Changes

    July 01, 2020
    • config.tasks.queues can be a static array or an async function that returns list of queues #1512
    • โšก๏ธ update dependencies #1513
  • v23.0.1 Changes

    July 01, 2020
    • Await the import of Actionhero so it is simpler to modify env #1511
    • Do not encourage the use of the api object with generated initializers #1510
  • v23.0.0 Changes

    June 28, 2020

    What's New in v23 of Actionhero?

    ๐Ÿ“š Swagger API Documentation #1474

    ๐Ÿ“š For years, Actionhero has shipped with a showDocumentation action that provided a way to describe the actions running on your server. The action was used to self-document the abilities of your server. However, the format of that action was arbitrary... and not helpful in a larger ecosystem. Switching the format of this action to swagger/OpenAPI will make the Action much more useful!

    • ๐Ÿ“š Switch the showDocumentation action with swagger action. Remove all old references to showDocumentation
    • Include a new swagger.html and swagger action in generated projects which can consume and demo the API
    • โœ‚ Remove initializer/documentation, as we don't need this documentation internally without the old showDocumentation action.

    Screen Shot 2020-05-23 at 5 15 28 PM

    ๐Ÿ“š The breaking change is only around the showDocumentation and documentation initializer, which appears to not be used very much.
    ๐Ÿ†• New Actionhero projects going forward will be generated with the Swagger Action and HTML page, which can be seen here https://demo.actionherojs.com/swagger.html

    ๐ŸŒฒ Action and Task errors log on only one line #1505

    ๐ŸŒฒ Actions and tasks now log to one line in the file and other transports. The stack trace contains \n so it still is legible pretty in the console.

    Action

    # Console2020-06-25T00:48:24.045Z - error: [action @ web] to=127.0.0.1 action=broken params={"action":"broken","apiVersion":1} duration=1 error=TypeError: Cannot read property 'missing' of undefined stacktrace=TypeError: Cannot read property 'missing' of undefined at ValidationTest.run (/Users/evan/workspace/actionhero/actionhero/src/actions/broken.ts:14:27) at ActionProcessor.runAction (/Users/evan/workspace/actionhero/actionhero/src/classes/actionProcessor.ts:378:35) at processTicksAndRejections (internal/process/task\_queues.js:97:5)# File{"to":"127.0.0.1","action":"broken","params":"{\"action\":\"broken\",\"apiVersion\":1}","duration":1,"error":"TypeError: Cannot read property 'missing' of undefined","stacktrace":"TypeError: Cannot read property 'missing' of undefined\n at ValidationTest.run (/Users/evan/workspace/actionhero/actionhero/src/actions/broken.ts:14:27)\n at ActionProcessor.runAction (/Users/evan/workspace/actionhero/actionhero/src/classes/actionProcessor.ts:378:35)\n at processTicksAndRejections (internal/process/task\_queues.js:97:5)\n at WebServer.processAction (/Users/evan/workspace/actionhero/actionhero/src/classes/server.ts:229:18)","level":"error","message":"[action @ web]","timestamp":"2020-06-25T00:48:24.045Z"}
    

    Task

    # Console2020-06-25T00:38:03.840Z - error: error from task: task:busted on queue default (worker #1) arguments=[object Object] stacktrace=Error: NOPE at MyTask.run (/Users/evan/workspace/actionhero/actionhero/src/tasks/busted.ts:14:11) at Worker.perform (/Users/evan/workspace/actionhero/actionhero/src/initializers/tasks.ts:123:39) at Worker.perform (/Users/evan/workspace/actionhero/actionhero/node\_modules/node-resque/dist/core/worker.js:165:41) at processTicksAndRejections (internal/process/task\_queues.js:97:5)# File{"name":"task:busted","queue":"default","worker":1,"arguments":"{}","stacktrace":"Error: NOPE\n at MyTask.run (/Users/evan/workspace/actionhero/actionhero/src/tasks/busted.ts:14:11)\n at Worker.perform (/Users/evan/workspace/actionhero/actionhero/src/initializers/tasks.ts:123:39)\n at Worker.perform (/Users/evan/workspace/actionhero/actionhero/node\_modules/node-resque/dist/core/worker.js:165:41)\n at processTicksAndRejections (internal/process/task\_queues.js:97:5)","level":"error","message":"error from task","timestamp":"2020-06-25T00:48:28.478Z"}
    

    ๐ŸŒฒ This PR also adds support for logging custom Error properties, ie:

    import { api, Action } from "./../index";class AuthenticationError extends Error {code: string;constructor(message, code = "AUTHENTICATION\_ERROR") {super(message);this.code = code;}}export class ValidationTest extends Action {constructor() {super();this.name = "broken";this.description = "I am broken";this.inputs = {};this.outputExample = {};}async run({ params, response }) {throw new AuthenticationError(`broken`);}}
    

    ๐ŸŒฒ ... which will contain "code" in the log message along with the error.

    ๐ŸŒฒ Optionally log Action responses #1494

    ๐ŸŒฒ 2 new options now enable you to log the responses your actions send to consumers of your API

    • 0๏ธโƒฃ config.general.enableResponseLogging (bool) toggles this option on (off by default)
    • ๐Ÿ”Š config.general. filteredResponse (string[]) allow you to filter out certain parts of the response payload from the logs, hiding sensitive data.

    Screen Shot 2020-06-27 at 8 04 43 PM

    When using simpleRouting, the shown Swagger route is be GET #1506

    ๐Ÿ— Trim protocol from allowedRequestHosts when building swagger routes #1495

    And of course...

    • โšก๏ธ Update all dependencies to the latest versions.

    โฌ†๏ธ Upgrading to v23 of Actionhero

    ๐Ÿš€ This release is breaking for 2 reasons:

    1. The logger format for Action and Task errors has changed Pull Request. ๐Ÿ“š 2. The Documentation initializer and related showDocumentation action has been removed in favor of the new swagger action & middleware Pull Request.

    โšก๏ธ If you use automated log ingestion (i.e.: Splunk or a Winston logger) this PR should be helpful, as the error and stack trace will now all be on the same line... but you will need to update your log tools.

    ๐Ÿ“š If you had been using the Documentation middleware, you can re-build it yourself from api.actions.actions. If you want upgrade your Actionhero project to use the new Swagger documentation tooling, you need to copy in 2 files:

    ๐ŸŒฒ There are also new logging options to add to src/config/api.ts:

    • 0๏ธโƒฃ config.general.enableResponseLogging (bool) toggles this option on (off by default)
    • ๐Ÿ”Š config.general. filteredResponse (string[]) allow you to filter out certain parts of the response payload from the logs, hiding sensitive data.
  • v22.1.1 Changes

    June 01, 2020

    ๐Ÿš€ Release Notes

    • Adds a Code of Conduct for the Actionhero Community (#1483)
    • Type the api object. Adds Typescript definitions to the exported methods/objects in the api object (#1476)
    • Replace ActionheroWebsocketClient with fetch in example index.html. This way, the demo still works without the websocket server enabled (#1473)
    • Always rely on headers["x-forwarded-proto"] if present to detect request protocol (#1482)
    • ๐Ÿ‘€ Replace circleCI with Github actions. While both are free, Github Actions seem to have more stable servers, and error-out less. (#1441 and #1481)
    • โšก๏ธ Update dependencies. We new rely on @dependabot to automatically handle testing and alerting us about updates to our dependencies. So long @greenkeeperio-bot, thanks for all the PRs!

    Code of Conduct

    โœ… If you are in the USA, this week has been a difficult one. This has been a week of turmoil and protests catalyzed by (yet another) unjust killing of a citizen at the hands of of the people who should be protecting all of us. I try hard to not entangle this community with larger societal issues - to keep us focused only on code and APIs... but sometimes the real world intervenes.

    When thinking about what small things I can do to help ensure that the communities I'm a part of are open to all people, I realized that I've been negligent in drafting a Code of Conduct for our community. This PR adds a Code of Conduct that will govern those of us who work on Actionhero going forward, and to codify my goal of making our community as available as possible to the most people.

    I feel that it is also important to say that I've personally always had pleasant interactions with everyone in the Actionhero community. On the whole, I think we are a polite, smart, and diverse group of people. This document's aim is to keep our community that way! However, my experiences might not be the same as yours. As this Code of Conduct states - if you experience a problem with someone in the Actionhero community, please email [email protected] so we can address the the problem. There are tools available to us via the platforms we have chosen to use (Github, Slack, etc) to help with moderation, privacy, etc.

    I've chosen to base our Code of Conduct on the Contributor Covenant Code of Conduct, which has been adopted by almost 400,000 other open source projects.

    The Code of Conduct can be viewed here and will be included along with the source code for all future Actionhero releases.

  • v22.1.0 Changes

    May 13, 2020
    • Global api object via global (#1459)
    • โšก๏ธ Update Dependencies
    • โœ… Test node.js v14 in CI
    • ๐Ÿ›  Fix bug with task.ts.template (generated task tests)
  • v22.0.9 Changes

    May 05, 2020
    • ๐Ÿ›  Implement ignorable route prefixes for static and regexp routes (#1451)
    • โšก๏ธ Update Dependencies
  • v22.0.8 Changes

    April 29, 2020
    • ๐Ÿ‘ better debugging support (#1439 & #1440)
    • โšก๏ธ Update deps (#1443)
  • v22.0.7 Changes

    April 06, 2020
    • โž• Add debugging examples and dev scripts (#1428)
    • โšก๏ธ Update dependencies to latest versions
  • v22.0.6 Changes

    March 18, 2020
    • Hoist api.chatRoom.broadcast into chatRoom module (#1427)
    • โšก๏ธ Update dependencies (#1425) & (#1426)
  • v22.0.5 Changes

    March 12, 2020

    ๐Ÿ‘ Better Server Shutdown (#1424)

    • ๐Ÿšฆ provide a callback to app.registerProcessSignals which will be called when the app is fully shut down. This provides an explicit place to call process.exit(), which will in turn ensure that all sub-processes are exited too.
    • on a uncaughtRejection or uncaughtRejection, try to gracefully shut down the server with process.stop().
      • Wait process.env.ACTIONHERO_SHUTDOWN_TIMEOUT (or 30 seconds) and then process.exit()
    • only catch one uncaughtRejection or uncaughtRejection

    The recommended server.ts is now:

    import { Process } from "./index";// load any custom code, configure the env, as neededasync function main() { // create a new actionhero processconst app = new Process(); // handle unix signals and uncaught exceptions & rejectionsapp.registerProcessSignals(exitCode =\> { process.exit(exitCode); }); // start the app!// you can pass custom configuration to the process as neededawait app.start(); }main();