@push.rocks/smartregistry 1.7.0 โ†’ 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartregistry',
6
- version: '1.7.0',
6
+ version: '1.8.0',
7
7
  description: 'A composable TypeScript library implementing OCI, NPM, Maven, Cargo, Composer, PyPI, and RubyGems registries for building unified container and package registries'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSwyQkFBMkI7SUFDakMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLG9LQUFvSztDQUNsTCxDQUFBIn0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@push.rocks/smartregistry",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "private": false,
5
5
  "description": "A composable TypeScript library implementing OCI, NPM, Maven, Cargo, Composer, PyPI, and RubyGems registries for building unified container and package registries",
6
6
  "main": "dist_ts/index.js",
@@ -13,6 +13,7 @@
13
13
  "@git.zone/tsbundle": "^2.0.5",
14
14
  "@git.zone/tsrun": "^2.0.0",
15
15
  "@git.zone/tstest": "^3.1.0",
16
+ "@push.rocks/smarts3": "^5.1.0",
16
17
  "@types/node": "^24.10.1"
17
18
  },
18
19
  "repository": {
package/readme.md CHANGED
@@ -1024,6 +1024,82 @@ pnpm run build
1024
1024
  pnpm test
1025
1025
  ```
1026
1026
 
1027
+ ## ๐Ÿงช Testing with smarts3
1028
+
1029
+ smartregistry works seamlessly with [@push.rocks/smarts3](https://code.foss.global/push.rocks/smarts3), a local S3-compatible server for testing. This allows you to test the registry without needing cloud credentials or external services.
1030
+
1031
+ ### Quick Start with smarts3
1032
+
1033
+ ```typescript
1034
+ import { Smarts3 } from '@push.rocks/smarts3';
1035
+ import { SmartRegistry } from '@push.rocks/smartregistry';
1036
+
1037
+ // Start local S3 server
1038
+ const s3Server = await Smarts3.createAndStart({
1039
+ server: { port: 3456 },
1040
+ storage: { cleanSlate: true },
1041
+ });
1042
+
1043
+ // Manually create IS3Descriptor matching smarts3 configuration
1044
+ // Note: smarts3 v5.1.0 doesn't properly expose getS3Descriptor() yet
1045
+ const s3Descriptor = {
1046
+ endpoint: 'localhost',
1047
+ port: 3456,
1048
+ accessKey: 'test',
1049
+ accessSecret: 'test',
1050
+ useSsl: false,
1051
+ region: 'us-east-1',
1052
+ };
1053
+
1054
+ // Create registry with smarts3 configuration
1055
+ const registry = new SmartRegistry({
1056
+ storage: {
1057
+ ...s3Descriptor,
1058
+ bucketName: 'my-test-registry',
1059
+ },
1060
+ auth: {
1061
+ jwtSecret: 'test-secret',
1062
+ tokenStore: 'memory',
1063
+ npmTokens: { enabled: true },
1064
+ ociTokens: {
1065
+ enabled: true,
1066
+ realm: 'https://auth.example.com/token',
1067
+ service: 'my-registry',
1068
+ },
1069
+ },
1070
+ npm: { enabled: true, basePath: '/npm' },
1071
+ oci: { enabled: true, basePath: '/oci' },
1072
+ pypi: { enabled: true, basePath: '/pypi' },
1073
+ cargo: { enabled: true, basePath: '/cargo' },
1074
+ });
1075
+
1076
+ await registry.init();
1077
+
1078
+ // Use registry...
1079
+ // Your tests here
1080
+
1081
+ // Cleanup
1082
+ await s3Server.stop();
1083
+ ```
1084
+
1085
+ ### Benefits of Testing with smarts3
1086
+
1087
+ - โœ… **Zero Setup** - No cloud credentials or external services needed
1088
+ - โœ… **Fast** - Local filesystem storage, no network latency
1089
+ - โœ… **Isolated** - Clean slate per test run, no shared state
1090
+ - โœ… **CI/CD Ready** - Works in automated pipelines without configuration
1091
+ - โœ… **Full Compatibility** - Implements S3 API, works with IS3Descriptor
1092
+
1093
+ ### Running Integration Tests
1094
+
1095
+ ```bash
1096
+ # Run smarts3 integration test
1097
+ pnpm exec tstest test/test.integration.smarts3.node.ts --verbose
1098
+
1099
+ # Run all tests (includes smarts3)
1100
+ pnpm test
1101
+ ```
1102
+
1027
1103
  ## License and Legal Information
1028
1104
 
1029
1105
  This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartregistry',
6
- version: '1.7.0',
6
+ version: '1.8.0',
7
7
  description: 'A composable TypeScript library implementing OCI, NPM, Maven, Cargo, Composer, PyPI, and RubyGems registries for building unified container and package registries'
8
8
  }