Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 415ba3e76d | |||
| 6594f67d3e | |||
| 61974e0b54 | |||
| fc845956fa | |||
| eec1e09d2b | |||
| c3daf9d3f7 |
20
changelog.md
20
changelog.md
@@ -1,5 +1,25 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-11-21 - 3.0.2 - fix(smarts3)
|
||||
Prepare patch release 3.0.2 — no code changes detected
|
||||
|
||||
- No source changes in the diff
|
||||
- Bump patch version from 3.0.1 to 3.0.2 for maintenance/release bookkeeping
|
||||
|
||||
## 2025-11-21 - 3.0.1 - fix(readme)
|
||||
Add Issue Reporting and Security section to README
|
||||
|
||||
- Add guidance to report bugs, issues, and security vulnerabilities via community.foss.global
|
||||
- Inform developers how to sign a contribution agreement and get a code.foss.global account to submit pull requests
|
||||
|
||||
## 2025-11-21 - 3.0.0 - BREAKING CHANGE(Smarts3)
|
||||
Remove legacy s3rver backend, simplify Smarts3 server API, and bump dependencies
|
||||
|
||||
- Remove legacy s3rver backend: s3rver and its types were removed from dependencies and are no longer exported from plugins.
|
||||
- Simplify Smarts3 API: removed useCustomServer option; Smarts3 now always uses the built-in Smarts3Server (s3Instance is Smarts3Server) and stop() always calls Smarts3Server.stop().
|
||||
- Update README to remove legacy s3rver compatibility mention.
|
||||
- Dependency updates: bumped @push.rocks/smartbucket to ^4.3.0 and @push.rocks/smartxml to ^2.0.0 (major upgrades), removed s3rver/@types/s3rver, bumped @aws-sdk/client-s3 to ^3.937.0 and @git.zone/tstest to ^3.1.0.
|
||||
|
||||
## 2025-11-21 - 2.3.0 - feat(smarts3-server)
|
||||
Introduce native custom S3 server implementation (Smarts3Server) with routing, middleware, context, filesystem store, controllers and XML utilities; add SmartXml and AWS SDK test; keep optional legacy s3rver backend.
|
||||
|
||||
|
||||
14
package.json
14
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@push.rocks/smarts3",
|
||||
"version": "2.3.0",
|
||||
"version": "3.0.2",
|
||||
"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,11 +14,11 @@
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aws-sdk/client-s3": "^3.936.0",
|
||||
"@aws-sdk/client-s3": "^3.937.0",
|
||||
"@git.zone/tsbuild": "^3.1.0",
|
||||
"@git.zone/tsbundle": "^2.5.2",
|
||||
"@git.zone/tsrun": "^2.0.0",
|
||||
"@git.zone/tstest": "^3.0.0",
|
||||
"@git.zone/tstest": "^3.1.0",
|
||||
"@types/node": "^22.9.0"
|
||||
},
|
||||
"browserslist": [
|
||||
@@ -37,13 +37,11 @@
|
||||
"readme.md"
|
||||
],
|
||||
"dependencies": {
|
||||
"@push.rocks/smartbucket": "^3.3.10",
|
||||
"@push.rocks/smartbucket": "^4.3.0",
|
||||
"@push.rocks/smartfile": "^11.2.7",
|
||||
"@push.rocks/smartpath": "^6.0.0",
|
||||
"@push.rocks/smartxml": "^1.0.6",
|
||||
"@tsclass/tsclass": "^9.3.0",
|
||||
"@types/s3rver": "^3.7.0",
|
||||
"s3rver": "^3.7.1"
|
||||
"@push.rocks/smartxml": "^2.0.0",
|
||||
"@tsclass/tsclass": "^9.3.0"
|
||||
},
|
||||
"keywords": [
|
||||
"S3 Mock Server",
|
||||
|
||||
141
pnpm-lock.yaml
generated
141
pnpm-lock.yaml
generated
@@ -9,8 +9,8 @@ importers:
|
||||
.:
|
||||
dependencies:
|
||||
'@push.rocks/smartbucket':
|
||||
specifier: ^3.3.10
|
||||
version: 3.3.10
|
||||
specifier: ^4.3.0
|
||||
version: 4.3.0
|
||||
'@push.rocks/smartfile':
|
||||
specifier: ^11.2.7
|
||||
version: 11.2.7
|
||||
@@ -18,21 +18,15 @@ importers:
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
'@push.rocks/smartxml':
|
||||
specifier: ^1.0.6
|
||||
version: 1.1.1
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
'@tsclass/tsclass':
|
||||
specifier: ^9.3.0
|
||||
version: 9.3.0
|
||||
'@types/s3rver':
|
||||
specifier: ^3.7.0
|
||||
version: 3.7.4
|
||||
s3rver:
|
||||
specifier: ^3.7.1
|
||||
version: 3.7.1
|
||||
devDependencies:
|
||||
'@aws-sdk/client-s3':
|
||||
specifier: ^3.936.0
|
||||
version: 3.936.0
|
||||
specifier: ^3.937.0
|
||||
version: 3.937.0
|
||||
'@git.zone/tsbuild':
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
@@ -43,8 +37,8 @@ importers:
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
'@git.zone/tstest':
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.1(socks@2.8.7)(typescript@5.9.3)
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0(socks@2.8.7)(typescript@5.9.3)
|
||||
'@types/node':
|
||||
specifier: ^22.9.0
|
||||
version: 22.19.1
|
||||
@@ -89,8 +83,8 @@ packages:
|
||||
'@aws-crypto/util@5.2.0':
|
||||
resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==}
|
||||
|
||||
'@aws-sdk/client-s3@3.936.0':
|
||||
resolution: {integrity: sha512-dnzZAkJDa9tdCxhqdnh37hdizJkernoFn0rufWahziOEmf0Yv9+mLeqR4qDmsAGUMuD1jFCmPR97FaCoh10mZg==}
|
||||
'@aws-sdk/client-s3@3.937.0':
|
||||
resolution: {integrity: sha512-ioeNe6HSc7PxjsUQY7foSHmgesxM5KwAeUtPhIHgKx99nrM+7xYCfW4FMvHypUzz7ZOvqlCdH7CEAZ8ParBvVg==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
|
||||
'@aws-sdk/client-sso@3.936.0':
|
||||
@@ -240,8 +234,8 @@ packages:
|
||||
'@borewit/text-codec@0.1.1':
|
||||
resolution: {integrity: sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==}
|
||||
|
||||
'@cloudflare/workers-types@4.20251120.0':
|
||||
resolution: {integrity: sha512-/uy0Oleot60ZS037I2mxR9NEft6eQYdknKBnM76W91I+7BKznzXKj2MtXMfSXTLsxyP+6MluYRNPrRCQDlk8kw==}
|
||||
'@cloudflare/workers-types@4.20251121.0':
|
||||
resolution: {integrity: sha512-jzFg7hEGKzpEalxTCanN6lM8IdkvO/brsERp/+OyMms4Zi0nhDPUAg9dUcKU8wDuDUnzbjkplY6YRwle7Cq6gA==}
|
||||
|
||||
'@colors/colors@1.6.0':
|
||||
resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==}
|
||||
@@ -443,8 +437,8 @@ packages:
|
||||
resolution: {integrity: sha512-yA6zCjL+kn7xfZe6sL/m4K+zYqgkznG/pF6++i/E17iwzpG6dHmW+VZmYldHe86sW4DcLMvqM6CxM+KlgaEpKw==}
|
||||
hasBin: true
|
||||
|
||||
'@git.zone/tstest@3.0.1':
|
||||
resolution: {integrity: sha512-YjjLLWGj8fE8yYAfMrLSDgdZ+JJOS7I6iRshIyr6THH5dnTONOA3R076zBaryRw58qgPn+s/0jno7wlhYhv0iw==}
|
||||
'@git.zone/tstest@3.1.0':
|
||||
resolution: {integrity: sha512-nshpkFvyIUUDvYcA/IOyqWBVEoxGm674ytIkA+XJ6DPO/hz2l3mMIjplc43d2U2eHkAZk8/ycr9GIo0xNhiLFg==}
|
||||
hasBin: true
|
||||
|
||||
'@happy-dom/global-registrator@15.11.7':
|
||||
@@ -503,22 +497,6 @@ packages:
|
||||
'@napi-rs/wasm-runtime@1.0.7':
|
||||
resolution: {integrity: sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==}
|
||||
|
||||
'@oozcitak/dom@1.15.10':
|
||||
resolution: {integrity: sha512-0JT29/LaxVgRcGKvHmSrUTEvZ8BXvZhGl2LASRUgHqDTC1M5g1pLmVv56IYNyt3bG2CUjDkc67wnyZC14pbQrQ==}
|
||||
engines: {node: '>=8.0'}
|
||||
|
||||
'@oozcitak/infra@1.0.8':
|
||||
resolution: {integrity: sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg==}
|
||||
engines: {node: '>=6.0'}
|
||||
|
||||
'@oozcitak/url@1.0.4':
|
||||
resolution: {integrity: sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw==}
|
||||
engines: {node: '>=8.0'}
|
||||
|
||||
'@oozcitak/util@8.3.8':
|
||||
resolution: {integrity: sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ==}
|
||||
engines: {node: '>=8.0'}
|
||||
|
||||
'@oxc-project/types@0.98.0':
|
||||
resolution: {integrity: sha512-Vzmd6FsqVuz5HQVcRC/hrx7Ujo3WEVeQP7C2UNP5uy1hUY4SQvMB+93jxkI1KRHz9a/6cni3glPOtvteN+zpsw==}
|
||||
|
||||
@@ -612,6 +590,9 @@ packages:
|
||||
'@push.rocks/smartbucket@3.3.10':
|
||||
resolution: {integrity: sha512-0H2MioALspC8Aj0Q1FPCs2w4k2u9oJg7Q5yM8+1TZo7aRfrdxgM5HQ7z3apUaqC3ZEDewW6vSlttjHFHhMEC3A==}
|
||||
|
||||
'@push.rocks/smartbucket@4.3.0':
|
||||
resolution: {integrity: sha512-4nstzEduCKou4R5ekKH6kUjDZXWfrtjA1hIQ4MJmTbtncmm2+4+ixjaFThS2nS8Aa+fHcBgOtKkBv8wTsgvK/Q==}
|
||||
|
||||
'@push.rocks/smartbuffer@3.0.5':
|
||||
resolution: {integrity: sha512-pWYF08Mn8s/KF/9nHRk7pZPzuMjmYVQay2c5gGexdayxn1W4eCSYYhWH73vR2JBfGeGq/izbRNuUuEaIEeTIKA==}
|
||||
|
||||
@@ -783,9 +764,6 @@ packages:
|
||||
'@push.rocks/smartversion@3.0.5':
|
||||
resolution: {integrity: sha512-8MZSo1yqyaKxKq0Q5N188l4un++9GFWVbhCAX5mXJwewZHn97ujffTeL+eOQYpWFTEpUhaq1QhL4NhqObBCt1Q==}
|
||||
|
||||
'@push.rocks/smartxml@1.1.1':
|
||||
resolution: {integrity: sha512-1toSmLE1EGK8oENh09XjV588+IdzUB3x1PCaxKjSyIsAt54bUQj3kH/yzLODF+19p07OE0KM5U1oqWpjOcFCzA==}
|
||||
|
||||
'@push.rocks/smartxml@2.0.0':
|
||||
resolution: {integrity: sha512-1d06zYJX4Zt8s5w5qFOUg2LAEz9ykrh9d6CQPK4WAgOBIefb1xzVEWHc7yoxicc2OkzNgC3IBCEg3s6BncZKWw==}
|
||||
|
||||
@@ -2248,6 +2226,10 @@ packages:
|
||||
resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
http-errors@2.0.1:
|
||||
resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
http-proxy-agent@7.0.2:
|
||||
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
|
||||
engines: {node: '>= 14'}
|
||||
@@ -2377,10 +2359,6 @@ packages:
|
||||
js-tokens@4.0.0:
|
||||
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
|
||||
|
||||
js-yaml@3.14.1:
|
||||
resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==}
|
||||
hasBin: true
|
||||
|
||||
js-yaml@3.14.2:
|
||||
resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==}
|
||||
hasBin: true
|
||||
@@ -3572,10 +3550,6 @@ packages:
|
||||
utf-8-validate:
|
||||
optional: true
|
||||
|
||||
xmlbuilder2@3.1.1:
|
||||
resolution: {integrity: sha512-WCSfbfZnQDdLQLiMdGUQpMxxckeQ4oZNMNhLVkcekTu7xhD4tuUDyAPoY8CwXvBYE6LwBHd6QW2WZXlOWr1vCw==}
|
||||
engines: {node: '>=12.0'}
|
||||
|
||||
xmlhttprequest-ssl@2.1.2:
|
||||
resolution: {integrity: sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
@@ -3641,7 +3615,7 @@ snapshots:
|
||||
'@api.global/typedrequest': 3.1.10
|
||||
'@api.global/typedrequest-interfaces': 3.0.19
|
||||
'@api.global/typedsocket': 3.0.1
|
||||
'@cloudflare/workers-types': 4.20251120.0
|
||||
'@cloudflare/workers-types': 4.20251121.0
|
||||
'@design.estate/dees-comms': 1.0.27
|
||||
'@push.rocks/lik': 6.2.2
|
||||
'@push.rocks/smartchok': 1.1.1
|
||||
@@ -3748,7 +3722,7 @@ snapshots:
|
||||
'@smithy/util-utf8': 2.3.0
|
||||
tslib: 2.8.1
|
||||
|
||||
'@aws-sdk/client-s3@3.936.0':
|
||||
'@aws-sdk/client-s3@3.937.0':
|
||||
dependencies:
|
||||
'@aws-crypto/sha1-browser': 5.2.0
|
||||
'@aws-crypto/sha256-browser': 5.2.0
|
||||
@@ -4192,7 +4166,7 @@ snapshots:
|
||||
|
||||
'@borewit/text-codec@0.1.1': {}
|
||||
|
||||
'@cloudflare/workers-types@4.20251120.0': {}
|
||||
'@cloudflare/workers-types@4.20251121.0': {}
|
||||
|
||||
'@colors/colors@1.6.0': {}
|
||||
|
||||
@@ -4412,7 +4386,7 @@ snapshots:
|
||||
'@push.rocks/smartshell': 3.3.0
|
||||
tsx: 4.20.6
|
||||
|
||||
'@git.zone/tstest@3.0.1(socks@2.8.7)(typescript@5.9.3)':
|
||||
'@git.zone/tstest@3.1.0(socks@2.8.7)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@api.global/typedserver': 3.0.80
|
||||
'@git.zone/tsbundle': 2.5.2
|
||||
@@ -4535,23 +4509,6 @@ snapshots:
|
||||
'@tybys/wasm-util': 0.10.1
|
||||
optional: true
|
||||
|
||||
'@oozcitak/dom@1.15.10':
|
||||
dependencies:
|
||||
'@oozcitak/infra': 1.0.8
|
||||
'@oozcitak/url': 1.0.4
|
||||
'@oozcitak/util': 8.3.8
|
||||
|
||||
'@oozcitak/infra@1.0.8':
|
||||
dependencies:
|
||||
'@oozcitak/util': 8.3.8
|
||||
|
||||
'@oozcitak/url@1.0.4':
|
||||
dependencies:
|
||||
'@oozcitak/infra': 1.0.8
|
||||
'@oozcitak/util': 8.3.8
|
||||
|
||||
'@oozcitak/util@8.3.8': {}
|
||||
|
||||
'@oxc-project/types@0.98.0': {}
|
||||
|
||||
'@pdf-lib/standard-fonts@1.0.0':
|
||||
@@ -4792,7 +4749,7 @@ snapshots:
|
||||
|
||||
'@push.rocks/smartbucket@3.3.10':
|
||||
dependencies:
|
||||
'@aws-sdk/client-s3': 3.936.0
|
||||
'@aws-sdk/client-s3': 3.937.0
|
||||
'@push.rocks/smartmime': 2.0.4
|
||||
'@push.rocks/smartpath': 6.0.0
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
@@ -4804,6 +4761,21 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- aws-crt
|
||||
|
||||
'@push.rocks/smartbucket@4.3.0':
|
||||
dependencies:
|
||||
'@aws-sdk/client-s3': 3.937.0
|
||||
'@push.rocks/smartmime': 2.0.4
|
||||
'@push.rocks/smartpath': 6.0.0
|
||||
'@push.rocks/smartpromise': 4.2.3
|
||||
'@push.rocks/smartrx': 3.0.10
|
||||
'@push.rocks/smartstream': 3.2.5
|
||||
'@push.rocks/smartstring': 4.1.0
|
||||
'@push.rocks/smartunique': 3.0.9
|
||||
'@tsclass/tsclass': 9.3.0
|
||||
minimatch: 10.1.1
|
||||
transitivePeerDependencies:
|
||||
- aws-crt
|
||||
|
||||
'@push.rocks/smartbuffer@3.0.5':
|
||||
dependencies:
|
||||
uint8array-extras: 1.5.0
|
||||
@@ -5292,11 +5264,6 @@ snapshots:
|
||||
'@types/semver': 7.7.1
|
||||
semver: 7.7.3
|
||||
|
||||
'@push.rocks/smartxml@1.1.1':
|
||||
dependencies:
|
||||
fast-xml-parser: 4.5.3
|
||||
xmlbuilder2: 3.1.1
|
||||
|
||||
'@push.rocks/smartxml@2.0.0':
|
||||
dependencies:
|
||||
fast-xml-parser: 5.3.2
|
||||
@@ -6183,7 +6150,7 @@ snapshots:
|
||||
bytes: 3.1.2
|
||||
content-type: 1.0.5
|
||||
debug: 4.4.3
|
||||
http-errors: 2.0.0
|
||||
http-errors: 2.0.1
|
||||
iconv-lite: 0.6.3
|
||||
on-finished: 2.4.1
|
||||
qs: 6.14.0
|
||||
@@ -6641,7 +6608,7 @@ snapshots:
|
||||
etag: 1.8.1
|
||||
finalhandler: 2.1.0
|
||||
fresh: 2.0.0
|
||||
http-errors: 2.0.0
|
||||
http-errors: 2.0.1
|
||||
merge-descriptors: 2.0.0
|
||||
mime-types: 3.0.2
|
||||
on-finished: 2.4.1
|
||||
@@ -6981,6 +6948,14 @@ snapshots:
|
||||
statuses: 2.0.1
|
||||
toidentifier: 1.0.1
|
||||
|
||||
http-errors@2.0.1:
|
||||
dependencies:
|
||||
depd: 2.0.0
|
||||
inherits: 2.0.4
|
||||
setprototypeof: 1.2.0
|
||||
statuses: 2.0.2
|
||||
toidentifier: 1.0.1
|
||||
|
||||
http-proxy-agent@7.0.2:
|
||||
dependencies:
|
||||
agent-base: 7.1.4
|
||||
@@ -7094,11 +7069,6 @@ snapshots:
|
||||
|
||||
js-tokens@4.0.0: {}
|
||||
|
||||
js-yaml@3.14.1:
|
||||
dependencies:
|
||||
argparse: 1.0.10
|
||||
esprima: 4.0.1
|
||||
|
||||
js-yaml@3.14.2:
|
||||
dependencies:
|
||||
argparse: 1.0.10
|
||||
@@ -8138,7 +8108,7 @@ snapshots:
|
||||
escape-html: 1.0.3
|
||||
etag: 1.8.1
|
||||
fresh: 2.0.0
|
||||
http-errors: 2.0.0
|
||||
http-errors: 2.0.1
|
||||
mime-types: 3.0.2
|
||||
ms: 2.1.3
|
||||
on-finished: 2.4.1
|
||||
@@ -8596,13 +8566,6 @@ snapshots:
|
||||
|
||||
ws@8.18.3: {}
|
||||
|
||||
xmlbuilder2@3.1.1:
|
||||
dependencies:
|
||||
'@oozcitak/dom': 1.15.10
|
||||
'@oozcitak/infra': 1.0.8
|
||||
'@oozcitak/util': 8.3.8
|
||||
js-yaml: 3.14.1
|
||||
|
||||
xmlhttprequest-ssl@2.1.2: {}
|
||||
|
||||
y18n@5.0.8: {}
|
||||
|
||||
@@ -5,14 +5,17 @@
|
||||
## 🌟 Features
|
||||
|
||||
- 🏃 **Lightning-fast local S3 simulation** - No more waiting for cloud operations during development
|
||||
- ⚡ **Native custom S3 server** - Built on Node.js http module with zero framework dependencies (default)
|
||||
- ⚡ **Native custom S3 server** - Built on Node.js http module with zero framework dependencies
|
||||
- 🔄 **Full AWS S3 API compatibility** - Drop-in replacement for AWS SDK v3 and other S3 clients
|
||||
- 📂 **Local directory mapping** - Your buckets live right on your filesystem with Windows-compatible encoding
|
||||
- 🧪 **Perfect for testing** - Reliable, repeatable tests without cloud dependencies
|
||||
- 🎯 **TypeScript-first** - Built with TypeScript for excellent type safety and IDE support
|
||||
- 🔧 **Zero configuration** - Works out of the box with sensible defaults
|
||||
- 🧹 **Clean slate mode** - Start fresh on every test run
|
||||
- 🔀 **Legacy compatibility** - Optional s3rver backend support for backward compatibility
|
||||
|
||||
## Issue Reporting and Security
|
||||
|
||||
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who want to sign a contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
@@ -412,7 +415,6 @@ interface ISmarts3ContructorOptions {
|
||||
- [`@push.rocks/smartbucket`](https://www.npmjs.com/package/@push.rocks/smartbucket) - Powerful S3 abstraction layer
|
||||
- [`@push.rocks/smartfile`](https://www.npmjs.com/package/@push.rocks/smartfile) - Advanced file system operations
|
||||
- [`@tsclass/tsclass`](https://www.npmjs.com/package/@tsclass/tsclass) - TypeScript class helpers
|
||||
- [`s3rver`](https://www.npmjs.com/package/s3rver) - Optional legacy S3 server implementation (used when `useCustomServer: false`)
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smarts3',
|
||||
version: '2.3.0',
|
||||
version: '3.0.2',
|
||||
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.'
|
||||
}
|
||||
|
||||
68
ts/index.ts
68
ts/index.ts
@@ -5,7 +5,6 @@ import { Smarts3Server } from './classes/smarts3-server.js';
|
||||
export interface ISmarts3ContructorOptions {
|
||||
port?: number;
|
||||
cleanSlate?: boolean;
|
||||
useCustomServer?: boolean; // Feature flag for custom server
|
||||
}
|
||||
|
||||
export class Smarts3 {
|
||||
@@ -20,65 +19,30 @@ export class Smarts3 {
|
||||
|
||||
// INSTANCE
|
||||
public options: ISmarts3ContructorOptions;
|
||||
public s3Instance: plugins.s3rver | Smarts3Server;
|
||||
public s3Instance: Smarts3Server;
|
||||
|
||||
constructor(optionsArg: ISmarts3ContructorOptions) {
|
||||
this.options = {
|
||||
useCustomServer: true, // Default to custom server
|
||||
...optionsArg,
|
||||
};
|
||||
this.options = optionsArg;
|
||||
}
|
||||
|
||||
public async start() {
|
||||
if (this.options.useCustomServer) {
|
||||
// Use new custom server
|
||||
this.s3Instance = new Smarts3Server({
|
||||
port: this.options.port || 3000,
|
||||
address: '0.0.0.0',
|
||||
directory: paths.bucketsDir,
|
||||
cleanSlate: this.options.cleanSlate || false,
|
||||
silent: false,
|
||||
});
|
||||
await this.s3Instance.start();
|
||||
console.log('s3 server is running (custom implementation)');
|
||||
} else {
|
||||
// Use legacy s3rver
|
||||
if (this.options.cleanSlate) {
|
||||
await plugins.smartfile.fs.ensureEmptyDir(paths.bucketsDir);
|
||||
} else {
|
||||
await plugins.smartfile.fs.ensureDir(paths.bucketsDir);
|
||||
}
|
||||
this.s3Instance = new plugins.s3rver({
|
||||
port: this.options.port || 3000,
|
||||
address: '0.0.0.0',
|
||||
silent: false,
|
||||
directory: paths.bucketsDir,
|
||||
});
|
||||
await (this.s3Instance as plugins.s3rver).run();
|
||||
console.log('s3 server is running (legacy s3rver)');
|
||||
}
|
||||
this.s3Instance = new Smarts3Server({
|
||||
port: this.options.port || 3000,
|
||||
address: '0.0.0.0',
|
||||
directory: paths.bucketsDir,
|
||||
cleanSlate: this.options.cleanSlate || false,
|
||||
silent: false,
|
||||
});
|
||||
await this.s3Instance.start();
|
||||
console.log('s3 server is running');
|
||||
}
|
||||
|
||||
public async getS3Descriptor(
|
||||
optionsArg?: Partial<plugins.tsclass.storage.IS3Descriptor>,
|
||||
): Promise<plugins.tsclass.storage.IS3Descriptor> {
|
||||
if (this.options.useCustomServer && this.s3Instance instanceof Smarts3Server) {
|
||||
const descriptor = this.s3Instance.getS3Descriptor();
|
||||
return {
|
||||
...descriptor,
|
||||
...(optionsArg ? optionsArg : {}),
|
||||
};
|
||||
}
|
||||
|
||||
// Legacy s3rver descriptor
|
||||
const descriptor = this.s3Instance.getS3Descriptor();
|
||||
return {
|
||||
...{
|
||||
accessKey: 'S3RVER',
|
||||
accessSecret: 'S3RVER',
|
||||
endpoint: '127.0.0.1',
|
||||
port: this.options.port || 3000,
|
||||
useSsl: false,
|
||||
},
|
||||
...descriptor,
|
||||
...(optionsArg ? optionsArg : {}),
|
||||
};
|
||||
}
|
||||
@@ -92,11 +56,7 @@ export class Smarts3 {
|
||||
}
|
||||
|
||||
public async stop() {
|
||||
if (this.s3Instance instanceof Smarts3Server) {
|
||||
await this.s3Instance.stop();
|
||||
} else {
|
||||
await (this.s3Instance as plugins.s3rver).close();
|
||||
}
|
||||
await this.s3Instance.stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,3 @@ export { smartbucket, smartfile, smartpath, SmartXml };
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export { tsclass };
|
||||
|
||||
// thirdparty scope
|
||||
import s3rver from 's3rver';
|
||||
|
||||
export { s3rver };
|
||||
|
||||
Reference in New Issue
Block a user