@arch-api/next-api-routes-rest
Advanced tools
Comparing version 1.0.0 to 1.1.0
import { NextApiRequest, NextApiResponse } from 'next'; | ||
import { NextHandler } from 'next-connect'; | ||
import nextConnect, { NextHandler } from 'next-connect'; | ||
import { Action, Responder } from '@arch-api/rest'; | ||
@@ -40,2 +40,4 @@ | ||
export { CreatedNextApiRouteResponder, HttpNextHandler, HttpRequest, HttpResponse, JsonNextApiRouteResponder, NextApiRouteAction, NextApiRouteResponder, NoContentNextApiRouteResponder, NotFoundNextApiRouteResponder }; | ||
declare const NextApiRouteConnect: typeof nextConnect<HttpRequest, HttpResponse>; | ||
export { CreatedNextApiRouteResponder, HttpNextHandler, HttpRequest, HttpResponse, JsonNextApiRouteResponder, NextApiRouteAction, NextApiRouteConnect, NextApiRouteResponder, NoContentNextApiRouteResponder, NotFoundNextApiRouteResponder }; |
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -18,2 +20,6 @@ var __export = (target, all) => { | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
@@ -26,2 +32,3 @@ | ||
JsonNextApiRouteResponder: () => JsonNextApiRouteResponder_default, | ||
NextApiRouteConnect: () => NextApiRouteConnect_default, | ||
NoContentNextApiRouteResponder: () => NoContentNextApiRouteResponder_default, | ||
@@ -69,2 +76,12 @@ NotFoundNextApiRouteResponder: () => NotFoundNextApiRouteResponder_default | ||
var NotFoundNextApiRouteResponder_default = NotFoundNextApiRouteResponder; | ||
// src/Connect/NextApiRouteConnect.ts | ||
var import_http_status4 = require("@arch-api/http-status"); | ||
var import_next_connect = __toESM(require("next-connect")); | ||
var NextApiRouteConnect = (...args) => { | ||
return (0, import_next_connect.default)(...args).options((req, res) => { | ||
return res.status(import_http_status4.HttpStatuses.OK).end(); | ||
}); | ||
}; | ||
var NextApiRouteConnect_default = NextApiRouteConnect; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -74,4 +91,5 @@ 0 && (module.exports = { | ||
JsonNextApiRouteResponder, | ||
NextApiRouteConnect, | ||
NoContentNextApiRouteResponder, | ||
NotFoundNextApiRouteResponder | ||
}); |
{ | ||
"name": "@arch-api/next-api-routes-rest", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Arch Api - Next Api Routes Rest", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8089
166