Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xyo-network/payload-plugin

Package Overview
Dependencies
Maintainers
0
Versions
968
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xyo-network/payload-plugin - npm Package Compare versions

Comparing version 3.0.7 to 3.0.8

dist/neutral/createPlugin.d.ts

42

dist/neutral/index.d.ts

@@ -1,38 +0,4 @@

import * as _xyo_network_payload_model from '@xyo-network/payload-model';
import { Payload } from '@xyo-network/payload-model';
import { Validator } from '@xylabs/object';
import { PayloadBuilder } from '@xyo-network/payload-builder';
import { PayloadWrapper } from '@xyo-network/payload-wrapper';
type PayloadPluginFunc<TPayload extends Payload = Payload> = () => PayloadPlugin<TPayload>;
type PayloadPlugin<TPayload extends Payload = Payload> = {
build?: () => PayloadBuilder<TPayload>;
jsonSchema?: object;
schema: TPayload['schema'];
template?: () => Partial<TPayload>;
validate?: (payload: Payload) => Validator<Payload>;
wrap?: (payload: Payload) => PayloadWrapper;
};
declare const defaultPayloadPluginFunctions: <T extends Payload>(schema: string) => PayloadPlugin<T>;
declare const createPayloadPlugin: <TPayload extends Payload = {
schema: string;
} & _xyo_network_payload_model.PayloadFields>(plugin: PayloadPlugin<TPayload>) => PayloadPlugin<TPayload>;
declare class PayloadPluginResolver {
schema: "network.xyo.payload";
protected _plugins: Record<string, PayloadPlugin>;
protected defaultPlugin: PayloadPlugin;
constructor(plugins?: PayloadPlugin<Payload>[], defaultPlugin?: PayloadPlugin<{
schema: string;
} & _xyo_network_payload_model.PayloadFields>);
plugins(): PayloadPlugin[];
register<TPlugin extends PayloadPlugin = PayloadPlugin>(plugin: TPlugin): this;
resolve(schema?: string): PayloadPlugin;
resolve(payload: Payload): PayloadPlugin;
schemas(): string[];
validate(payload: Payload): Validator<Payload> | undefined;
wrap(payload: Payload): PayloadWrapper<Payload> | undefined;
}
export { type PayloadPlugin, type PayloadPluginFunc, PayloadPluginResolver, createPayloadPlugin, defaultPayloadPluginFunctions };
export * from './createPlugin.ts';
export * from './Plugin.ts';
export * from './Resolver.ts';
//# sourceMappingURL=index.d.ts.map
{
"name": "@xyo-network/payload-plugin",
"version": "3.0.7",
"version": "3.0.8",
"description": "Primary SDK for using XYO Protocol 2.0",

@@ -32,12 +32,12 @@ "homepage": "https://xyo.network",

"dependencies": {
"@xylabs/assert": "^4.0.2",
"@xylabs/object": "^4.0.2",
"@xyo-network/payload-builder": "^3.0.7",
"@xyo-network/payload-model": "^3.0.7",
"@xyo-network/payload-validator": "^3.0.7",
"@xyo-network/payload-wrapper": "^3.0.7"
"@xylabs/assert": "^4.0.3",
"@xylabs/object": "^4.0.3",
"@xyo-network/payload-builder": "^3.0.8",
"@xyo-network/payload-model": "^3.0.8",
"@xyo-network/payload-validator": "^3.0.8",
"@xyo-network/payload-wrapper": "^3.0.8"
},
"devDependencies": {
"@xylabs/ts-scripts-yarn3": "^4.0.0",
"@xylabs/tsconfig": "^4.0.0",
"@xylabs/ts-scripts-yarn3": "^4.0.7",
"@xylabs/tsconfig": "^4.0.7",
"typescript": "^5.5.4"

@@ -44,0 +44,0 @@ },

@@ -19,5 +19,3 @@ import type { Validator } from '@xylabs/object'

/** @param defaultPlugin Specifies the plugin to be used if no plugins resolve */
defaultPlugin = createPayloadPlugin<Payload>({
schema: PayloadSchema,
}),
defaultPlugin = createPayloadPlugin<Payload>({ schema: PayloadSchema }),
) {

@@ -24,0 +22,0 @@ for (const plugin of plugins ?? []) this.register(plugin)

@@ -5,5 +5,3 @@ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'

browser: {},
neutral: {
src: true,
},
neutral: { src: true },
node: {},

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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