-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from fabrix-app/v1.6
[feat] Archetype integration testing
- Loading branch information
Showing
7 changed files
with
422 additions
and
397 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** | ||
* Engine Configuration | ||
* | ||
* @see {@link http:// | ||
*/ | ||
export const tasks = { | ||
prefix: null, | ||
live_mode: true, | ||
auto_save: false, | ||
/** | ||
* Set profile to subscribe to tasks in the matching profile (tasks.profiles). | ||
* If process.env.TASKS_PROFILE does not match a profile, the application will not subscribe to any tasks | ||
*/ | ||
profile: process.env.TASKS_PROFILE || null, | ||
// enabled: true, | ||
auto_queue: true, | ||
connection: { | ||
// optional, defaults to `tasks-work-x` | ||
exchange: process.env.TASKS_EXCHANGE || null, | ||
// optional, defaults to `tasks-work-q` | ||
work_queue_name: process.env.TASKS_WORK_QUEUE || null, | ||
// optional, defaults to `tasks-interrupt-q` | ||
interrupt_queue_name: process.env.TASKS_INTERRUPT_QUEUE || null, | ||
|
||
/** | ||
* The RabbitMQ connection information. | ||
* See: https://www.rabbitmq.com/uri-spec.html | ||
*/ | ||
host: process.env.TASKS_RMQ_HOST || null, | ||
user: process.env.TASKS_RMQ_USER || null, | ||
pass: process.env.TASKS_RMQ_PASS || null, | ||
port: process.env.TASKS_RMQ_PORT || null, | ||
vhost: process.env.TASKS_RMQ_VHOST || null, | ||
/** | ||
* Connection information could also be passed via uri | ||
*/ | ||
uri: process.env.TASKS_RMQ_URI || null, | ||
/** | ||
* Additional, optional connection options (default values shown) | ||
*/ | ||
heartbeat: 30, | ||
/** | ||
* this is the connection timeout (in milliseconds, per connection attempt), and there is no default | ||
*/ | ||
timeout: null, | ||
/** | ||
* limits how long rabbot will attempt to connect (in seconds, across all connection attempts). Defaults to 60 | ||
*/ | ||
failAfter: 60, | ||
/** | ||
* limits number of consecutive failed attempts | ||
*/ | ||
retryLimit: 3, | ||
}, | ||
profiles: {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,3 @@ | ||
import * as joi from 'joi' | ||
export const routes = { | ||
'/events': { | ||
'GET': 'EventController.findAll', | ||
config: { | ||
prefix: 'engine.prefix', | ||
validate: { | ||
query: { | ||
offset: joi.number(), | ||
limit: joi.number(), | ||
where: joi.object(), | ||
sort: joi.array().items(joi.array()), | ||
} | ||
}, | ||
app: { | ||
permissions: { | ||
resource_name: 'apiGetEventsRoute', | ||
roles: ['admin'] | ||
} | ||
} | ||
} | ||
}, | ||
'/event': { | ||
'POST': 'EventController.create', | ||
config: { | ||
prefix: 'engine.prefix', | ||
app: { | ||
permissions: { | ||
resource_name: 'apiPostEventRoute', | ||
roles: ['admin'] | ||
} | ||
} | ||
} | ||
}, | ||
'/event/:id': { | ||
'GET': 'EventController.findOne', | ||
config: { | ||
prefix: 'engine.prefix', | ||
validate: { | ||
params: { | ||
id: joi.string().required() | ||
} | ||
}, | ||
app: { | ||
permissions: { | ||
resource_name: 'apiGetEventIdRoute', | ||
roles: ['admin'] | ||
} | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.