{"_id":"kola","_rev":"30-d15f001c6666e877bc2d73fe756c0c4e","name":"kola","description":"Contextual object wiring framework","dist-tags":{"latest":"0.1.3"},"versions":{"0.0.0-alpha":{"name":"kola","version":"0.0.0-alpha","description":"global dependency manager","main":"kola.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","dependencies":{"stfu-signals":"0.0.3"},"devDependencies":{"dts-bundle":"^0.2.0","gulp":"^3.8.6","gulp-mocha":"^0.5.1","gulp-tsc":"^0.9.2","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"_id":"kola@0.0.0-alpha","_shasum":"8694a15601428c151989874916da1eb0f66ce243","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"staticfunction","email":"j.cabresos@gmail.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"8694a15601428c151989874916da1eb0f66ce243","tarball":"https://registry.npmjs.org/kola/-/kola-0.0.0-alpha.tgz","integrity":"sha512-9U+c2I30LstXASiREo52BouRHXjoeik7/QA5Agn5QygpYebHBUdPh53UI+xDT6Wg3pmsdvVoGvqHK6dVpih64Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHK9mIcvzDfzASDoFB3NJf8d3CyD5qXHCJzxLQ+qveD8AiAxERssIRvGRSmlToKwsDaL0prq/KtLLxhorN863Ruz5w=="}]}},"0.0.1-alpha":{"name":"kola","version":"0.0.1-alpha","description":"global dependency manager","main":"kola.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","dependencies":{"stfu-signals":"0.0.3"},"devDependencies":{"dts-bundle":"^0.2.0","gulp":"^3.8.6","gulp-mocha":"^0.5.1","gulp-tsc":"^0.9.2","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"_id":"kola@0.0.1-alpha","_shasum":"06e7844e30af34266fa5db3c2ea1c2f36e1925e2","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"staticfunction","email":"j.cabresos@gmail.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"06e7844e30af34266fa5db3c2ea1c2f36e1925e2","tarball":"https://registry.npmjs.org/kola/-/kola-0.0.1-alpha.tgz","integrity":"sha512-EUTMtENDAnqaql0PQK2Fu7CZ601FN3irMZ0rsR9Wd1Ul754WCaaFfhZI0fYm+R96J19Z316Fdha1PScvMDz9JA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpVr1GHBAPGSwB29npxqpRkz4QUDflejlp34sHy9lhWAiACntV9PJRjtuF3f3GBzg2fw7geh/xNTOmV5E6oQKtB2g=="}]}},"0.0.3-alpha":{"name":"kola","version":"0.0.3-alpha","description":"global dependency manager","main":"kola.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","dependencies":{"stfu-signals":"0.0.4"},"devDependencies":{"dts-bundle":"^0.2.0","gulp":"^3.8.6","gulp-mocha":"^0.5.1","gulp-tsc":"^0.9.2","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"_id":"kola@0.0.3-alpha","_shasum":"01c3aa783eccca4a55884916ece8331bd500797e","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"staticfunction","email":"j.cabresos@gmail.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"01c3aa783eccca4a55884916ece8331bd500797e","tarball":"https://registry.npmjs.org/kola/-/kola-0.0.3-alpha.tgz","integrity":"sha512-SpvOXUYSUxauA74XPjK2PK3rB3mPW+wnWFIrwVdxTmBtVYt7SpeYvOXkqEPrJiEph36aB/R1mP+KGXUbv1+lFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxUqF98fMlB5ngZhLFX3kiytl++r6ZYdKnZwO+k0eYvwIgNSXRCuCwSfgi95rV1UojGNxESSqHCz52tFArZMC7wmo="}]}},"0.1.0":{"name":"kola","version":"0.1.0","description":"global dependency manager","main":"dist/kola.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","dependencies":{"stfu-signals":"0.0.4"},"devDependencies":{"dts-bundle":"^0.2.0","gulp":"^3.8.6","gulp-mocha":"^0.5.1","gulp-tsc":"^0.9.2","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"gitHead":"a112992670a560f351d37d3c0719a3fdf49ce690","_id":"kola@0.1.0","_shasum":"195096d5129088f48fa0bab43434d7c87d1439d4","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"staticfunction","email":"j.cabresos@gmail.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"195096d5129088f48fa0bab43434d7c87d1439d4","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.0.tgz","integrity":"sha512-Tg8LdYqrvqmFh4gSEsYhauwG+BMdLZLscxnMxpwyJ3CZ/Y/RFDqFyteUdBf778sqbqcShxe4Ek6T1J2KLmHH5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH0Cvt+elUuDmSiN82L2LC245YBmGUmpAO286qM8gTt+AiAf8+ljlKg4RthsqseBWaTG2O3bLe0ktUkQpmlFTcd69A=="}]}},"0.1.1":{"name":"kola","version":"0.1.1","description":"global dependency manager","main":"dist/kola.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","dependencies":{"stfu-signals":"0.0.4"},"devDependencies":{"dts-bundle":"^0.2.0","gulp":"^3.8.6","gulp-mocha":"^0.5.1","gulp-tsc":"^0.9.2","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"gitHead":"0b048ced0ada018a37a74128f072f9492cc33fce","_id":"kola@0.1.1","_shasum":"ffb8d781ffe360d8f703728bcfcf0e60e48148a7","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"staticfunction","email":"j.cabresos@gmail.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"ffb8d781ffe360d8f703728bcfcf0e60e48148a7","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.1.tgz","integrity":"sha512-QdKQGM5Hu31zLY4ZC2f8usRPQ1bObeGRtaZzV1pI4N2XiiLKi3ZwJ7InuKBfSfNo4UzNV/yJNEW7Ye1X2ObWjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbWNgwrDJSeozBvuykS9WAiH0YnnFOpiXMONYt5OtaVQIhAOyIzKj7EVpJP5JI1F7Y3mgz5ZPaVC7OrPYEes+n7uuv"}]}},"0.1.0-rc1":{"name":"kola","version":"0.1.0-rc1","description":"global dependency manager","main":"dist/kola.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","dependencies":{"kola-signals":"0.0.1"},"devDependencies":{"kola-hooks":"0.0.1","dts-bundle":"^0.2.0","gulp":"^3.8.6","gulp-mocha":"^0.5.1","gulp-tsc":"^0.9.2","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"gitHead":"51cddf2c92b430f20897a9c488093c9dd1e36abd","_id":"kola@0.1.0-rc1","_shasum":"5e9cb22eaccb915950292c0ebc042f08910f50af","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"staticfunction","email":"j.cabresos@gmail.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"5e9cb22eaccb915950292c0ebc042f08910f50af","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.0-rc1.tgz","integrity":"sha512-/2QXS5DVjg8ko3JpuS/sAsK5WHjEDZvWcO6jtrS7SVEK1l9+ZFE/ULpmqUXKGmly3qIvOua3HoflZ8EvSex9aQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICh0rqeMZLASwqaYBk0o+j22eKXhmnhTq8LY9RxncKklAiBFSZs6yYxsE5JG4P0e5p9hEzng8Ixh/vKV96t4abAwfg=="}]}},"0.1.0-rc2":{"name":"kola","version":"0.1.0-rc2","description":"global dependency manager","main":"dist/kola.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","dependencies":{"kola-signals":"0.0.1"},"devDependencies":{"kola-hooks":"0.0.1","dts-bundle":"^0.2.0","gulp":"^3.8.6","gulp-mocha":"^0.5.1","gulp-tsc":"^0.9.2","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"gitHead":"76cf3801ff9e0008229372a78034987b9f679329","_id":"kola@0.1.0-rc2","_shasum":"226f8c830e8f4fb9febf654d9cb76819774e7d2c","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"staticfunction","email":"j.cabresos@gmail.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"226f8c830e8f4fb9febf654d9cb76819774e7d2c","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.0-rc2.tgz","integrity":"sha512-YGpoyu1Pnz6Eyy7oSt2XuzPT12ip1LNv/mlVVZYSafIgkDX529F4Zzr+/Zb9KNNUov6fN+YNSbAGtmpQsDllEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC1qN1qq2OQwKeS+r4UnNdCzGQwTPz6kn/NIYt9sXt92AiAkoAhvolnaVbGAyZYCk9bhGwI0ph+z6nUzEPM4ESWhxQ=="}]}},"0.1.0-rc3":{"name":"kola","version":"0.1.0-rc3","description":"global dependency manager","main":"dist/kola.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","dependencies":{"kola-signals":">=0.0.1"},"devDependencies":{"del":"^1.1.1","gulp":"^3.8.11","gulp-filter":"^2.0.2","gulp-insert":"^0.4.0","gulp-mocha":"^0.5.1","gulp-replace":"^0.5.3","gulp-typescript":"^2.4.2","kola-hooks":"0.0.1","merge2":"^0.3.1","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"gitHead":"e7c3e706cc7417f4d429acbfee950c84d48eba36","_id":"kola@0.1.0-rc3","_shasum":"c6bfde12ba48ca8207e350fdb8f8657c8f87a89d","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"staticfunction","email":"jamesroland@dwimmyfactory.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"c6bfde12ba48ca8207e350fdb8f8657c8f87a89d","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.0-rc3.tgz","integrity":"sha512-1hh6BcNGojC+x5Gydl4k1LI9tGBgT2kWNuVeFhRt/u9tQtFJDdrx60mgCZBEw2Y0Ny1lpH4QvNNG12CRJ7gs9g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzMz4ws4oXs4pRVHLFjjssomQwPv9decCPCbf/F+myfgIgfaVns4BLbQb/kNr6F7e9GeaAY2uSRFgVMTVY5k/Jcxg="}]}},"0.1.0-rc4":{"name":"kola","version":"0.1.0-rc4","description":"Contextual object wiring framework","main":"dist/kola.js","scripts":{"test":"gulp test"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"repository":{"type":"git","url":"https://github.com/staticfunction/kola"},"license":"MIT","dependencies":{"kola-signals":"^0.1.1"},"devDependencies":{"del":"^1.1.1","gulp":"^3.8.11","gulp-filter":"^2.0.2","gulp-insert":"^0.4.0","gulp-mocha":"^0.5.1","gulp-replace":"^0.5.3","gulp-typescript":"^2.4.2","kola-hooks":"0.0.5","merge2":"^0.3.1","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"gitHead":"ea76b1c8e35ee5e619fb1451f9929e31038f564a","bugs":{"url":"https://github.com/staticfunction/kola/issues"},"homepage":"https://github.com/staticfunction/kola","_id":"kola@0.1.0-rc4","_shasum":"9c0393f4801dd8f4e7fe5003de91d8fecc15c028","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"staticfunction","email":"jamesroland@dwimmyfactory.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"9c0393f4801dd8f4e7fe5003de91d8fecc15c028","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.0-rc4.tgz","integrity":"sha512-WcSRyekZ8+ckMQ90csAPunk5+FC91HB5iif66ooEpxB95Rx1uW103L/IS78F7mAw0VGNMgxeFuTNqOUmKCiBYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGgrJY/0Oa0liBZHxwtzCRG7HcImRCOjZt10fGdWZXP2AiBR06qxUMbH0R/EdM96/mrJmrCEYimTBjxmeeqJbdnDUw=="}]}},"0.1.0-rc5":{"name":"kola","version":"0.1.0-rc5","description":"Contextual object wiring framework","main":"dist/kola.js","scripts":{"test":"gulp test"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"repository":{"type":"git","url":"https://github.com/staticfunction/kola"},"license":"MIT","dependencies":{"kola-signals":"^0.1.1"},"devDependencies":{"del":"^1.1.1","gulp":"^3.8.11","gulp-filter":"^2.0.2","gulp-insert":"^0.4.0","gulp-mocha":"^0.5.1","gulp-replace":"^0.5.3","gulp-typescript":"^2.4.2","kola-hooks":"0.0.5","merge2":"^0.3.1","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"gitHead":"a7271e980744e6471435336f46eac79ecfd531dc","bugs":{"url":"https://github.com/staticfunction/kola/issues"},"homepage":"https://github.com/staticfunction/kola","_id":"kola@0.1.0-rc5","_shasum":"7530e9b7f98cb6fa8e39a387a3d9e56445c78fa5","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"staticfunction","email":"jamesroland@dwimmyfactory.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"7530e9b7f98cb6fa8e39a387a3d9e56445c78fa5","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.0-rc5.tgz","integrity":"sha512-nJtMAe3EjlBV/8w5BUt9v14XwhAEVqrDJT269sUAdZAyksqWOgjwl8kbX9uYs8UjWZYuuUL0MA3C19PXJEo7vw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBYO8iDAHE3OPk4mzJKFQWWBr5eOC6j6mQV2VyeRkyGwIhAO5PEPSMQznZM8/izJaINWJRxcxdUNI8lDODLfGucoyF"}]}},"0.1.2":{"name":"kola","version":"0.1.2","description":"Contextual object wiring framework","main":"dist/kola.js","scripts":{"test":"gulp test"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"repository":{"type":"git","url":"https://github.com/staticfunction/kola"},"license":"MIT","dependencies":{"kola-signals":"^0.1.1"},"devDependencies":{"del":"^1.1.1","gulp":"^3.8.11","gulp-filter":"^2.0.2","gulp-insert":"^0.4.0","gulp-mocha":"^0.5.1","gulp-replace":"^0.5.3","gulp-typescript":"^2.4.2","kola-hooks":"0.0.5","merge2":"^0.3.1","mocha":"^1.20.1","should":"^4.0.4","sinon":"^1.10.3"},"gitHead":"1a18b41eb3fdbdc0fae386a28dc03eaf9208e632","bugs":{"url":"https://github.com/staticfunction/kola/issues"},"homepage":"https://github.com/staticfunction/kola","_id":"kola@0.1.2","_shasum":"60b2e1092a38f155b5a70d67d2a414d81acfbd2f","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"staticfunction","email":"jamesroland@dwimmyfactory.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"60b2e1092a38f155b5a70d67d2a414d81acfbd2f","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.2.tgz","integrity":"sha512-dwhSu0fQLeJD9rPFKtGDK70ZT2QfGIntsKRu4M+so3NnqHDL1XLsKZUFpxloPmMSvWEwyw2F5jIg0J0TrzNf/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGyyJHBhlgluTOuTN5+CsXPh6UAHrassvjTJG6FNP5ggIhAKSgPhZxU5sPRRgqZMOyfYA+SoZWns6lBOgLQRAxoSxi"}]}},"0.1.3":{"name":"kola","version":"0.1.3","description":"Contextual object wiring framework","main":"dist/kola.js","scripts":{"test":"gulp test"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"repository":{"type":"git","url":"https://github.com/staticfunction/kola"},"license":"MIT","peerDependencies":{"kola-signals":"^0.1.x"},"devDependencies":{"del":"^1.1.1","gulp":"^3.8.11","gulp-filter":"^2.0.2","gulp-insert":"^0.4.0","gulp-mocha":"^2.1.0","gulp-replace":"^0.5.3","gulp-typescript":"^2.7.5","kola-hooks":"^0.0.5","merge2":"^0.3.5","mocha":"^2.2.5","should":"^6.0.3","sinon":"^1.14.1"},"gitHead":"a5f3367638dbf98829d009a1d7fd79ec5dd202c1","bugs":{"url":"https://github.com/staticfunction/kola/issues"},"homepage":"https://github.com/staticfunction/kola","_id":"kola@0.1.3","_shasum":"f0a769ca569c49cb49831b81525b232bcf4e5f2e","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"staticfunction","email":"jamesroland@dwimmyfactory.com"},"maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"dist":{"shasum":"f0a769ca569c49cb49831b81525b232bcf4e5f2e","tarball":"https://registry.npmjs.org/kola/-/kola-0.1.3.tgz","integrity":"sha512-Mu5NnVE9sA8NI/ntUsIOiNOBAVBteUA/lkgj0jkFBXVKju1cIwA/h16wEJMuvT/4L4BlJ1g7OTJz4EEYugp1xA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA8Zw1spS+ZIpplRCuvb7ycAJjnhuJHHSX8++TV6z6xQIgUrG3p9BQ4BslnNmDPvHFP4T3vFtcfu4QixGdfB+74UQ="}]}}},"readme":"# Kola\n\n```shell\n    npm install kola --save\n```\n\n# Getting Started\n\n### App\nEverything is an app in kola. To create an app, you extend kola.App and define your application's startup paramater type.\nHere we have a MailingList App that will accept any object that has a property *host* of type *string*\n\n```typescript\n\nimport kola = require(\"kola\");\n\nexport class MailingList extends kola.App<{host: string}> {\n\n}\n\n```\n\n### App.initialize(kontext: kola.Kontext, opts?:T)\nThis is where you can setup your application's kontext. The opts parameter is the one being passed through App.start(opts);\n\n```typescript\n\nimport kola = require('kola');\nimport hooks = require('kola-hooks');\n\nclass MailingList extends kola.App<{host: string}> {\n\n    initialize(kontext: kola.Kontext, opts?: string): void {\n        kontext.setSignal<{email: string}>('register',\n                                hooks.executes([cmd.validateEmail, cmd.registerEmail, cmd.congratulateUser])\n                                    .breakChainOnError(true),\n                                    .onError(cmd.apologizeToUser)\n                                );\n\n        kontext.setSignal<{email: string}>('unregister',\n                                hooks.executes([cmd.validateEmail, cmd.unregisterEmail])\n                                    .breakChainOnError(true),\n                                    .onError(cmd.apologizeToUser)\n\n        kontext.setInstance('service.mailingList', () => {\n            return new MailingListService()\n        }.asSingleton();\n    }\n\n}\n\n```\n## Kontext\nThe Kontext is where you can store instances and signals for your application.\n\n### Kontext.setSignal(name: string, hook: Hook<T>): SignalHook<T>\nKontext.setSignal() allows you to define a signal name and a hook which is any object that implements Hook<T>. This will\nreturn a SignalHook<T> instance where you can define if this hook should only run once.\n\n```typescript\n    kontext.setSignal<any>('initialize', {\n        execute: (payload: any, kontext: Kontext) => {\n            //do funky initialization stuff here!\n        }\n    }).runOnce(); //run initialization only once\n```\n\nThere is [kola-hooks](https://github.com/staticfunction/kola-hooks) which you can use as a factory to create your hook.\n\n## Kontext.getSignal(name: string): signals.Dispatcher<T>\nThis will return an instance of signals.Dispatcher with the name you've define in setSignal(). This will return null\nif you haven't define any.\n\n## Kontext.setInstance<T>(name: string, factory: () => T): void\nKontext.setInstance() allows you to define a factory with a given name. This returns a KontextFactory<T> instance where you\ncan set if the factory is singleton or not.\n\n```typescript\n\nkontext.setInstance<MailingListService>('service.mailingList', () => {\n    return new MailingListService();\n}).asSingleton(); //returns only one instance.\n\nkontext.setInstance<Request>('service.request', () => {\n    return new Request();\n}) //returns a new instance everytime you call kontext.getInstance()\n\n```\n\n\n### App.start(opts?: T): kola.App<T>\nIt is where you can pass arguments for your application to use before it sets up the kontext.\n\n## App.onStart(): void\nThis is called after initialization. This method is meant to be overridden by the application to do custom behaviour when\napplication starts.\n\n\n## App.onStop(): void\nThis is called when App.stop() is called. This method is meant to be overridden to do custom behaviour when application stops.\n\n# Multiple App and Kontext\nWhen creating a kola App, you can choose whether to extend another App or a standalone. By extending another App you get\nto inherit all its Kontext instances and signals.\n\n```typescript\nimport parent = require('./parent/app');\nimport child = require('./child/app');\n\nvar parentApp = new parent.App();\nvar childApp = new child.App(parentApp); //this enables us to inherit instances and signals from parent.\n\n```\n\n## Kontext.setInstance() on a child App\nWhen you set an instance in a child App, that instance will only be available to that child. Even if you try to set it with a\nkey that has the same name in the parent.\n\n## Kontext.getInstance() from a child App\nAs everything is inherited from the parent, getting an instance with a key that was define in the parent will return you\nan instance from that parent. The logic when getting an instance is that it would check first locally if a factory is define for\nthat instance otherwise it would check its parent. If you have a deep hierarchy of apps, the check will be perform recursively until\nit finds the factory or until it reached its root parent.\n\n\n## Kontext.setSignal() on a child App\nSetting a signal works differently from setting an instance. When you set a signal, it checks first if that signal is already\ndefined in the current Kontext and if you have a hierarchy of apps, it will recursively look for that signal until it reaches the root. When\nit finds one, it will Kontext will create a SignalHook for that signal. Otherwise a new signal instance is created for the current Kontext.\n\n## Kontext.getSignal() on a child App\nSame as getInstance, you'll be able to inherit signals from parent.","maintainers":[{"name":"staticfunction","email":"j.cabresos@gmail.com"}],"time":{"modified":"2022-06-19T09:42:47.641Z","created":"2014-09-05T07:45:46.428Z","0.0.0-alpha":"2014-09-05T07:45:46.428Z","0.0.1-alpha":"2014-10-20T05:49:02.931Z","0.0.2-alpha":"2014-10-29T06:34:20.717Z","0.0.3-alpha":"2014-10-29T06:37:59.184Z","0.1.0":"2015-02-03T01:40:09.287Z","0.1.1":"2015-02-03T03:41:25.668Z","0.1.0-rc1":"2015-02-12T06:36:41.993Z","0.1.0-rc2":"2015-02-12T07:21:18.128Z","0.1.0-rc3":"2015-03-11T08:40:45.710Z","0.1.0-rc4":"2015-03-18T02:32:17.594Z","0.1.0-rc5":"2015-03-18T19:16:31.577Z","0.1.2":"2015-03-22T12:02:21.858Z","0.1.3":"2015-05-25T01:23:59.393Z"},"author":{"name":"James Roland Cabresos","email":"jamesroland@dwimmyfactory.com","url":"http://github.com/staticfunction"},"license":"MIT","readmeFilename":"README.md","users":{"staticfunction":true},"homepage":"https://github.com/staticfunction/kola","repository":{"type":"git","url":"https://github.com/staticfunction/kola"},"bugs":{"url":"https://github.com/staticfunction/kola/issues"}}