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

@nyth/common

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nyth/common - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

dist/es6/http-adapter.js

4

dist/http-adapter.d.ts
/// <reference types="node" />
import { Server } from 'http';
import { Server as HttpServer } from 'http';
import { IRpcAdapter } from './typings';
export interface IHttpAdapter extends IRpcAdapter {
adjust<T>(constructor: new (arg: {
server: Server;
server: HttpServer;
}) => T): T;

@@ -8,0 +8,0 @@ close(): Promise<void>;

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

export { BaseAdapter } from './base-adapter';
export { INTERNAL_ERROR_MESSAGE, PERMISSIONS_DENIED_MESSAGE, AppError, ScenarioError, PermissionsDeniedError, SystemError, } from './errors';
export { HandlerValidationSuccess, HANDLER_VALIDATION_SUCCESS, HandlerValidationFail, } from './handler-validation-result';
export { IHttpAdapter } from './http-adapter';
export { EScenarioStatus, IRpcResult, RpcResult, ScenarioSuccessResult, PermissionsDeniedResult, ScenarioFailResult, SystemErrorResult, } from './responses';
export { ISerializer, defaultSerializer } from './serializer';
export { IRpcRequest, IRpcExecutor, IRpcAdapter, IRpcAdapterConstructor, IHandlerValidationSuccess, IHandlerValidationFail, THandlerValidationResult, IRpcMethodHandler, IExecutor, IApplication, IRouting, IApplicationFactory, } from './typings';
export { IRpcExecutor, IRpcAdapter, IRpcAdapterConstructor, IRpcMethodHandler, IExecutor, IApplication, IRouting, IApplicationFactory, } from './typings';

@@ -1,12 +0,4 @@

import { BaseAdapter } from './base-adapter';
import { RpcResult } from './responses';
import { ISerializer } from './serializer';
export interface IRpcRequest<Payload = unknown> {
readonly method: string;
readonly payload: Payload;
readonly correlationId?: string | number | null;
readonly requestId?: string | number | null;
readonly version?: number | null;
readonly timestamp?: number | null;
}
import { BaseAdapter } from '@nyth/base-adapter';
import { RpcResult, IRpcRequest, THandlerValidationResult } from '@nyth/models';
import { ISerializer } from '@nyth/serializer';
export type IRpcExecutor = (rpcCall: IRpcRequest) => Promise<RpcResult>;

@@ -18,11 +10,2 @@ export interface IRpcAdapter extends BaseAdapter {

export type IRpcAdapterConstructor<O = unknown> = new (options: O, serializer?: ISerializer) => IRpcAdapter;
export interface IHandlerValidationSuccess {
readonly isValidCallData: true;
readonly validationErrorMessage?: null;
}
export interface IHandlerValidationFail {
readonly isValidCallData: false;
readonly validationErrorMessage: string;
}
export type THandlerValidationResult = IHandlerValidationSuccess | IHandlerValidationFail;
export interface IRpcMethodHandler<Result = unknown, CallData = unknown> {

@@ -29,0 +12,0 @@ validate(rpcCallPayload: CallData): THandlerValidationResult | Promise<THandlerValidationResult>;

{
"name": "@nyth/common",
"version": "0.4.0",
"version": "0.5.0",
"description": "nyth",

@@ -12,3 +12,3 @@ "author": "Andrey Sakharov <caxap_8787@mail.ru> (https://www.linkedin.com/in/andrey-sakharov/)",

"require": "./dist/index.cjs",
"import": "./es6.mjs"
"import": "./dist/es6/index.mjs"
}

@@ -21,11 +21,14 @@ },

"scripts": {
"build": "(rm -rf dist || npx rimraf dist) && tsc -p tsconfig.json && mv dist/index.js dist/index.cjs"
"build": "npm run build_cjs && npm run build_es6",
"build_cjs": "tsc -p tsconfig.json && mv dist/index.js dist/index.cjs",
"build_es6": "tsc -p tsconfig.es6.json && mv dist/es6/index.js dist/es6/index.mjs",
"prebuild": "rm -rf dist || npx rimraf dist"
},
"files": [
"dist",
"es6.mjs"
"dist"
],
"repository": {
"type": "git",
"url": "git+https://github.com/muturgan/nyth.git"
"url": "git+https://github.com/muturgan/nyth.git",
"directory": "packages/common"
},

@@ -36,4 +39,8 @@ "bugs": {

"homepage": "https://github.com/muturgan/nyth#readme",
"dependencies": {
"@nyth/base-adapter": "^0.5.0",
"@nyth/models": "^0.5.0",
"@nyth/serializer": "^0.5.0"
},
"devDependencies": {
"@types/node": "^20.2.5",
"typescript": "^5.1.3"

@@ -40,0 +47,0 @@ },

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