6 Commits

7 changed files with 2541 additions and 681 deletions

View File

@ -1,5 +1,22 @@
# Changelog
## 2024-11-06 - 2.2.3 - fix(core)
Fix endpoint address from 'localhost' to '127.0.0.1' for better compatibility in Smarts3.getS3Descriptor
- Corrected the endpoint address in Smarts3.getS3Descriptor to ensure proper functioning across different environments.
## 2024-11-06 - 2.2.2 - fix(core)
Fixed function call for fastPut in the test suite to ensure proper file upload handling.
- Updated dependencies in package.json to newer versions.
- Corrected the function call in test suite for file upload.
## 2024-10-26 - 2.2.1 - fix(core)
Fix import and typings for improved compatibility
- Corrected the type signature for `getS3Descriptor` to return `IS3Descriptor`.
- Fixed import structure and updated dependencies for consistent namespace usage across plugins.
## 2024-10-26 - 2.2.0 - feat(ci)
Migrate CI/CD workflow from GitLab CI to Gitea CI

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smarts3",
"version": "2.2.0",
"version": "2.2.3",
"private": false,
"description": "A Node.js TypeScript package to create a local S3 endpoint for simulating AWS S3 operations using mapped local directories for development and testing purposes.",
"main": "dist_ts/index.js",
@ -14,12 +14,12 @@
"buildDocs": "tsdoc"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.63",
"@git.zone/tsbundle": "^2.0.6",
"@git.zone/tsrun": "^1.2.49",
"@git.zone/tsbuild": "^2.2.0",
"@git.zone/tsbundle": "^2.1.0",
"@git.zone/tsrun": "^1.3.3",
"@git.zone/tstest": "^1.0.72",
"@push.rocks/tapbundle": "^5.0.4",
"@types/node": "^18.6.2"
"@push.rocks/tapbundle": "^5.4.1",
"@types/node": "^22.9.0"
},
"browserslist": [
"last 1 chrome versions"
@ -37,9 +37,10 @@
"readme.md"
],
"dependencies": {
"@push.rocks/smartbucket": "^2.0.2",
"@push.rocks/smartfile": "^10.0.4",
"@push.rocks/smartbucket": "^3.0.23",
"@push.rocks/smartfile": "^11.0.21",
"@push.rocks/smartpath": "^5.0.5",
"@tsclass/tsclass": "^4.1.2",
"@types/s3rver": "^3.7.0",
"s3rver": "^3.7.1"
},

3169
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,10 @@ tap.test('should be able to access buckets', async () => {
);
const bucket = await smartbucketInstance.createBucket('testbucket');
const baseDirectory = await bucket.getBaseDirectory();
await baseDirectory.fastStore('subdir/hello.txt', 'hi there!');
await baseDirectory.fastPut({
path: 'subdir/hello.txt',
contents: 'hi there!'
});
});
tap.test('should stop the instance', async () => {

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smarts3',
version: '2.2.0',
version: '2.2.3',
description: 'A Node.js TypeScript package to create a local S3 endpoint for simulating AWS S3 operations using mapped local directories for development and testing purposes.'
}

View File

@ -42,11 +42,11 @@ export class Smarts3 {
console.log('s3 server is running');
}
public async getS3Descriptor(): Promise<plugins.smartbucket.ISmartBucketConfig> {
public async getS3Descriptor(): Promise<plugins.tsclass.storage.IS3Descriptor> {
return {
accessKey: 'S3RVER',
accessSecret: 'S3RVER',
endpoint: 'localhost',
endpoint: '127.0.0.1',
port: this.options.port,
useSsl: false,
};

View File

@ -3,13 +3,19 @@ import * as path from 'path';
export { path };
// pushrocks scope
// @push.rocks scope
import * as smartbucket from '@push.rocks/smartbucket';
import * as smartfile from '@push.rocks/smartfile';
import * as smartpath from '@push.rocks/smartpath';
export { smartbucket, smartfile, smartpath };
// @tsclass scope
import * as tsclass from '@tsclass/tsclass';
export { tsclass };
// thirdparty scope
import s3rver from 's3rver';