Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = async function createPluginServices() {
let registry = new Registry();
registry.register('config:project', {
path: '/Users/aaron/dev/cardstack/packages/models',
allowDevDependencies: true
});
let container = new Container(registry);
let loader = container.lookup('hub:plugin-loader');
let pluginConfigs = loadSeedModels('/Users/aaron/dev/cardstack/packages/models/tests/dummy/cardstack/seeds/development').filter(model => model.type === 'plugin-configs');
let plugins = await loader.activePlugins(pluginConfigs);
let services = plugins.listAll('docker-services').map(s => plugins.lookupFeature('docker-services', s));
async function wireItUp(projectDir, encryptionKeys, dataSources, opts = {}) {
let registry = new Registry();
registry.register('config:project', {
path: projectDir,
});
registry.register('config:environment', { name: opts.environment });
registry.register('config:data-sources', dataSources);
registry.register('config:encryption-key', encryptionKeys);
registry.register('config:public-url', { url: opts.url });
registry.register('config:ci-session', { id: opts.ciSessionId });
registry.register(
'config:pg-boss',
postgresConfig(
Object.assign(
{
database: process.env.PG_BOSS_DATABASE || `pgboss_${opts.environment}`,
host: process.env.PG_BOSS_HOST,
user: process.env.PG_BOSS_USER,