
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
@devup-api/next-plugin
Advanced tools
Next.js plugin for devup-api that generates TypeScript types from OpenAPI schemas.
npm install @devup-api/next-plugin @devup-api/fetch
Add the plugin to your next.config.ts:
import devupApi from '@devup-api/next-plugin'
export default devupApi({
reactStrictMode: true,
})
import devupApi from '@devup-api/next-plugin'
export default devupApi(
{
reactStrictMode: true,
},
{
openapiFile: './api/openapi.json',
convertCase: 'camel',
tempDir: 'temp'
}
)
interface DevupApiOptions {
/**
* OpenAPI file path
* @default 'openapi.json'
*/
openapiFile?: string
/**
* Temporary directory for storing generated files
* @default 'df'
*/
tempDir?: string
/**
* Case conversion type for API endpoint names and parameters
* @default 'camel'
*/
convertCase?: 'snake' | 'camel' | 'pascal' | 'maintain'
/**
* Whether to make all properties non-nullable by default
* @default false
*/
requestDefaultNonNullable?: boolean
/**
* Whether to make all request properties non-nullable by default
* @default true
*/
responseDefaultNonNullable?: boolean
/**
* Generate operationId-based Server Action wrappers.
* Disable with false or { enabled: false }.
* @default true
*/
serverActions?: boolean | {
enabled?: boolean
baseUrl?: string
}
}
When using Turbopack (Next.js 13+), the plugin:
openapi.json fileprocess.env.DEVUP_API_URL_MAPdf/server.ts by default@devup-api/fetchWhen using Webpack, the plugin uses @devup-api/webpack-plugin internally to:
df/server.ts by default@devup-api/fetchTo use the generated types, add the generated type definitions to your tsconfig.json:
{
"compilerOptions": {
// ... your compiler options
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
".next/dev/types/**/*.ts",
"df/**/*.d.ts"
]
}
Note: If you've customized
tempDirin plugin options, adjust the path accordingly (e.g.,"your-temp-dir/**/*.d.ts").
After the plugin runs, you can use the generated types with @devup-api/fetch:
import { createApi } from '@devup-api/fetch'
const api = createApi('https://api.example.com')
// Types are automatically available
const users = await api.get('getUsers', {})
devup-api uses a two-phase typing system:
any to prevent type errors. Your code compiles and runs smoothly.api.d.ts is generated, full type safety is enforced with strict type checking.This ensures you can start coding immediately without waiting for the build, while still getting full type safety in production.
Apache 2.0
FAQs
Unknown package
We found that @devup-api/next-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.