next-rest-framework
Version:
Next REST Framework - Type-safe, self-documenting APIs for Next.js
107 lines (103 loc) • 3.22 kB
JavaScript
import {
__commonJS
} from "./chunk-BXO7ZPPU.mjs";
// package.json
var require_package = __commonJS({
"package.json"(exports, module) {
module.exports = {
name: "next-rest-framework",
version: "4.3.0",
description: "Next REST Framework - Type-safe, self-documenting APIs for Next.js",
keywords: [
"nextjs",
"rest",
"api",
"next-rest-framework"
],
homepage: "https://github.com/blomqma/next-rest-framework#readme",
bugs: {
url: "https://github.com/blomqma/next-rest-framework/issues",
email: "blomqma@omg.lol"
},
license: "ISC",
author: "Markus Blomqvist <blomqma@omg.lol>",
files: [
"dist"
],
main: "dist/index.js",
module: "dist/index.mjs",
types: "dist/index.d.ts",
repository: {
type: "git",
url: "https://github.com/blomqma/next-rest-framework.git",
directory: "packages/next-rest-framework"
},
scripts: {
lint: "tsc",
test: "jest",
"test:watch": "jest --watch",
build: "tsup --dts"
},
bin: {
"next-rest-framework": "./dist/cli/index.js"
},
dependencies: {
"@esbuild-plugins/tsconfig-paths": "^0.1.2",
chalk: "4.1.2",
commander: "10.0.1",
esbuild: "0.19.11",
lodash: "4.17.21",
prettier: "3.0.2",
"tiny-glob": "0.2.9",
"zod-to-json-schema": "3.21.4"
},
devDependencies: {
"@types/jest": "29.5.4",
"@types/lodash": "4.14.197",
jest: "29.6.4",
"node-mocks-http": "1.13.0",
"openapi-types": "12.1.3",
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
tsup: "8.0.1",
typescript: "*"
}
};
}
});
// src/constants.ts
var DEFAULT_ERRORS = {
unexpectedError: "An unknown error occurred, trying again might help.",
methodNotAllowed: "Method not allowed.",
notFound: "Not found.",
notImplemented: "Not implemented.",
invalidMediaType: "Invalid media type.",
operationNotAllowed: "Operation not allowed.",
invalidRequestBody: "Invalid request body.",
missingRequestBody: "Missing request body.",
invalidQueryParameters: "Invalid query parameters."
};
var ValidMethod = /* @__PURE__ */ ((ValidMethod2) => {
ValidMethod2["GET"] = "GET";
ValidMethod2["PUT"] = "PUT";
ValidMethod2["POST"] = "POST";
ValidMethod2["DELETE"] = "DELETE";
ValidMethod2["OPTIONS"] = "OPTIONS";
ValidMethod2["HEAD"] = "HEAD";
ValidMethod2["PATCH"] = "PATCH";
return ValidMethod2;
})(ValidMethod || {});
var VERSION = require_package().version;
var DEFAULT_TITLE = "Next REST Framework";
var DEFAULT_DESCRIPTION = "This is an autogenerated documentation by Next REST Framework.";
var DEFAULT_FAVICON_URL = "https://raw.githubusercontent.com/blomqma/next-rest-framework/main/docs/static/img/favicon.ico";
var DEFAULT_LOGO_URL = "https://raw.githubusercontent.com/blomqma/next-rest-framework/d02224b38d07ede85257b22ed50159a947681f99/packages/next-rest-framework/logo.svg";
export {
DEFAULT_ERRORS,
ValidMethod,
VERSION,
DEFAULT_TITLE,
DEFAULT_DESCRIPTION,
DEFAULT_FAVICON_URL,
DEFAULT_LOGO_URL
};