mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:21:10 +02:00
🔧 fix(shared-storage): update build configuration for CommonJS
- Change module from ESNext to CommonJS for NestJS compatibility - Update moduleResolution from bundler to node - Add build script and dist exports to package.json - Remove .js extensions from imports for better compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2a040102b6
commit
1a88dec0a5
5 changed files with 19 additions and 13 deletions
|
|
@ -3,14 +3,20 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "S3-compatible object storage client for Manacore monorepo (MinIO local, Hetzner production)",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"files": ["dist"],
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"type-check": "tsc --noEmit",
|
||||
"clean": "rm -rf dist"
|
||||
"clean": "rm -rf dist",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.700.0",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import type {
|
|||
PresignedUrlOptions,
|
||||
UploadResult,
|
||||
FileInfo,
|
||||
} from './types.js';
|
||||
} from './types';
|
||||
|
||||
/**
|
||||
* S3-compatible storage client for MinIO (local) and Hetzner Object Storage (production)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { StorageClient } from './client.js';
|
||||
import { BUCKETS, type StorageConfig, type BucketConfig, type BucketName } from './types.js';
|
||||
import { StorageClient } from './client';
|
||||
import { BUCKETS, type StorageConfig, type BucketConfig, type BucketName } from './types';
|
||||
|
||||
/**
|
||||
* Environment variable names for storage configuration
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Main client
|
||||
export { StorageClient } from './client.js';
|
||||
export { StorageClient } from './client';
|
||||
|
||||
// Factory functions
|
||||
export {
|
||||
|
|
@ -13,7 +13,7 @@ export {
|
|||
createCalendarStorage,
|
||||
createContactsStorage,
|
||||
createStorageStorage,
|
||||
} from './factory.js';
|
||||
} from './factory';
|
||||
|
||||
// Utilities
|
||||
export {
|
||||
|
|
@ -26,7 +26,7 @@ export {
|
|||
DOCUMENT_EXTENSIONS,
|
||||
AUDIO_EXTENSIONS,
|
||||
VIDEO_EXTENSIONS,
|
||||
} from './utils.js';
|
||||
} from './utils';
|
||||
|
||||
// Types
|
||||
export {
|
||||
|
|
@ -38,4 +38,4 @@ export {
|
|||
type PresignedUrlOptions,
|
||||
type UploadResult,
|
||||
type FileInfo,
|
||||
} from './types.js';
|
||||
} from './types';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue