
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@devup-api/rsbuild-plugin
Advanced tools
Rsbuild plugin for devup-api that generates TypeScript types from OpenAPI schemas.
npm install @devup-api/rsbuild-plugin @devup-api/fetch
Add the plugin to your rsbuild.config.ts:
import { defineConfig } from '@rsbuild/core'
import { devupApiRsbuildPlugin } from '@devup-api/rsbuild-plugin'
export default defineConfig({
plugins: [devupApiRsbuildPlugin()],
})
import { defineConfig } from '@rsbuild/core'
import { devupApiRsbuildPlugin } from '@devup-api/rsbuild-plugin'
export default defineConfig({
plugins: [
devupApiRsbuildPlugin({
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
}
}
openapi.json file during buildapi.d.ts)process.env.DEVUP_API_URL_MAP via Rsbuild's define featuredf/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": [
"src",
"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/rsbuild-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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.