New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@cushin/api-codegen

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cushin/api-codegen - npm Package Compare versions

Comparing version
5.0.7
to
5.0.8
+20
-8
dist/cli.js

@@ -567,3 +567,3 @@ #!/usr/bin/env node

/**
* Initialize API client with auth callbacks
* Initialize API client with auth callbacks and optional global headers
* Call this function in your auth provider setup

@@ -580,6 +580,12 @@ *

*
* initializeAPIClient(authCallbacks);
* initializeAPIClient(authCallbacks, {
* 'X-Client-ID': 'my-app',
* 'X-Environment': 'production',
* });
*/
export const initializeAPIClient = (authCallbacks: AuthCallbacks) => {
baseClient = createAPIClient(apiConfig, authCallbacks) as any;
export const initializeAPIClient = (
authCallbacks: AuthCallbacks,
globalHeaders?: Record<string, string>,
) => {
baseClient = createAPIClient(apiConfig, authCallbacks, globalHeaders) as any;
return baseClient;

@@ -617,3 +623,3 @@ };

/**
* Initialize server-side API client with auth callbacks
* Initialize server-side API client with auth callbacks and optional global headers
* Call this in Server Actions or Route Handlers where you need authentication

@@ -635,6 +641,12 @@ *

*
* initializeServerClient(authCallbacks);
* initializeServerClient(authCallbacks, {
* 'X-Server-ID': 'server-1',
* 'X-Request-ID': requestId,
* });
*/
export const initializeServerClient = (authCallbacks: AuthCallbacks) => {
serverClient = createAPIClient(apiConfig, authCallbacks) as any;
export const initializeServerClient = (
authCallbacks: AuthCallbacks,
globalHeaders?: Record<string, string>,
) => {
serverClient = createAPIClient(apiConfig, authCallbacks, globalHeaders) as any;
return serverClient;

@@ -641,0 +653,0 @@ };

@@ -564,3 +564,3 @@ // src/index.ts

/**
* Initialize API client with auth callbacks
* Initialize API client with auth callbacks and optional global headers
* Call this function in your auth provider setup

@@ -577,6 +577,12 @@ *

*
* initializeAPIClient(authCallbacks);
* initializeAPIClient(authCallbacks, {
* 'X-Client-ID': 'my-app',
* 'X-Environment': 'production',
* });
*/
export const initializeAPIClient = (authCallbacks: AuthCallbacks) => {
baseClient = createAPIClient(apiConfig, authCallbacks) as any;
export const initializeAPIClient = (
authCallbacks: AuthCallbacks,
globalHeaders?: Record<string, string>,
) => {
baseClient = createAPIClient(apiConfig, authCallbacks, globalHeaders) as any;
return baseClient;

@@ -614,3 +620,3 @@ };

/**
* Initialize server-side API client with auth callbacks
* Initialize server-side API client with auth callbacks and optional global headers
* Call this in Server Actions or Route Handlers where you need authentication

@@ -632,6 +638,12 @@ *

*
* initializeServerClient(authCallbacks);
* initializeServerClient(authCallbacks, {
* 'X-Server-ID': 'server-1',
* 'X-Request-ID': requestId,
* });
*/
export const initializeServerClient = (authCallbacks: AuthCallbacks) => {
serverClient = createAPIClient(apiConfig, authCallbacks) as any;
export const initializeServerClient = (
authCallbacks: AuthCallbacks,
globalHeaders?: Record<string, string>,
) => {
serverClient = createAPIClient(apiConfig, authCallbacks, globalHeaders) as any;
return serverClient;

@@ -638,0 +650,0 @@ };

{
"name": "@cushin/api-codegen",
"version": "5.0.7",
"version": "5.0.8",
"description": "Type-safe API client generator for React/Next.js with automatic hooks and server actions generation",

@@ -63,3 +63,3 @@ "type": "module",

"ora": "^8.0.0",
"@cushin/api-runtime": "5.0.7",
"@cushin/api-runtime": "5.0.8",
"@cushin/codegen-cli": "5.0.0"

@@ -66,0 +66,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display