New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gasket/plugin-metadata

Package Overview
Dependencies
Maintainers
0
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gasket/plugin-metadata - npm Package Compare versions

Comparing version 7.0.0-next.57 to 7.0.0-next.58

73

lib/actions.js

@@ -6,2 +6,3 @@ const path = require('path');

const isGasketPlugin = /(gasket-plugin)|(@gasket\/plugin-)/;
let _metadata;

@@ -32,42 +33,46 @@ function getAppInfo(gasket) {

async function getMetadata(gasket) {
const app = getAppInfo(gasket);
const plugins = [];
const presets = [];
const modules = {};
if (!_metadata) {
const app = getAppInfo(gasket);
const plugins = [];
const presets = [];
const modules = {};
await gasket.execApply('metadata', async (data, handler) => {
const isPreset = isGasketPreset.test(data.name);
const isPlugin = isGasketPlugin.test(data.name);
const isGasketPackage = isPlugin || isPreset;
await gasket.execApply('metadata', async (data, handler) => {
const isPreset = isGasketPreset.test(data.name);
const isPlugin = isGasketPlugin.test(data.name);
const isGasketPackage = isPlugin || isPreset;
if (!isGasketPackage) {
const pluginData = await handler(data);
pluginData.path = path.join(app.path, 'plugins');
plugins.push(pluginData);
} else {
const pluginData = await handler(data);
pluginData.path = path.dirname(path.join(require.resolve(pluginData.name), '..'));
const { dependencies, devDependencies } = require(path.join(pluginData.path, 'package.json'));
if (isPreset)
presets.push(pluginData);
else
if (!isGasketPackage) {
const pluginData = await handler(data);
pluginData.path = path.join(app.path, 'plugins');
plugins.push(pluginData);
} else {
const pluginData = await handler(data);
pluginData.path = path.dirname(path.join(require.resolve(pluginData.name), '..'));
const { dependencies, devDependencies } = require(path.join(pluginData.path, 'package.json'));
for (const name of Object.keys({ ...dependencies, ...devDependencies })) {
const isModule = isGasketModule.test(name);
if (!isModule) continue;
const mod = require(path.join(name, 'package.json'));
modules[name] = {
name: mod.name,
version: mod.version,
description: mod.description,
link: 'README.md',
path: path.dirname(path.join(require.resolve(name), '..'))
};
if (isPreset)
presets.push(pluginData);
else
plugins.push(pluginData);
for (const name of Object.keys({ ...dependencies, ...devDependencies })) {
const isModule = isGasketModule.test(name);
if (!isModule) continue;
const mod = require(path.join(name, 'package.json'));
modules[name] = {
name: mod.name,
version: mod.version,
description: mod.description,
link: 'README.md',
path: path.dirname(path.join(require.resolve(name), '..'))
};
}
}
}
});
});
return { app, plugins, modules: Object.values(modules), presets };
_metadata = { app, plugins, modules: Object.values(modules), presets };
}
return _metadata;
}

@@ -74,0 +79,0 @@

{
"name": "@gasket/plugin-metadata",
"version": "7.0.0-next.57",
"version": "7.0.0-next.58",
"description": "Adds metadata to gasket lifecycles",

@@ -42,3 +42,3 @@ "main": "lib/index.js",

"dependencies": {
"@gasket/core": "7.0.0-next.57"
"@gasket/core": "7.0.0-next.58"
},

@@ -70,3 +70,3 @@ "devDependencies": {

},
"gitHead": "40e38b3d5102a08bd022bda3f9a8ddbd261e4dc9"
"gitHead": "800032d942a80eec38ae3cf80e738e73e411db7f"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc