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

@nmtjs/contract

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nmtjs/contract - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

5

dist/schemas/procedure.js

@@ -1,4 +0,3 @@

import { createSchema } from "../utils.js";
export const ProcedureContract = (input, output, timeout, schemaOptions = {})=>{
return createSchema({
return {
...schemaOptions,

@@ -12,3 +11,3 @@ type: 'neemata:procedure',

transports: undefined
});
};
};

26

dist/schemas/subscription.js
import { createSchema } from "../utils.js";
export const SubscriptionContract = (input, output, events, timeout, schemaOptions = {})=>{
return ()=>createSchema({
...schemaOptions,
type: 'neemata:subscription',
input,
output,
events,
timeout,
options: undefined,
name: undefined,
serviceName: undefined,
transports: undefined
});
return {
$withOptions: ()=>createSchema({
...schemaOptions,
type: 'neemata:subscription',
input,
output,
events,
timeout,
options: undefined,
name: undefined,
serviceName: undefined,
transports: undefined
})
};
};

@@ -12,8 +12,8 @@ {

"peerDependencies": {
"@nmtjs/common": "0.2.1",
"@nmtjs/type": "0.2.1"
"@nmtjs/type": "0.3.0",
"@nmtjs/common": "0.3.0"
},
"devDependencies": {
"@nmtjs/type": "0.2.1",
"@nmtjs/common": "0.2.1"
"@nmtjs/type": "0.3.0",
"@nmtjs/common": "0.3.0"
},

@@ -27,3 +27,3 @@ "files": [

],
"version": "0.2.1",
"version": "0.3.0",
"scripts": {

@@ -30,0 +30,0 @@ "build": "neemata-build -p neutral --root=./src './**/*.ts'",

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

import { t as baseT } from '@nmtjs/type'
import { EventContract, type TEventContract } from './schemas/event.ts'

@@ -11,2 +10,3 @@

import {
type SubcriptionOptions,
SubscriptionContract,

@@ -23,2 +23,3 @@ type TSubscriptionContract,

TSubscriptionContract,
SubcriptionOptions,
}

@@ -25,0 +26,0 @@

@@ -48,4 +48,4 @@ import type { BaseType } from '@nmtjs/type'

schemaOptions: ContractSchemaOptions = {} as ContractSchemaOptions,
) => {
return createSchema<TProcedureContract<Input, Output>>({
): TProcedureContract<Input, Output> => {
return {
...schemaOptions,

@@ -59,3 +59,3 @@ type: 'neemata:procedure',

transports: undefined,
})
}
}

@@ -6,3 +6,3 @@ import type { BaseType } from '@nmtjs/type'

export type TSubcriptionOptions = Record<string, string | number>
export type SubcriptionOptions = Record<string, string | number>

@@ -12,3 +12,3 @@ export interface TSubscriptionContract<

Output extends BaseType = BaseType,
Options extends TSubcriptionOptions = TSubcriptionOptions,
Options extends SubcriptionOptions = SubcriptionOptions,
Events extends Record<string, TEventContract> = Record<

@@ -49,15 +49,17 @@ string,

) => {
return <Options extends TSubcriptionOptions>() =>
createSchema<TSubscriptionContract<Input, Output, Options, Events>>({
...schemaOptions,
type: 'neemata:subscription',
input,
output,
events,
timeout,
options: undefined as unknown as Options,
name: undefined,
serviceName: undefined,
transports: undefined,
})
return {
$withOptions: <Options extends SubcriptionOptions>() =>
createSchema<TSubscriptionContract<Input, Output, Options, Events>>({
...schemaOptions,
type: 'neemata:subscription',
input,
output,
events,
timeout,
options: undefined as unknown as Options,
name: undefined,
serviceName: undefined,
transports: undefined,
}),
}
}

Sorry, the diff of this file is not supported yet

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