Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@devup-api/core

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devup-api/core - npm Package Compare versions

Comparing version
0.1.0
to
0.1.1
+5
-1
package.json
{
"name": "@devup-api/core",
"version": "0.1.0",
"version": "0.1.1",
"license": "Apache-2.0",
"type": "module",

@@ -12,2 +13,5 @@ "exports": {

},
"files": [
"dist"
],
"scripts": {

@@ -14,0 +18,0 @@ "build": "tsc && bun build --target node --outfile=dist/index.js src/index.ts --production --packages=external && bun build --target node --outfile=dist/index.cjs --format=cjs src/index.ts --production --packages=external"

-8
import { expect, test } from 'bun:test'
import * as indexModule from '../index'
test('index.ts exports all types', () => {
expect(indexModule).toBeDefined()
expect(typeof indexModule).toBe('object')
expect(Object.keys(indexModule)).toEqual([])
})
export type Additional<
T extends string,
Target extends object,
> = T extends keyof Target ? Target[T] : object
export type RequiredOptions<T extends object> = keyof T extends undefined
? never
: T
export type DevupApiRequestInit = Omit<RequestInit, 'body'> & {
body?: object | RequestInit['body']
params?: Record<string, string | number | boolean | null | undefined>
}
// biome-ignore lint/suspicious/noExplicitAny: any is used to allow for flexibility in the type
export type ExtractValue<T, V extends string, F = any> = V extends keyof T
? T[V]
: F
import type { Conditional } from './utils'
// biome-ignore lint/suspicious/noEmptyInterface: empty interface
export interface DevupGetApiStruct {}
// biome-ignore lint/suspicious/noEmptyInterface: empty interface
export interface DevupPostApiStruct {}
// biome-ignore lint/suspicious/noEmptyInterface: empty interface
export interface DevupPutApiStruct {}
// biome-ignore lint/suspicious/noEmptyInterface: empty interface
export interface DevupDeleteApiStruct {}
// biome-ignore lint/suspicious/noEmptyInterface: empty interface
export interface DevupPatchApiStruct {}
// biome-ignore lint/suspicious/noEmptyInterface: empty interface
export interface DevupRequestComponentStruct {}
// biome-ignore lint/suspicious/noEmptyInterface: empty interface
export interface DevupResponseComponentStruct {}
export type DevupApiStruct = DevupGetApiStruct &
DevupPostApiStruct &
DevupPutApiStruct &
DevupDeleteApiStruct &
DevupPatchApiStruct
export type DevupGetApiStructKey = Conditional<DevupGetApiStruct>
export type DevupPostApiStructKey = Conditional<DevupPostApiStruct>
export type DevupPutApiStructKey = Conditional<DevupPutApiStruct>
export type DevupDeleteApiStructKey = Conditional<DevupDeleteApiStruct>
export type DevupPatchApiStructKey = Conditional<DevupPatchApiStruct>
export type DevupApiStructKey = Conditional<DevupApiStruct>
export * from './additional'
export * from './api-struct'
export * from './options'
export * from './url-map'
export * from './utils'
export interface DevupApiTypeGeneratorOptions {
/**
* 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
}
export interface DevupApiOptions extends DevupApiTypeGeneratorOptions {
/**
* Temporary directory for storing generated files
* @default {'df'}
*/
tempDir?: string
/**
* OpenAPI file path
* @default {'openapi.json'}
*/
openapiFile?: string
}
export interface UrlMapValue {
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'
url: string
}
export type Conditional<T> = keyof T extends undefined ? string : keyof T
{
"compilerOptions": {
// Environment setup & latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"verbatimModuleSyntax": true,
"emitDeclarationOnly": true,
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false,
"declaration": true,
"declarationMap": true,
"outDir": "dist",
"rootDir": "src"
},
"include": ["src/**/*.ts"],
"exclude": ["dist", "node_modules"]
}