Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
/**
* Module dependencies
*/
// Node.js core.
const path = require('path');
// Public node modules.
const _ = require('lodash');
const async = require('async');
// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;
/**
* Async module loader to create a
* dictionary of the user plugins.
*/
module.exports = strapi => {
return {
/**
* Initialize the hook
*/
initialize: cb => {
async.auto({
// Expose the `name` of the plugin for the callback.
'use strict';
/**
* Module dependencies
*/
// Node.js core.
const path = require('path');
// Public node modules.
const _ = require('lodash');
const async = require('async');
// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;
/**
* Async module loader to create a
* dictionary of the user APIs.
*/
module.exports = strapi => {
return {
/**
* Initialize the hook
*/
initialize: cb => {
_.forEach(strapi.api, (definition, api) => {
async.auto({
'use strict';
/**
* Module dependencies
*/
// Node.js core.
const path = require('path');
// Public node modules.
const _ = require('lodash');
const async = require('async');
// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;
/**
* Async module loader to create a
* dictionary of the external hooks
*/
module.exports = strapi => {
return {
/**
* Initialize the hook
*/
initialize: cb => {
async.auto({
'use strict';
/**
* Module dependencies
*/
// Node.js core.
const path = require('path');
// Public node modules.
const _ = require('lodash');
const async = require('async');
// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;
/**
* Async module loader to create a
* dictionary of the user plugins.
*/
module.exports = strapi => {
return {
/**
* Initialize the hook
*/
initialize: cb => {
_.forEach(strapi.plugins, (definition, plugin) => {
async.auto({
'use strict';
/**
* Module dependencies
*/
// Node.js core.
const path = require('path');
// Public node modules.
const _ = require('lodash');
const async = require('async');
// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;
/**
* Async module loader to create a
* dictionary of the external hooks
*/
module.exports = function (strapi) {
const hook = {
/**
* Initialize the hook
*/
// initialize: function (cb) {
// async.auto({
//
'use strict';
/**
* Module dependencies
*/
// Node.js core.
const path = require('path');
// Public node modules.
const _ = require('lodash');
const async = require('async');
// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;
/**
* Async module loader to create a
* dictionary of the user config
*/
module.exports = strapi => {
return {
/**
* Initialize the hook
*/
initialize: cb => {
async.auto(
{
// Load common settings from `./config/*.js|json`.