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

@coobaha/typed-fastify

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coobaha/typed-fastify - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

11

lib/typed-fastify.js

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

const addSchema = (fastify, opts) => {
var _a, _b;
const schema = opts.jsonSchema.schema;

@@ -76,2 +77,10 @@ if (schema === null || schema === void 0 ? void 0 : schema.$id) {

const handler = opts.service[path];
const fastifySchema = opts.jsonSchema.fastify;
const routeSchema = fastifySchema[path];
const schema = {
/* c8 ignore start */
...(_a = routeSchema === null || routeSchema === void 0 ? void 0 : routeSchema.request) === null || _a === void 0 ? void 0 : _a.properties,
response: (_b = routeSchema === null || routeSchema === void 0 ? void 0 : routeSchema.response) !== null && _b !== void 0 ? _b : {},
/* c8 ignore stop */
};
switch (typeof handler) {

@@ -85,2 +94,3 @@ case 'object':

url: route.join(' '),
schema,
});

@@ -94,2 +104,3 @@ break;

url: route.join(' '),
schema,
});

@@ -96,0 +107,0 @@ break;

2

package.json
{
"name": "@coobaha/typed-fastify",
"description": "opinionated types for fastify",
"version": "2.1.3",
"version": "2.1.4",
"bin": {

@@ -6,0 +6,0 @@ "tfs": "bin/gen.bin.js",

@@ -107,2 +107,11 @@ import type * as F from 'fastify';

const fastifySchema = opts.jsonSchema.fastify;
const routeSchema = fastifySchema[path];
const schema = {
/* c8 ignore start */
...routeSchema?.request?.properties,
response: routeSchema?.response ?? {},
/* c8 ignore stop */
};
switch (typeof handler) {

@@ -116,2 +125,3 @@ case 'object':

url: route.join(' '),
schema,
});

@@ -125,2 +135,3 @@ break;

url: route.join(' '),
schema,
});

@@ -127,0 +138,0 @@ break;

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