- Deleted copy-object.ts and type.ts files as part of the refactor. - Updated index.ts to export from new S3 core and type files. - Refactored OssBase class in core.ts to handle file uploads and object management. - Enhanced error handling for object retrieval and metadata management. - Introduced new methods for handling object streams and metadata filtering. - Updated download utility functions to align with new structure.
23 lines
744 B
TypeScript
23 lines
744 B
TypeScript
import { resolvePath } from '@kevisual/use-config';
|
|
import { execSync } from 'node:child_process';
|
|
|
|
const buildFn = async (opts: { entry?: string, naming?: string }) => {
|
|
const entry = opts.entry || 'src/index.ts';
|
|
const naming = opts.naming || 'app';
|
|
const external: string[] = ["bun"];
|
|
await Bun.build({
|
|
target: 'node',
|
|
format: 'esm',
|
|
entrypoints: [resolvePath(entry, { meta: import.meta })],
|
|
outdir: resolvePath('./dist', { meta: import.meta }),
|
|
naming: {
|
|
entry: `${naming}.js`,
|
|
},
|
|
external,
|
|
});
|
|
const cmd = `dts -i ${entry} -o ${naming}.d.ts`;
|
|
execSync(cmd);
|
|
};
|
|
|
|
await buildFn({ naming: 'index', entry: 'src/index.ts' });
|
|
await buildFn({ naming: 'services', entry: 'src/services/index.ts' }); |