Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ne-handler

node-engine9SEE LICENSE IN readme.md1.1.6

Some utilities to use in Node Engine handlers

nodeEngine

readme

ne-handler (Node Engine Handler)

License

The MIT License (MIT)

Copyright (c) 2015 Bernard Hamann

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

changelog

ne-handler changelog

Change Tags

Feature

  • NF New feature: Added a new feature

Bug

  • BF Bug fix: Fixed a bug

Optimisation

  • OO Optimisation: The internal workings of the module is improved
  • OR Refactor: The internal code is refactored

Change

  • CI Input change: What is required as input for the module is changed
  • CO Output change: What is output by the module is changed

Dependencies

  • DN New Dependency: A new dependency is added to the package
  • DR Remove Dependency: A dependency is removed from the package
  • DU Update Dependency: A dependency is updated in the package

1.1.6

Release date: 28 Oct 2015

[CO] buildFormField field className changed and it added two classes

  • "ne-handler-field-" + dataName
  • "ne-handler-field"

1.1.5

Release date: 20151028

[BF] from 1.1.4

1.1.4

Release date: 20151028

[FN] neHandler.buildFormFields(dataName, object, dataRef, options)

  • Adding a utility to generate the form field code in handlers
  • dataName = the name of the model in the database
  • object = the object whose fields you want to generate the edit form fields for
  • dataRef = the complete dataRef object, the dataName is used to find the dataRef for this object
  • options.noEdit = if present and set to true then all the generated field will not be editable
  • options.editGroup = can specify to only generate fields for a specific editGroup
  • fields in the dataRef can be given editGroup names. Example editGroup: "anything"
  • each field has a className of "ne-data-field-" + dataName

Code Snippet inside a handler


var objectForFields = self.props.data.application[0];
var dataRef = self.props.dataRef;
var noEdit;
if(self.props.data.application[0] && self.props.data.application[0].status && self.props.data.application[0].status === "completed"){
    noEdit = true
}
else{
    noEdit = false
}

applicationForCurrentUser = element(
    "form", {action: "/data-alt/applications/edit", method: "post"},
    buildEditFields("applications", objectForFields, dataRef, {editGroup:"student", noEdit: noEdit}),
    element(
        "input",
        { type: "submit" , value: "Go"}
    )
);

1.1.3

Release date: 201510201

Removed 1.1.0

  • Caused too many bugs

1.1.2

Release date: 20151020

[DN] Added ne-auto-off package

1.1.1

Release date: 20151020

[BF] Fixes bugs caused by 1.1.0

1.1.0

Release date: 20151020

All require statements (BF DN)

  • When using ne-auto the require statements did not find the module
  • Are now conditional to be compatible with ne-auto
  • If there is a process.env.NE_AUTO then the require statements use the ne-auto if not then they require from root
  • Now this module will work with ne-auto and without ne-auto
  • DN tag because this is connected to dependencies