Files

26 lines
1.3 KiB
TypeScript
Raw Permalink Normal View History

// node native scope
import { randomUUID } from 'node:crypto';
export { randomUUID };
// pushrocks scope
import * as smartlog from '@push.rocks/smartlog';
import * as smartlogDestinationLocal from '@push.rocks/smartlog/destination-local';
import * as smartversion from '@push.rocks/smartversion';
export { smartlog, smartlogDestinationLocal, smartversion };
// optional pushrocks peers — type-only imports so the module compiles even
// when end users only install one of them. The type-import loads the .d.ts
// at compile time but emits no runtime require/import. Both packages are
// devDeps locally so the build can resolve them.
import type * as smartdata from '@push.rocks/smartdata';
import type * as smartbucket from '@push.rocks/smartbucket';
export type { smartdata, smartbucket };
// Driver types are derived from the smartdata / smartbucket public surface
// to avoid having to declare `mongodb` or `@aws-sdk/client-s3` as direct
// dependencies. These aliases are exported for use in the public interfaces.
export type TRawMongoDb = smartdata.SmartdataDb['mongoDb'];
export type TRawMongoClient = smartdata.SmartdataDb['mongoDbClient'];
export type TMongoClientSession = ReturnType<smartdata.SmartdataDb['startSession']>;
export type TRawS3Client = smartbucket.SmartBucket['storageClient'];