diff --git a/lib/archetype/config/engine.ts b/lib/archetype/config/engine.ts deleted file mode 100755 index 16c8213..0000000 --- a/lib/archetype/config/engine.ts +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Engine Configuration - * - * @see {@link http:// - */ -export const engine = { - /** - * If transactions are production - */ - live_mode: process.env.LIVE_MODE || true, - - /** - * If every event should be saved automatically in the database - */ - auto_save: process.env.AUTO_SAVE || false, - - /** - * Set profile to subscribe to crons, events, or tasks in the matching profile (engine..profiles). - * If process.env.PROFILE does not match a profile, the application will not subscribe to any crons, events, or tasks - */ - profile: process.env.ENGINE_PROFILE, - - /** - * The config for cron workers - */ - crons_config: { - /** - * Whether to run the schedule method on every Cron Class - */ - auto_schedule: true, - /** - * Delay when crons will start running. - */ - uptime_delay: process.env.CRON_UPTIME_DELAY || 0, - /** - * Define worker profiles. Each profile of a given type listens for the - * "crons" defined in its profile below. The cron names represent a Cron - * defined in api.crons. - * You can set these per environment in config/env - * engine: { crons_config: { profiles: ... } } - */ - profiles: {} - }, - - /** - * The config for event workers - */ - events_config: { - /** - * Whether to run the subscribe method on every Event class - */ - auto_subscribe: true, - /** - * Define worker profiles. Each profile of a given type listens for the - * "events" defined in its profile below. The event names represent an Event - * defined in api.events. - * You can set these per environment in config/env - * engine: { events_config: { profiles: ... } } - */ - profiles: {} - }, - - /** - * The config for task workers - */ - tasks_config: { - /** - * Whether to run the que method on Every Task class - */ - auto_que: true, - /** - * Define worker profiles. Each profile of a given type listens for the - * "tasks" defined in its profile below. The task names represent a Task - * defined in api.tasks. - * You can set these per environment in config/env - * engine: { tasks_config: { profiles: ... } } - */ - profiles: {}, - /** - * Deine the connection for RabbitMQ - */ - connection: { - exchange: process.env.TASK_EXCHANGE, // optional, defaults to `tasks-work-x` - work_queue_name: process.env.TASK_WORK_QUEUE, // optional, defaults to `tasks-work-q` - interrupt_queue_name: process.env.TASK_INTERRUPT_QUEUE, // optional, defaults to `tasks-interrupt-q` - - /** - * The RabbitMQ connection information. - * See: https://www.rabbitmq.com/uri-spec.html - */ - host: process.env.TASK_RMQ_HOST, - user: process.env.TASK_RMQ_USER, - pass: process.env.TASK_RMQ_PASS, - port: process.env.TASK_RMQ_PORT, - vhost: process.env.TASK_RMQ_VHOST, - - /** - * Connection information could also be passed via uri - */ - uri: process.env.RMQ_URI, - - /** - * Additional, optional connection options (default values shown) - */ - heartbeat: 30, - timeout: null, // this is the connection timeout (in milliseconds, per connection attempt), and there is no default - failAfter: 60, // limits how long rabbot will attempt to connect (in seconds, across all connection attempts). Defaults to 60 - retryLimit: 3, // limits number of consecutive failed attempts - } - } -} diff --git a/lib/archetype/config/tasks.ts b/lib/archetype/config/tasks.ts new file mode 100755 index 0000000..f63ed0b --- /dev/null +++ b/lib/archetype/config/tasks.ts @@ -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: {} +} diff --git a/lib/config/routes.ts b/lib/config/routes.ts index 4224903..aec57ad 100755 --- a/lib/config/routes.ts +++ b/lib/config/routes.ts @@ -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'] - } - } - } - } + } diff --git a/lib/utils.ts b/lib/utils.ts index 9211596..7acb3d5 100755 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -22,9 +22,9 @@ export const Utils = { * @returns {object} - taskerConfig */ configureExchangesAndQueues: (profile, taskerConfig) => { - const exchangeName = taskerConfig.exchange || 'tasker-work-x' - const workQueueName = taskerConfig.work_queue_name || 'tasker-work-q' - const interruptQueueName = taskerConfig.interrupt_queue_name || 'tasker-interrupt-q' + const exchangeName = taskerConfig.exchange || 'tasks-work-x' + const workQueueName = taskerConfig.work_queue_name || 'tasks-work-q' + const interruptQueueName = taskerConfig.interrupt_queue_name || 'tasks-interrupt-q' taskerConfig.exchangeName = exchangeName diff --git a/package-lock.json b/package-lock.json index ff2ba34..bc6aa34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@fabrix/spool-tasks", - "version": "1.5.0", + "version": "1.6.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -21,7 +21,7 @@ "requires": { "@babel/types": "7.0.0-beta.51", "jsesc": "2.5.1", - "lodash": "4.17.10", + "lodash": "4.17.11", "source-map": "0.5.7", "trim-right": "1.0.1" } @@ -81,7 +81,7 @@ "@babel/code-frame": "7.0.0-beta.51", "@babel/parser": "7.0.0-beta.51", "@babel/types": "7.0.0-beta.51", - "lodash": "4.17.10" + "lodash": "4.17.11" } }, "@babel/traverse": { @@ -99,7 +99,7 @@ "debug": "3.1.0", "globals": "11.7.0", "invariant": "2.2.4", - "lodash": "4.17.10" + "lodash": "4.17.11" }, "dependencies": { "debug": { @@ -120,14 +120,14 @@ "dev": true, "requires": { "esutils": "2.0.2", - "lodash": "4.17.10", + "lodash": "4.17.11", "to-fast-properties": "2.0.0" } }, "@fabrix/fabrix": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@fabrix/fabrix/-/fabrix-1.5.3.tgz", - "integrity": "sha512-VbET1O+inrbOHm0s4EMF4JpvqBDzXwKPj6M9pa2cjAF0/+SHn70FUxI05bbuQo5ONp7bKfFyHlNW3aUWwUknxg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@fabrix/fabrix/-/fabrix-1.6.0.tgz", + "integrity": "sha512-UQKtxCDR/X/fPbJwByZRsz1Jw13d9jtomuFu6YzeB5fH1Fl4k1h1vqs5utPPmi8QLWu3NYf/zIL+SODvr+Y5ZA==", "dev": true, "requires": { "lodash": "4.17.11", @@ -149,28 +149,29 @@ "dev": true }, "@fabrix/spool-express": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@fabrix/spool-express/-/spool-express-1.5.0.tgz", - "integrity": "sha512-9glfOK7jAgJuqqzzPin8hsjPgYx6G95lt+Ac8v9fg9pCHKSr0qWxKCfzYeJwonTsTkmFDu/7ZFeQ5VgcZRwbqQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@fabrix/spool-express/-/spool-express-1.5.1.tgz", + "integrity": "sha512-9Wc5UwF07dEsUyCrcCGbtP0YDbqv66eBRbfNi8nky8NP8MC24pWSInM1hJYI1fDIzyN0BD5fNt6PKOVb4dX3dQ==", "dev": true, "requires": { "body-parser": "1.18.3", "compression": "1.7.3", "consolidate": "0.15.1", "cookie-parser": "1.4.3", - "cors": "2.8.4", + "cors": "2.8.5", "express-boom": "2.0.0", "express-session": "1.15.6", - "joi": "13.6.0", + "helmet": "3.15.0", + "joi": "13.7.0", "lodash": "4.17.11", "method-override": "3.0.0", "methods": "1.1.2" }, "dependencies": { "joi": { - "version": "13.6.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-13.6.0.tgz", - "integrity": "sha512-E4QB0yRgEa6ZZKcSHJuBC+QeAwy+akCG0Bsa9edLqljyhlr+GuGDSmXYW1q7sj/FuAPy+ECUI3evVtK52tVfwg==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-13.7.0.tgz", + "integrity": "sha512-xuY5VkHfeOYK3Hdi91ulocfuFopwgbSORmIwzcwHKESQhC7w1kD5jaVSPnqDxS2I8t3RZ9omCKAxNwXN5zG1/Q==", "dev": true, "requires": { "hoek": "5.0.3", @@ -187,30 +188,30 @@ } }, "@fabrix/spool-i18n": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@fabrix/spool-i18n/-/spool-i18n-1.5.0.tgz", - "integrity": "sha512-Zcl7ZiiV/eNvS3jJTo4fgFYKCKbPElW3xKZyl3u0iIHcivkJu/F490RtqmECTolWqWyaqXZXfqNaN7VPYlRdVQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@fabrix/spool-i18n/-/spool-i18n-1.5.1.tgz", + "integrity": "sha512-Q2hjpA5me5xrR5rIChvUuJAiGPic9mgwSh+6qZDGxUjWKna6S3itvXZa25WV1wWfZl2z5tJqXCJ4glz9Pjw86g==", "dev": true, "requires": { - "i18next": "11.9.0", - "lodash": "4.17.10" + "i18next": "11.10.2", + "lodash": "4.17.11" } }, "@fabrix/spool-router": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@fabrix/spool-router/-/spool-router-1.5.0.tgz", - "integrity": "sha512-94Kd709GNykjWmpKzlZ2RkKjJGaYpub/LcRYA/D5QW9TBx2eUDSq9sAbSWwZ4dQrBg7QBe3TEpoPGgff6WvC2g==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@fabrix/spool-router/-/spool-router-1.6.0.tgz", + "integrity": "sha512-Qb1SZnrqY4hpXuYrFddXPqzSpzwsQmF8n8LE2ixXvo9GzUfurZXP4fovLaOBUYwVqbNyb+KYwx6FbFdxHlHtEA==", "dev": true, "requires": { - "call": "5.0.1", - "joi": "13.6.0", + "call": "5.0.3", + "joi": "13.7.0", "lodash": "4.17.11" }, "dependencies": { "joi": { - "version": "13.6.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-13.6.0.tgz", - "integrity": "sha512-E4QB0yRgEa6ZZKcSHJuBC+QeAwy+akCG0Bsa9edLqljyhlr+GuGDSmXYW1q7sj/FuAPy+ECUI3evVtK52tVfwg==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-13.7.0.tgz", + "integrity": "sha512-xuY5VkHfeOYK3Hdi91ulocfuFopwgbSORmIwzcwHKESQhC7w1kD5jaVSPnqDxS2I8t3RZ9omCKAxNwXN5zG1/Q==", "dev": true, "requires": { "hoek": "5.0.3", @@ -227,23 +228,29 @@ } }, "@fabrix/spool-sequelize": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@fabrix/spool-sequelize/-/spool-sequelize-1.5.0.tgz", - "integrity": "sha512-OTjZYrvhAein2QSp3gxa+S++ZY4bda5Xn6CKaPAH1eTROrq4KcpLQqYwXH42nhFwCLVzlOSEaBPypRfpIQDD7A==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@fabrix/spool-sequelize/-/spool-sequelize-1.6.1.tgz", + "integrity": "sha512-NN+K7m7I7k6cBiyTaCxgtD4yStjC3pjY7LAqMUCcuACgL15BxC4wh8PJDtKCY3FseH67Lvh6V9pTUD3BpGkf1Q==", "dev": true, "requires": { - "joi": "13.6.0", + "joi": "14.3.0", "lodash": "4.17.11", - "sequelize": "4.38.1" + "sequelize": "4.42.0" }, "dependencies": { + "hoek": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.2.tgz", + "integrity": "sha512-6qhh/wahGYZHFSFw12tBbJw5fsAhhwrrG/y3Cs0YMTv2WzMnL0oLPnQJjv1QJvEfylRSOFuP+xCu+tdx0tD16Q==", + "dev": true + }, "joi": { - "version": "13.6.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-13.6.0.tgz", - "integrity": "sha512-E4QB0yRgEa6ZZKcSHJuBC+QeAwy+akCG0Bsa9edLqljyhlr+GuGDSmXYW1q7sj/FuAPy+ECUI3evVtK52tVfwg==", + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-14.3.0.tgz", + "integrity": "sha512-0HKd1z8MWogez4GaU0LkY1FgW30vR2Kwy414GISfCU41OYgUC2GWpNe5amsvBZtDqPtt7DohykfOOMIw1Z5hvQ==", "dev": true, "requires": { - "hoek": "5.0.3", + "hoek": "6.1.2", "isemail": "3.1.2", "topo": "3.0.0" } @@ -316,7 +323,7 @@ }, "array-flatten": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", "dev": true }, @@ -411,11 +418,18 @@ } }, "boom": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-7.2.0.tgz", - "integrity": "sha1-K/8kpVVldn/ehp7ICDF+sQxI6WY=", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-7.3.0.tgz", + "integrity": "sha512-Swpoyi2t5+GhOEGw8rEsKvTxFLIDiiKoUc2gsoV6Lyr43LHBIzch3k2MvYUs8RTROrIkVJ3Al0TkaOGjnb+B6A==", "requires": { - "hoek": "5.0.3" + "hoek": "6.1.2" + }, + "dependencies": { + "hoek": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.2.tgz", + "integrity": "sha512-6qhh/wahGYZHFSFw12tBbJw5fsAhhwrrG/y3Cs0YMTv2WzMnL0oLPnQJjv1QJvEfylRSOFuP+xCu+tdx0tD16Q==" + } } }, "brace-expansion": { @@ -458,15 +472,29 @@ "dev": true }, "call": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/call/-/call-5.0.1.tgz", - "integrity": "sha512-ollfFPSshiuYLp7AsrmpkQJ/PxCi6AzV81rCjBwWhyF2QGyUY/vPDMzoh4aUcWyucheRglG2LaS5qkIEfLRh6A==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/call/-/call-5.0.3.tgz", + "integrity": "sha512-eX16KHiAYXugbFu6VifstSdwH6aMuWWb4s0qvpq1nR1b+Sf+u68jjttg8ixDBEldPqBi30bDU35OJQWKeTLKxg==", "dev": true, "requires": { - "boom": "7.2.0", - "hoek": "5.0.3" + "boom": "7.3.0", + "hoek": "6.1.2" + }, + "dependencies": { + "hoek": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.2.tgz", + "integrity": "sha512-6qhh/wahGYZHFSFw12tBbJw5fsAhhwrrG/y3Cs0YMTv2WzMnL0oLPnQJjv1QJvEfylRSOFuP+xCu+tdx0tD16Q==", + "dev": true + } } }, + "camelize": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=", + "dev": true + }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -504,9 +532,9 @@ "dev": true }, "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "dev": true, "requires": { "delayed-stream": "1.0.0" @@ -525,18 +553,18 @@ "dev": true }, "compressible": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", - "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz", + "integrity": "sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==", "dev": true, "requires": { - "mime-db": "1.36.0" + "mime-db": "1.37.0" }, "dependencies": { "mime-db": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", "dev": true } } @@ -549,7 +577,7 @@ "requires": { "accepts": "1.3.5", "bytes": "3.0.0", - "compressible": "2.0.14", + "compressible": "2.0.15", "debug": "2.6.9", "on-headers": "1.0.1", "safe-buffer": "5.1.2", @@ -573,10 +601,16 @@ }, "content-disposition": { "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "resolved": "http://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", "dev": true }, + "content-security-policy-builder": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/content-security-policy-builder/-/content-security-policy-builder-2.0.0.tgz", + "integrity": "sha512-j+Nhmj1yfZAikJLImCvPJFE29x/UuBi+/MWqggGGc515JKaZrjuei2RhULJmy0MsstW3E3htl002bwmBNMKr7w==", + "dev": true + }, "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", @@ -617,9 +651,9 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cors": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.4.tgz", - "integrity": "sha1-K9OB8usgECAQXNUOpZ2mMJBpRoY=", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, "requires": { "object-assign": "4.1.1", @@ -632,6 +666,12 @@ "integrity": "sha1-naHpgOO9RPxck79as9ozeNheRms=", "dev": true }, + "dasherize": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", + "integrity": "sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg=", + "dev": true + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -665,10 +705,22 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, + "dns-prefetch-control": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dns-prefetch-control/-/dns-prefetch-control-0.1.0.tgz", + "integrity": "sha1-YN20V3dOF48flBXwyrsOhbCzALI=", + "dev": true + }, + "dont-sniff-mimetype": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.0.0.tgz", + "integrity": "sha1-WTKJDcn04vGeXrAqIAJuXl78j1g=", + "dev": true + }, "dottie": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.0.tgz", - "integrity": "sha1-2hkZgci41xPKARXViYzzl8Lw3dA=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.1.tgz", + "integrity": "sha512-ch5OQgvGDK2u8pSZeSYAQaV/lczImd7pMJ7BcEPXmnFVjy4yJIzP6CsODJUTH8mg1tyH1Z2abOiuJO3DjZ/GBw==", "dev": true }, "ee-first": { @@ -713,15 +765,21 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "dev": true }, + "expect-ct": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/expect-ct/-/expect-ct-0.1.1.tgz", + "integrity": "sha512-ngXzTfoRGG7fYens3/RMb6yYoVLvLMfmsSllP/mZPxNHgFq41TmPSLF/nLY7fwoclI2vElvAmILFWGUYqdjfCg==", + "dev": true + }, "express": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", - "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", "dev": true, "requires": { "accepts": "1.3.5", "array-flatten": "1.1.1", - "body-parser": "1.18.2", + "body-parser": "1.18.3", "content-disposition": "0.5.2", "content-type": "1.0.4", "cookie": "0.3.1", @@ -738,10 +796,10 @@ "on-finished": "2.3.0", "parseurl": "1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "2.0.3", - "qs": "6.5.1", + "proxy-addr": "2.0.4", + "qs": "6.5.2", "range-parser": "1.2.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "send": "0.16.2", "serve-static": "1.13.2", "setprototypeof": "1.1.0", @@ -751,80 +809,6 @@ "vary": "1.1.2" }, "dependencies": { - "body-parser": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", - "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "1.0.4", - "debug": "2.6.9", - "depd": "1.1.2", - "http-errors": "1.6.3", - "iconv-lite": "0.4.19", - "on-finished": "2.3.0", - "qs": "6.5.1", - "raw-body": "2.3.2", - "type-is": "1.6.16" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", - "dev": true - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - }, - "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", - "dev": true - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "dev": true, - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.4.0" - } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true - }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", @@ -887,9 +871,15 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-1.1.13.tgz", "integrity": "sha1-oB6c2cnkkXFcmKdaQtXwu9EH/3Y=" }, + "feature-policy": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.2.0.tgz", + "integrity": "sha512-2hGrlv6efG4hscYVZeaYjpzpT6I2OZgYqE2yDUzeAcKj2D1SH0AsEzqJNXzdoglEddcIXQQYop3lD97XpG75Jw==", + "dev": true + }, "finalhandler": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "dev": true, "requires": { @@ -911,13 +901,13 @@ } }, "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { "asynckit": "0.4.0", - "combined-stream": "1.0.6", + "combined-stream": "1.0.7", "mime-types": "2.1.18" } }, @@ -933,6 +923,12 @@ "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", "dev": true }, + "frameguard": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/frameguard/-/frameguard-3.0.0.tgz", + "integrity": "sha1-e8rUae57lukdEs6zlZx4I1qScuk=", + "dev": true + }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -998,11 +994,69 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, + "helmet": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.15.0.tgz", + "integrity": "sha512-j9JjtAnWJj09lqe/PEICrhuDaX30TeokXJ9tW6ZPhVH0+LMoihDeJ58CdWeTGzM66p6EiIODmgAaWfdeIWI4Gg==", + "dev": true, + "requires": { + "dns-prefetch-control": "0.1.0", + "dont-sniff-mimetype": "1.0.0", + "expect-ct": "0.1.1", + "feature-policy": "0.2.0", + "frameguard": "3.0.0", + "helmet-crossdomain": "0.3.0", + "helmet-csp": "2.7.1", + "hide-powered-by": "1.0.0", + "hpkp": "2.0.0", + "hsts": "2.1.0", + "ienoopen": "1.0.0", + "nocache": "2.0.0", + "referrer-policy": "1.1.0", + "x-xss-protection": "1.1.0" + } + }, + "helmet-crossdomain": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/helmet-crossdomain/-/helmet-crossdomain-0.3.0.tgz", + "integrity": "sha512-YiXhj0E35nC4Na5EPE4mTfoXMf9JTGpN4OtB4aLqShKuH9d2HNaJX5MQoglO6STVka0uMsHyG5lCut5Kzsy7Lg==", + "dev": true + }, + "helmet-csp": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.7.1.tgz", + "integrity": "sha512-sCHwywg4daQ2mY0YYwXSZRsgcCeerUwxMwNixGA7aMLkVmPTYBl7gJoZDHOZyXkqPrtuDT3s2B1A+RLI7WxSdQ==", + "dev": true, + "requires": { + "camelize": "1.0.0", + "content-security-policy-builder": "2.0.0", + "dasherize": "2.0.0", + "platform": "1.3.5" + } + }, + "hide-powered-by": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hide-powered-by/-/hide-powered-by-1.0.0.tgz", + "integrity": "sha1-SoWtZYgfYoV/xwr3F0oRhNzM4ys=", + "dev": true + }, "hoek": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-5.0.3.tgz", "integrity": "sha512-Bmr56pxML1c9kU+NS51SMFkiVQAb+9uFfXwyqR2tn4w2FPvmPt65eZ9aCcEfRXd9G74HkZnILC6p967pED4aiw==" }, + "hpkp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hpkp/-/hpkp-2.0.0.tgz", + "integrity": "sha1-EOFCJk52IVpdMMROxD3mTe5tFnI=", + "dev": true + }, + "hsts": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hsts/-/hsts-2.1.0.tgz", + "integrity": "sha512-zXhh/DqgrTXJ7erTN6Fh5k/xjMhDGXCqdYN3wvxUvGUQvnxcFfUd8E+6vLg/nk3ss1TYMb+DhRl25fYABioTvA==", + "dev": true + }, "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", @@ -1016,9 +1070,9 @@ } }, "i18next": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-11.9.0.tgz", - "integrity": "sha512-NDuIoELzyJ+29kc29j9aKgzjZht4kEKh3PPdz0qCEC9ZUpgRVaWUdkMRES/NVTcpe1ei4MMwY8DNWBWCIUlAng==", + "version": "11.10.2", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-11.10.2.tgz", + "integrity": "sha512-1rowdX8PqrvsdFhYb3v0A/LlIHLQL1HTa4ia29IzhvNAg2fesNV7R1jXibWLmLQdz3FfTB8RuqSqDEjIawXruA==", "dev": true }, "iconv-lite": { @@ -1030,6 +1084,12 @@ "safer-buffer": "2.1.2" } }, + "ienoopen": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ienoopen/-/ienoopen-1.0.0.tgz", + "integrity": "sha1-NGpCj0dKrI9QzzeE6i0PFvYr2ms=", + "dev": true + }, "individual": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/individual/-/individual-3.0.0.tgz", @@ -1066,9 +1126,9 @@ } }, "ipaddr.js": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", - "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", "dev": true }, "is-bluebird": { @@ -1150,9 +1210,9 @@ "dev": true }, "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, "loose-envify": { "version": "1.3.1", @@ -1295,17 +1355,17 @@ } }, "moment": { - "version": "2.22.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.23.0.tgz", + "integrity": "sha512-3IE39bHVqFbWWaPOMHZF98Q9c3LDKGTmypMiTM2QygGXXElkFWIH7GxfmlwmY2vwa+wmNsoYZmG2iusf1ZjJoA==" }, "moment-timezone": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.21.tgz", - "integrity": "sha512-j96bAh4otsgj3lKydm3K7kdtA3iKf2m6MY2iSYCzCm5a1zmHo1g+aK3068dDEeocLZQIS9kU8bsdQHLqEvgW0A==", + "version": "0.5.23", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.23.tgz", + "integrity": "sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w==", "dev": true, "requires": { - "moment": "2.22.2" + "moment": "2.23.0" } }, "monologue.js": { @@ -1330,9 +1390,9 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nanoid": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-1.1.0.tgz", - "integrity": "sha512-iOCqgXieGrk8/wDt1n9rZS2KB1dYVssemY0NTWjfzVr+1t1gAmdTp1u2+YHppKro3Bk5S+Gs+xmYCfpuXauYXQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.0.0.tgz", + "integrity": "sha512-SG2qscLE3iM4C0CNzGrsAojJHSVHMS1J8NnvJ31P1lH8P0hGHOiafmniNJz6w6q7vuoDlV7RdySlJgtqkFEVtQ==" }, "negotiator": { "version": "0.6.1", @@ -1340,6 +1400,12 @@ "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", "dev": true }, + "nocache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz", + "integrity": "sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA=", + "dev": true + }, "nyc": { "version": "12.0.2", "resolved": "https://registry.npmjs.org/nyc/-/nyc-12.0.2.tgz", @@ -3791,12 +3857,18 @@ "split": "1.0.1" } }, + "platform": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.5.tgz", + "integrity": "sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q==", + "dev": true + }, "postal": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/postal/-/postal-2.0.5.tgz", "integrity": "sha1-f58DWUOiTaqZY6xaU7XQzwffJLk=", "requires": { - "lodash": "4.17.10" + "lodash": "4.17.11" } }, "postgres-array": { @@ -3833,13 +3905,13 @@ "dev": true }, "proxy-addr": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", - "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", "dev": true, "requires": { "forwarded": "0.1.2", - "ipaddr.js": "1.6.0" + "ipaddr.js": "1.8.0" } }, "punycode": { @@ -3864,7 +3936,7 @@ "machina": "2.0.2", "monologue.js": "0.3.5", "postal": "2.0.5", - "uuid": "3.3.0" + "uuid": "3.3.2" }, "dependencies": { "debug": { @@ -3912,6 +3984,12 @@ "string_decoder": "0.10.31" } }, + "referrer-policy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.1.0.tgz", + "integrity": "sha1-NXdOtzW/UPtsB46DM0tHI1AgfXk=", + "dev": true + }, "resolve": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", @@ -3993,34 +4071,34 @@ } }, "sequelize": { - "version": "4.38.1", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-4.38.1.tgz", - "integrity": "sha512-2gE4duUFZHnDyr9hY5O/UksSK2uJS2x1Zb8nT/hJ9SzjRNCF5BTEmjkmlpkFVfhytkMFeoNwkG/hE866GY6KTQ==", + "version": "4.42.0", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-4.42.0.tgz", + "integrity": "sha512-qxAYnX4rcv7PbNtEidb56REpxNJCdbN0qyk1jb3+e6sE7OrmS0nYMU+MFVbNTJtZfSpOEEL1TX0TkMw+wzZBxg==", "dev": true, "requires": { "bluebird": "3.5.1", "cls-bluebird": "2.1.0", - "debug": "3.2.5", + "debug": "3.2.6", "depd": "1.1.2", - "dottie": "2.0.0", + "dottie": "2.0.1", "generic-pool": "3.4.2", "inflection": "1.12.0", - "lodash": "4.17.10", - "moment": "2.22.2", - "moment-timezone": "0.5.21", + "lodash": "4.17.11", + "moment": "2.23.0", + "moment-timezone": "0.5.23", "retry-as-promised": "2.3.2", "semver": "5.5.0", "terraformer-wkt-parser": "1.2.0", "toposort-class": "1.0.1", - "uuid": "3.3.0", - "validator": "10.7.1", - "wkx": "0.4.5" + "uuid": "3.3.2", + "validator": "10.9.0", + "wkx": "0.4.6" }, "dependencies": { "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { "ms": "2.1.1" @@ -4059,11 +4137,11 @@ "dev": true }, "shortid": { - "version": "2.2.12", - "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.12.tgz", - "integrity": "sha512-sw0knB/ioTu/jVYgJz1IP1b5uhPZtZYwQ9ir/EqXZHI4+Jh8rzzGLM3LKptGHBKoDsgTBDfr4yCRNUX7hEIksQ==", + "version": "2.2.14", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.14.tgz", + "integrity": "sha512-4UnZgr9gDdA1kaKj/38IiudfC3KHKhDc1zi/HSxd9FQDR0VLwH3/y79tZJLsVYPsJgIjeHjqIWaWVRJUj9qZOQ==", "requires": { - "nanoid": "1.1.0" + "nanoid": "2.0.0" } }, "smokesignals": { @@ -4072,7 +4150,7 @@ "integrity": "sha1-06syZZwhHwsuVe44810rzOFE2gs=", "dev": true, "requires": { - "lodash": "4.17.10" + "lodash": "4.17.11" } }, "source-map": { @@ -4117,16 +4195,16 @@ } }, "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", + "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "dev": true, "requires": { "component-emitter": "1.2.1", "cookiejar": "2.1.2", - "debug": "3.1.0", + "debug": "3.2.6", "extend": "3.0.2", - "form-data": "2.3.2", + "form-data": "2.3.3", "formidable": "1.2.1", "methods": "1.1.2", "mime": "1.4.1", @@ -4135,12 +4213,12 @@ }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "2.1.1" } }, "isarray": { @@ -4149,9 +4227,15 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -4166,7 +4250,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -4176,13 +4260,13 @@ } }, "supertest": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.1.0.tgz", - "integrity": "sha512-O44AMnmJqx294uJQjfUmEyYOg7d9mylNFsMw/Wkz4evKd1njyPrtCN+U6ZIC7sKtfEVQhfTqFFijlXx8KP/Czw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.3.0.tgz", + "integrity": "sha512-dMQSzYdaZRSANH5LL8kX3UpgK9G1LRh/jnggs/TI0W2Sz7rkMx9Y48uia3K9NgcaWEV28tYkBnXE4tiFC77ygQ==", "dev": true, "requires": { "methods": "1.1.2", - "superagent": "3.8.2" + "superagent": "3.8.3" } }, "supports-color": { @@ -4333,14 +4417,14 @@ "dev": true }, "uuid": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.0.tgz", - "integrity": "sha512-ijO9N2xY/YaOqQ5yz5c4sy2ZjWmA6AR6zASb/gdpeKZ8+948CxwfMW9RrKVk5may6ev8c0/Xguu32e2Llelpqw==" + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "validator": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/validator/-/validator-10.7.1.tgz", - "integrity": "sha512-tbB5JrTczfeHKLw3PnFRzGFlF1xUAwSgXEDb66EuX1ffCirspYpDEZo3Vc9j38gPdL4JKrDc5UPFfgYiw1IWRQ==", + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.9.0.tgz", + "integrity": "sha512-hZJcZSWz9poXBlAkjjcsNAdrZ6JbjD3kWlNjq/+vE7RLLS/+8PAj3qVVwrwsOz/WL8jPmZ1hYkRvtlUeZAm4ug==", "dev": true }, "vary": { @@ -4350,9 +4434,9 @@ "dev": true }, "wkx": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.5.tgz", - "integrity": "sha512-01dloEcJZAJabLO5XdcRgqdKpmnxS0zIT02LhkdWOZX2Zs2tPM6hlZ4XG9tWaWur1Qd1OO4kJxUbe2+5BofvnA==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.6.tgz", + "integrity": "sha512-LHxXlzRCYQXA9ZHgs8r7Gafh0gVOE8o3QmudM1PIkOdkXXjW7Thcl+gb2P2dRuKgW8cqkitCRZkkjtmWzpHi7A==", "dev": true, "requires": { "@types/node": "10.3.6" @@ -4364,6 +4448,12 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "x-xss-protection": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.1.0.tgz", + "integrity": "sha512-rx3GzJlgEeZ08MIcDsU2vY2B1QEriUKJTSiNHHUIem6eg9pzVOr2TL3Y4Pd6TMAM5D5azGjcxqI62piITBDHVg==", + "dev": true + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", diff --git a/package.json b/package.json index 33dddbe..f95dfcb 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fabrix/spool-tasks", - "version": "1.5.0", + "version": "1.6.0", "description": "Spool - Emitter Engine for Fabrix", "homepage": "https://fabrix.app", "author": { @@ -43,28 +43,28 @@ "test" ], "dependencies": { - "boom": "^7.2.0", + "boom": "^7.3.0", "joi": "^13.4.0", - "moment": "^2.22.2", + "moment": "^2.23.0", "rabbot": "^2.1.0", - "shortid": "^2.2.12", - "uuid": "^3.3.0", - "lodash": "^4.17.5" + "shortid": "^2.2.14", + "uuid": "^3.3.2", + "lodash": "^4.17.11" }, "devDependencies": { - "@fabrix/fabrix": "^1.5.3", + "@fabrix/fabrix": "^1.6.0", "@fabrix/lint": "^1.0.0-alpha.3", - "@fabrix/spool-i18n": "^1.5.0", - "@fabrix/spool-sequelize": "^1.5.0", - "@fabrix/spool-express": "^1.5.0", - "@fabrix/spool-router": "^1.5.0", + "@fabrix/spool-i18n": "^1.5.1", + "@fabrix/spool-sequelize": "^1.6.1", + "@fabrix/spool-express": "^1.5.1", + "@fabrix/spool-router": "^1.6.0", "@types/node": "~10.3.4", - "express": "^4.16.3", + "express": "^4.16.4", "pg": "^6.4.2", "mocha": "^5", "nyc": "^12.0.2", "smokesignals": "^2.0.0", - "supertest": "^3.1.0", + "supertest": "^3.3.0", "tslib": "~1.9.0", "tslint": "~5.10.0", "tslint-microsoft-contrib": "~5.0.3", diff --git a/test/integration/archetype/archetype.test.js b/test/integration/archetype/archetype.test.js new file mode 100644 index 0000000..480161a --- /dev/null +++ b/test/integration/archetype/archetype.test.js @@ -0,0 +1,39 @@ +// 'use strict' +// +// const assert = require('assert') +// const FabrixApp = require('@fabrix/fabrix').FabrixApp +// const RouterSpool = require('@fabrix/spool-router').RouterSpool +// const TasksSpool = require('../../../dist/TasksSpool').TasksSpool +// const archetype = require('../../../dist/archetype/config/tasks').tasks +// +// describe('Archetype', () => { +// let app +// before(() => { +// app = new FabrixApp({ +// config: { +// main: { +// spools: [ +// RouterSpool, +// TasksSpool +// ] +// }, +// routes: {}, +// tasks: archetype +// }, +// api: {}, +// pkg: {} +// }) +// +// return app.start().catch(app.stop) +// }) +// +// describe('#archetype should work', () => { +// it('should have route cors set to true', () => { +// assert(app.spools['tasks']) +// }) +// }) +// +// after(() => { +// app.stop() +// }) +// })