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

@envelop/core

Package Overview
Dependencies
Maintainers
0
Versions
1443
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/core - npm Package Compare versions

Comparing version 5.1.1 to 5.2.0-alpha-20250225223609-ad770ba43578c029a5f7274b702cbc310acccc85

19

cjs/create.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.envelop = envelop;
const instruments_1 = require("@envelop/instruments");
const orchestrator_js_1 = require("./orchestrator.js");

@@ -9,15 +10,17 @@ function notEmpty(value) {

function envelop(options) {
const plugins = options.plugins.filter(notEmpty);
const { pluginInstruments, plugins } = (0, instruments_1.getInstrumentsAndPlugins)(options.plugins.filter(notEmpty));
const instruments = (0, instruments_1.composeInstruments)(pluginInstruments);
const orchestrator = (0, orchestrator_js_1.createEnvelopOrchestrator)({
plugins,
});
const getEnveloped = (initialContext = {}) => {
const getEnveloped = (context = {}) => {
const instrumented = (0, instruments_1.getInstrumented)({ context });
const typedOrchestrator = orchestrator;
typedOrchestrator.init(initialContext);
instrumented.fn(instruments?.init, orchestrator.init)(context);
return {
parse: typedOrchestrator.parse(initialContext),
validate: typedOrchestrator.validate(initialContext),
contextFactory: typedOrchestrator.contextFactory(initialContext),
execute: typedOrchestrator.execute,
subscribe: typedOrchestrator.subscribe,
parse: instrumented.fn(instruments?.parse, typedOrchestrator.parse(context)),
validate: instrumented.fn(instruments?.validate, typedOrchestrator.validate(context)),
contextFactory: instrumented.fn(instruments?.context, typedOrchestrator.contextFactory(context)),
execute: instrumented.asyncFn(instruments?.execute, typedOrchestrator.execute),
subscribe: instrumented.asyncFn(instruments?.subscribe, typedOrchestrator.subscribe),
schema: typedOrchestrator.getCurrentSchema(),

@@ -24,0 +27,0 @@ };

@@ -0,1 +1,2 @@

import { composeInstruments, getInstrumented, getInstrumentsAndPlugins, } from '@envelop/instruments';
import { createEnvelopOrchestrator } from './orchestrator.js';

@@ -6,15 +7,17 @@ function notEmpty(value) {

export function envelop(options) {
const plugins = options.plugins.filter(notEmpty);
const { pluginInstruments, plugins } = getInstrumentsAndPlugins(options.plugins.filter(notEmpty));
const instruments = composeInstruments(pluginInstruments);
const orchestrator = createEnvelopOrchestrator({
plugins,
});
const getEnveloped = (initialContext = {}) => {
const getEnveloped = (context = {}) => {
const instrumented = getInstrumented({ context });
const typedOrchestrator = orchestrator;
typedOrchestrator.init(initialContext);
instrumented.fn(instruments?.init, orchestrator.init)(context);
return {
parse: typedOrchestrator.parse(initialContext),
validate: typedOrchestrator.validate(initialContext),
contextFactory: typedOrchestrator.contextFactory(initialContext),
execute: typedOrchestrator.execute,
subscribe: typedOrchestrator.subscribe,
parse: instrumented.fn(instruments?.parse, typedOrchestrator.parse(context)),
validate: instrumented.fn(instruments?.validate, typedOrchestrator.validate(context)),
contextFactory: instrumented.fn(instruments?.context, typedOrchestrator.contextFactory(context)),
execute: instrumented.asyncFn(instruments?.execute, typedOrchestrator.execute),
subscribe: instrumented.asyncFn(instruments?.subscribe, typedOrchestrator.subscribe),
schema: typedOrchestrator.getCurrentSchema(),

@@ -21,0 +24,0 @@ };

{
"name": "@envelop/core",
"version": "5.1.1",
"version": "5.2.0-alpha-20250225223609-ad770ba43578c029a5f7274b702cbc310acccc85",
"sideEffects": false,

@@ -8,3 +8,4 @@ "dependencies": {

"tslib": "^2.5.0",
"@envelop/types": "^5.1.1"
"@envelop/instruments": "^5.0.3",
"@envelop/types": "^5.2.0-alpha-20250225223609-ad770ba43578c029a5f7274b702cbc310acccc85"
},

@@ -11,0 +12,0 @@ "repository": {

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