🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

next-rest-framework

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-rest-framework - npm Package Compare versions

Comparing version

to
4.1.1

23

dist/cli.js

@@ -75,4 +75,10 @@ #!/usr/bin/env node

const getCleanedRpcApiRoutes = (files) => files.filter((file) => file.endsWith('rpc/[operationId].ts'));
const isPathItem = (obj) => typeof obj === 'object';
const isNrfOasData = (x) => {
if (typeof x !== 'object' || x === null) {
return false;
}
return 'paths' in x;
};
let paths = {};
let schemas = {};
try {

@@ -91,4 +97,5 @@ // Scan `app` folder.

const data = handler._getPaths((0, shared_1.getRouteName)(route));
if (isPathItem(data)) {
paths = { ...paths, ...data };
if (isNrfOasData(data)) {
paths = { ...paths, ...data.paths };
schemas = { ...schemas, ...data.schemas };
}

@@ -112,4 +119,5 @@ });

const data = res.default._getPaths((0, shared_1.getApiRouteName)(apiRoute));
if (isPathItem(data)) {
paths = { ...paths, ...data };
if (isNrfOasData(data)) {
paths = { ...paths, ...data.paths };
schemas = { ...schemas, ...data.schemas };
}

@@ -125,3 +133,6 @@ }));

}
return { paths };
return {
paths,
schemas
};
};

@@ -128,0 +139,0 @@ const findConfig = async ({ distDir, configPath }) => {

{
"name": "next-rest-framework",
"version": "4.1.0",
"version": "4.1.1",
"description": "Next REST Framework - Type-safe, self-documenting APIs for Next.js",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet