{"_id":"treeflow","_rev":"35-be5d016153bd9d3e4b555ec418b03c7e","name":"treeflow","description":"Flow sequential dependant and independant","dist-tags":{"latest":"0.1.7"},"versions":{"0.0.1":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.0.1","dependencies":{"winston":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"treeflow\n========","readmeFilename":"README.md","_id":"treeflow@0.0.1","dist":{"shasum":"03a9aebe9e5ad70d2a100f4894a4b600496dd446","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.0.1.tgz","integrity":"sha512-pL8JHKx6IpROaP8qMSGb/nmRnA5XngaHdJrK/H4OdPtCZ7QywSnppFrg1bqtZLBd5PYrUx5U1gFRLa1iZpXFFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6XZ+ui2dAW3AB69RPRgK06XeSApJMqEGg0MUfN7gKIgIgLVAVDadEW93C3IqmWpob3A9jy48SDTKs1pEQDmH1oNo="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.0.2":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.0.2","dependencies":{"winston":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"treeflow\n========","readmeFilename":"README.md","_id":"treeflow@0.0.2","dist":{"shasum":"64e8c14ae9cef4f7044ebc75e12f727de751c2f1","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.0.2.tgz","integrity":"sha512-Qa83UYJLiRslffM0WS826spStFAmE9/lZkXjkUC082l/YKnAi3SiWvfhR4FtHur89Gr9IgfV/uABmoygSyL23A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIENM/Gy1ZHCeGbp9uIvwIMW8yukRDLVZuV5fKb6rXJXNAiBt08sQpHEBaA4Xzn8k8pvsjSnPNDrcwUQSP6iTs3gwSA=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.0.3":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.0.3","dependencies":{"winston":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"treeflow\n========","readmeFilename":"README.md","_id":"treeflow@0.0.3","dist":{"shasum":"98d0ef62f33300883c1aae40546c1c3ba3193252","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.0.3.tgz","integrity":"sha512-OQTmRs8Zdm8CHRv0jDEY6bzEAvFKmUbmUEtIQ6L1Xnar8IY4hOSiuFbgiDX4bM+d9Qfq0CMSg3YaBu7Pd9J6Iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIESxP5K7zePxq5JbcKMM9L+d5xA6wjw+8aJrjl5L2G0aAiB1q0oLfuh0bbGxgjQWDih4tN3ve9IE1gVW3HX3X1fn6A=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.0.4":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.0.4","dependencies":{"winston":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"treeflow\n========","readmeFilename":"README.md","_id":"treeflow@0.0.4","dist":{"shasum":"4ef640307f8ab31bcad35e2653ad161f34a5d39c","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.0.4.tgz","integrity":"sha512-NJTZi/F0d+htnFoSV+AUALR3QbAKhQBPj+KVFNWkkAMhZnGzA9gH1gMrSQ5V924Xleam3KsBp6qRyUkn/z/27A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXuSIuaobJ9sp0CpUMFz5r9CTGwDntOTbDfhcrttuY2gIhALxHFxLfKl63+vUWbgvR+co+xhpxnekxeG1hzKPsBjgs"}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.0.5":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.0.5","dependencies":{"winston":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"treeflow\n========","readmeFilename":"README.md","_id":"treeflow@0.0.5","dist":{"shasum":"66eabf4c6ff81faafd7b47fa6615ce9ea3d0a62c","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.0.5.tgz","integrity":"sha512-Jl2thYiX3U97aFOuaR02ZS4WqYxxDy1a9+0PFCLXgfFe/LmUDp2BSZ7CpSM87nMD0Pmz86iA121BvUTQ0uSVyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTm1RydORIKmXzoMHt8xWPcK8I6BzMQ7B5McUPnpLkTQIhAKzcNu2tCJ0Xu7L6rEX7ddk3Lf+l3/d42SF7eLzgKFbQ"}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.0.6":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.0.6","dependencies":{"winston":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independant\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independant\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independant\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.\n\n\n","readmeFilename":"README.md","_id":"treeflow@0.0.6","dist":{"shasum":"cb369c410636c8dff63fbdcc06d16a4a94b7568a","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.0.6.tgz","integrity":"sha512-jQm9I8W6uqsmobn9eFNcrtjX8IBtm0BbY7FCJXRomECShqj/JWgdkBQ/KoGW5lELVPzJmpk3NQSjSggdPfaA9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy+K8p/cOh8LCCeJXbrDHbP0nVL4L0kHFDQxQM43gitQIgJ2Sr0kf7dIuU0cnKUuUWieTxCKJf3f/C4sAsg0nXCRQ="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.0.7":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.0.7","dependencies":{"winston":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independant\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independant\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independant flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independant\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.0.7","dist":{"shasum":"266f9ff2b50208af6ef3edfa5d3211c49c86d7f0","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.0.7.tgz","integrity":"sha512-qj7hWXneaow1UfmocefWywYW+PqV0PCKf64uqxWn2QWP+L1oU6HwEx3K6JlITajwZvt6XuJUFG9HS8nKgjcFXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJtE+dlqr4+lBbIQ6TNPrUIbbHO7vqFBPkV4yqgQfJGAiBpAL67mQuAiQnLuHqXm1U/2rP0FSAggap/cBYeSBO7fQ=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.0.9":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.0.9","dependencies":{"winston":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independent\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independent\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independent\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.0.9","dist":{"shasum":"7f3e05e4d6f198d47e41577d43e0a474516a8167","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.0.9.tgz","integrity":"sha512-pp/tCsfUaJtcu7/DDR8ZFar4wjj7VoteaNc3LbPIggYxGusZeNNR/G304yw9pwqGVNbqeq4cp091nv10L+xOGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCn+JNDZ8emaDj7tUsDpev36yal05i4Ioj+7wcgF16LQAIhAOluBTSooRgMGC5Yni9eN2GJ3nTUq6v1lwpAVN9OM9NY"}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.1.0":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.1.0","dependencies":{"cloneextend":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independent\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independent\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independent\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.1.0","dist":{"shasum":"8dd07965745b10f0d8b9864ca0329f8ba735e83c","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.1.0.tgz","integrity":"sha512-vBOQFHLNyUL7ER0I/g1vFHnUQP5crbOH4xHROBGqLOWOsgdR2PzgFguM4G37isy1udFAoFt4ICesY1W4TWZ9Qw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBe3MEyFmCC96Pra8g1BCam5T3Bdav2OHNHpOoJYfJlCAiAZarcyHO68UgcxmvuIN4hGM5OiesFIC+Gdvl5xn3noPw=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.1.1":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.1.1","dependencies":{"cloneextend":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independent\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independent\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independent\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.1.1","dist":{"shasum":"fd53f75aab27ceefd5f9040096fbf4785ca88800","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.1.1.tgz","integrity":"sha512-YCtyguH36s1GkgvABtCGTDnpIwRJ2nBGRBBzAaKSsuDlIf1fNF26PkC5P+oEpDSXs+1aH1GzxbUnJTzijBvUkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwNrBF/0PbH6Xxj0U4JNXahFGro8d1qzD9jBIFtajcsAiBeQG3rykkMiVug4gczsl04QCrFuyJpZ/VKW62SJhOI7Q=="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.1.2":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.1.2","dependencies":{"cloneextend":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independent\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independent\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)`\n*   stop() : Stop the flow ans emit `stop` event\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n*   stop : Event emits when treeflow.stop()` is called\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independent\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.1.2","dist":{"shasum":"904d6791ced5bd1ae59fcb5026447af74c6678a9","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.1.2.tgz","integrity":"sha512-kqytEh3AQIdpPGWDM9s+Zi1NciG2t7BGhHZDz8X/A4vYY5PVYfX+BNiXC/xdp6QhQhNLrAtXbNxhUXUCNiqeRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG39PuJp8e1rd5+wUh6ppmMSFCCzFatGzsa3t1jHXBjRAiEAsAMCM0uEdZFLPzGOOvQmdlFNasGstQOfEdwBt0tuKp0="}]},"_npmVersion":"1.1.66","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.1.3":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.1.3","dependencies":{"cloneextend":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independent\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independent\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)`\n*   stop() : Stop the flow ans emit `stop` event\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n*   stop : Event emits when `treeflow.stop()` is called\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independent\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.1.3","dist":{"shasum":"b2a5639acc63df8bc582d1dc49609aa711bed662","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.1.3.tgz","integrity":"sha512-UgjHI6P1ehi8X1p81R6hGYgdLFNtij6FP7z8A46LwMRyDV/pFR3uDtvUi3wdHi4/sGROl1YelYyriOAM8ZGflQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCILrDbLGphgNqz5+UKYhHsgvqYK8ULuNYeR2kszoM+hgIhAP4WWS7k3z4yFnviE6zy8f/6Xirs/htUXyYrqYUTuf6N"}]},"_from":".","_npmVersion":"1.2.7","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.1.4":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.1.4","dependencies":{"cloneextend":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independent\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independent\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)`\n*   stop() : Stop the flow ans emit `stop` event\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n*   stop : Event emits when `treeflow.stop()` is called\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independent\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.1.4","dist":{"shasum":"e4198ad2d2127f22326e8386cbba395fd65cad7a","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.1.4.tgz","integrity":"sha512-Mdqvx8b4LeqEkXxBC141Xwu5D1KECTRkpaWsLMYvYHLvMr7hC1kV6MXPy4u1m5SqMIXYKXzrOSoRrXrdXZ5reQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtGEpN0kWSe5EzaKg4aFyflWD2HdftUR1ged634lU9pQIhAMo25kjBu/V/1U0bhKYQRiPg8iV65VKhDRNZoLud9Jow"}]},"_from":".","_npmVersion":"1.2.7","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.1.5":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.1.5","dependencies":{"cloneextend":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independent\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independent\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)`\n*   stop() : Stop the flow ans emit `stop` event\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n*   stop : Event emits when `treeflow.stop()` is called\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independent\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.1.5","dist":{"shasum":"b87d24c1963189d102db71d787ab0d8e79db6a1c","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.1.5.tgz","integrity":"sha512-8RMzPD8HhekroqyqubNKj2u+ZDPWgnnI4Yk+i61BmFrxcIJ3TS1uQBjk22z30VflQ6QaT3E5oILetoQJlPJV4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6hAJtxwftT/wp72c0CEEy3rMisIb2fs6GWMhRRjSdhQIgAX+D+3BvMqBcOhWBdaOkWbYMveEeFNo8ALlPeqpULSI="}]},"_from":".","_npmVersion":"1.2.7","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.1.6":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.1.6","dependencies":{"cloneextend":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        execution: \"sequential-independent\",\n        children:[\n            {\n                name:\"Action 1\",\n                action:\"action1\",\n                execution: \"sequential\",\n                children:[\n                    {\n                        name:\"Sub-Action 1 - 1\",\n                        action:\"subaction11\",\n                        execution: \"sequential\",\n                        children:[\n                            {\n                                name:\"Sub-Sub-Action 1\",\n                                action:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"Sub-Action 1 - 2\",\n                        action:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"Action 2\",\n                action:\"action2\"\n            },\n            {\n                name:\"Action 3\",\n                action:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But you can choose to continue the sequence or not if a event failed.\nThere are two types of execution :\n\n*   Sequential\n*   Sequential-independent\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)`\n*   stop() : Stop the flow ans emit `stop` event\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n*   stop : Event emits when `treeflow.stop()` is called\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIf you choose this execution type, all children event will be emitted sequentially. If one of the children fails, event `complete` is fired and execution stop.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither.\n\n####Sequential-independent\n\nIf you choose this execution type, all children event will be fired sequentially. If one children fails, next children of its level is called.\nIn the given example if action `subaction11` failed, its children are not called, and action `subaction12` neither but `action2` is called.","readmeFilename":"README.md","_id":"treeflow@0.1.6","dist":{"shasum":"52e85913a57a87abc5408d9226a83b282176b688","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.1.6.tgz","integrity":"sha512-Ez1yXNklSupg54SlYiMQW5rJbSFtdVo5J6l+QQC4OLdQxGuCOwbBT1ONylbtST8pCT3WYEbHjpbkGcSlTnz7kg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCohz7wqW2b0Dz8dCWNt5lsFKbMCcAv8A+cVUdRd4y9ZgIgJKquNaItVKuXvIJmRMdh7SUWncj/3mx/o70Tz5JP+wM="}]},"_from":".","_npmVersion":"1.2.7","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]},"0.1.7":{"name":"treeflow","description":"Flow sequential dependant and independant","author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"},"version":"0.1.7","dependencies":{"cloneextend":""},"main":"./lib/treeflow.js","devDependencies":{"mocha":"","should":""},"scripts":{"test":"mocha"},"engine":"node >= 0.8.0","readme":"#TREEFLOW\n\nTreeflow is a Node.JS module to emit event in order to manage sequential or semi-sequential function.\n\n##USAGE\n\nAll sequences are defined in a tree object like :\n\n    var sequentialFlow = {\n        name:\"Sequential Flow\",\n        tasks:[\n            {\n                name:\"action1\",\n                tasks:[\n                    {\n                        name:\"subaction11\",\n                        tasks:[\n                            {\n                                name:\"subsubaction1\"\n                            }\n                        ]\n                    },\n                    {\n                        name:\"subaction12\"\n                    }\n                ]\n            },\n            {\n                name:\"action2\"\n            },\n            {\n                name:\"action3\"\n            }\n        ]\n    }\n\nTo init the flow :\n\n    var treeFlow = new TreeFlow(sequentialFlow)\n\nNext you need to declare listener :\n\n    treeFlow.on(\"action1\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        console.log(\"flowData [\"+flow.data.myData+\"]\")\n        flow.next()\n    })\n\n    treeFlow.on(\"action2\", function(flow, action) {\n        console.log(\"running [\"+action.name+\"]\")\n        flow.error(new Error(\"MyError\"))\n    })\n    ...\n\nTo finish, run the flow :\n\n    treeFlow.run({myCtx:\"This is a context object\"})\n\n###General\nTreeflow will emit event for each actions in the configuration object (in example : `sequentialFlow`). All event are emitted sequentially. But if you have several tasks in tasks array, if one of task present in this array fails, the next one will be launched.\n\nSee unit test for more details.\n\n####Object details\n\n**Treeflow object :**\n\n*Arguments :*\n\n*   flowDefinition : Javascript object representig the tree of actions\n\n*Methods :*\n\n*   on(eventName, callback) : Listener of event `eventName`. When event is emitted, `callback`is called\n*   run(ctx) : Launch the flow with a context variable (optional)`\n*   stop() : Stop the flow ans emit `stop` event\n\n*Events :*\n\n*   complete : Event emits when tree is finish. Emitted even if a `flow.error()` is called\n*   error(error,node) : Event emits when a `flow.error()` is called\n*   fatal(error,node) : Event emits when there is an error in the flow definition.\n*   stop : Event emits when `treeflow.stop()` is called\n\n**Flow object (argument of each listener) :**\n\n*Method :*\n\n*   next() : Launch the next event\n*   error() : Flow will continue if a sequential-independent flow is defined\n\n*Attributes :*\n\n*   ctx : Contains context passed in run arguments\n\n####Sequential\n\nIn exemple, action1, subaction11 and subsubaction1 are sequential, if one on them fails, the other will not be called.\n\n####Sequential-independent\n\nIn exemple action1, action2 and action3 are independant, if one of them fails, the other one will be called. It's the same thing for subaction11 and subaction12.","_id":"treeflow@0.1.7","dist":{"shasum":"618b3c8d83a3f4209174c103c60efcb3219365a9","tarball":"https://registry.npmjs.org/treeflow/-/treeflow-0.1.7.tgz","integrity":"sha512-h9bSU0IkTPMsvEjZmLLu2pi0rO49jSfPihdrvzg0OQhZH0LMNstSE6s8cJvxU5KGaaBJROIyRU3mw4TXfzfGlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8jxZGt1dj0dxamnxMoufBz8oQihY7HyAaSVhzrGV2fgIhAIPs4pTyH6wgUMRNSwNV486zt71SHm/ffS/ojeSffp2R"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"ptit6sky","email":"ptit6sky@gmail.com"},"maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}]}},"readme":"treeflow\n========","maintainers":[{"name":"ptit6sky","email":"ptit6sky@gmail.com"}],"time":{"modified":"2022-06-27T20:58:08.730Z","created":"2012-12-12T12:41:49.984Z","0.0.1":"2012-12-12T12:41:52.000Z","0.0.2":"2012-12-12T15:43:21.780Z","0.0.3":"2012-12-12T15:56:45.327Z","0.0.4":"2012-12-12T16:40:52.238Z","0.0.5":"2012-12-12T16:47:51.761Z","0.0.6":"2012-12-13T16:04:10.581Z","0.0.7":"2012-12-14T11:27:08.747Z","0.0.9":"2012-12-14T14:42:39.516Z","0.1.0":"2012-12-17T10:37:49.606Z","0.1.1":"2012-12-17T13:26:20.138Z","0.1.2":"2012-12-21T15:02:12.760Z","0.1.3":"2013-02-08T14:38:21.620Z","0.1.4":"2013-02-08T14:55:11.224Z","0.1.5":"2013-02-08T15:02:41.111Z","0.1.6":"2013-02-28T15:40:56.552Z","0.1.7":"2013-07-19T09:49:40.331Z"},"author":{"name":"Eric LEVEAU","email":"leveau.eric@gmail.com"}}