BREAKING CHANGE(core): major architectural refactoring with fetch-like API
This commit is contained in:
14
ts/index.ts
14
ts/index.ts
@@ -1,16 +1,12 @@
|
||||
// Legacy API exports (for backward compatibility)
|
||||
export { request, safeGet } from './legacy/smartrequest.request.js';
|
||||
export type { IExtendedIncomingMessage } from './legacy/smartrequest.request.js';
|
||||
export type { ISmartRequestOptions } from './legacy/smartrequest.interfaces.js';
|
||||
|
||||
export * from './legacy/smartrequest.jsonrest.js';
|
||||
export * from './legacy/smartrequest.binaryrest.js';
|
||||
export * from './legacy/smartrequest.formdata.js';
|
||||
export * from './legacy/smartrequest.stream.js';
|
||||
export * from './legacy/index.js';
|
||||
|
||||
// Modern API exports
|
||||
export * from './modern/index.js';
|
||||
import { SmartRequestClient } from './modern/smartrequestclient.js';
|
||||
|
||||
// Core exports for advanced usage
|
||||
export { SmartResponse, type ICoreRequestOptions, type ICoreResponse } from './core/index.js';
|
||||
|
||||
// Default export for easier importing
|
||||
import { SmartRequestClient } from './modern/smartrequestclient.js';
|
||||
export default SmartRequestClient;
|
Reference in New Issue
Block a user