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
1
Versions
1425
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.0-alpha-20250218061716-a150c3b208ba69aaeea359489fad8fc2168a95ac to 5.1.0-alpha-20250218165318-0f4068a24afd863b876d6286931b9f1d8131a982

cjs/tracer.js

17

cjs/create.js

@@ -5,2 +5,3 @@ "use strict";

const orchestrator_js_1 = require("./orchestrator.js");
const tracer_js_1 = require("./tracer.js");
function notEmpty(value) {

@@ -11,14 +12,16 @@ return value != null;

const plugins = options.plugins.filter(notEmpty);
const tracer = (0, tracer_js_1.getTracer)(plugins);
const orchestrator = (0, orchestrator_js_1.createEnvelopOrchestrator)({
plugins,
});
const getEnveloped = (initialContext = {}) => {
const getEnveloped = (context = {}) => {
const traced = (0, tracer_js_1.getTraced)({ context });
const typedOrchestrator = orchestrator;
typedOrchestrator.init(initialContext);
traced.fn(tracer?.init, orchestrator.init)(context);
return {
parse: typedOrchestrator.parse(initialContext),
validate: typedOrchestrator.validate(initialContext),
contextFactory: typedOrchestrator.contextFactory(initialContext),
execute: typedOrchestrator.execute,
subscribe: typedOrchestrator.subscribe,
parse: traced.fn(tracer?.parse, typedOrchestrator.parse(context)),
validate: traced.fn(tracer?.validate, typedOrchestrator.validate(context)),
contextFactory: traced.fn(tracer?.context, typedOrchestrator.contextFactory(context)),
execute: traced.asyncFn(tracer?.execute, typedOrchestrator.execute),
subscribe: traced.asyncFn(tracer?.subscribe, typedOrchestrator.subscribe),
schema: typedOrchestrator.getCurrentSchema(),

@@ -25,0 +28,0 @@ };

import { createEnvelopOrchestrator } from './orchestrator.js';
import { getTraced, getTracer } from './tracer.js';
function notEmpty(value) {

@@ -7,14 +8,16 @@ return value != null;

const plugins = options.plugins.filter(notEmpty);
const tracer = getTracer(plugins);
const orchestrator = createEnvelopOrchestrator({
plugins,
});
const getEnveloped = (initialContext = {}) => {
const getEnveloped = (context = {}) => {
const traced = getTraced({ context });
const typedOrchestrator = orchestrator;
typedOrchestrator.init(initialContext);
traced.fn(tracer?.init, orchestrator.init)(context);
return {
parse: typedOrchestrator.parse(initialContext),
validate: typedOrchestrator.validate(initialContext),
contextFactory: typedOrchestrator.contextFactory(initialContext),
execute: typedOrchestrator.execute,
subscribe: typedOrchestrator.subscribe,
parse: traced.fn(tracer?.parse, typedOrchestrator.parse(context)),
validate: traced.fn(tracer?.validate, typedOrchestrator.validate(context)),
contextFactory: traced.fn(tracer?.context, typedOrchestrator.contextFactory(context)),
execute: traced.asyncFn(tracer?.execute, typedOrchestrator.execute),
subscribe: traced.asyncFn(tracer?.subscribe, typedOrchestrator.subscribe),
schema: typedOrchestrator.getCurrentSchema(),

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

{
"name": "@envelop/core",
"version": "5.1.0-alpha-20250218061716-a150c3b208ba69aaeea359489fad8fc2168a95ac",
"version": "5.1.0-alpha-20250218165318-0f4068a24afd863b876d6286931b9f1d8131a982",
"sideEffects": false,
"dependencies": {
"@envelop/types": "5.1.0-alpha-20250218061716-a150c3b208ba69aaeea359489fad8fc2168a95ac",
"@envelop/types": "5.1.0-alpha-20250218165318-0f4068a24afd863b876d6286931b9f1d8131a982",
"tslib": "^2.5.0"

@@ -8,0 +8,0 @@ },

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