( storeFileName, actionName, )
| 76 | ` |
| 77 | |
| 78 | const generateMiddlewareFile = ( |
| 79 | storeFileName, |
| 80 | actionName, |
| 81 | ) => `import createRequestLogic from '@ttn-lw/lib/store/logics/create-request-logic' |
| 82 | import * as actions from '@console/store/actions/${storeFileName}' |
| 83 | |
| 84 | const ${actionName}Logic = createRequestLogic({ |
| 85 | type: actions.${camelCaseToUpperSnakeCase(actionName)}, |
| 86 | process: async ({ action }, dispatch, done) => { |
| 87 | // Process logic here |
| 88 | done() |
| 89 | } |
| 90 | }) |
| 91 | |
| 92 | export default [${actionName}Logic] |
| 93 | ` |
| 94 | |
| 95 | const main = async () => { |
| 96 | const answers = await inquirer.prompt([ |
no test coverage detected