@healthzkit/minio 0.0.2 → 0.0.4
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.
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as minioAdapter, t as MinioAdapterOptions } from "./minio-
|
|
1
|
+
import { i as minioAdapter, t as MinioAdapterOptions } from "./minio-D5nTLsj9.mjs";
|
|
2
2
|
export { type MinioAdapterOptions, minioAdapter };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./minio-
|
|
1
|
+
import{t as e}from"./minio-Til1SDN2.mjs";export{e as minioAdapter};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { HealthAdapter, MetadataFn } from "@healthzkit/shared";
|
|
1
2
|
import { Client, ClientOptions } from "minio";
|
|
2
|
-
import { HealthAdapter } from "healthzkit";
|
|
3
3
|
|
|
4
4
|
//#region src/shared.d.ts
|
|
5
|
-
type MetadataFn<TClient> = (client: TClient) => Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
6
5
|
interface BaseMinioOptions<TClient> {
|
|
7
6
|
/**
|
|
8
7
|
* Optional function to populate metadata in the check result.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildErrorResult as e,buildResult as t}from"@healthzkit/shared";function n(n){let r=null,i=null;async function a(){return`client`in n&&n.client?n.client:r||(i||=(async()=>{try{let{Client:e}=await import(`minio`),t=new e(n.config);return r=t,t}finally{i=null}})(),i)}return{async check(){try{let e=await a(),r=Date.now();await e.listBuckets();let i=Date.now()-r,o=n.metadata?n.metadata(e):void 0;return t(i,o instanceof Promise?await o:o)}catch(t){return e(t)}}}}export{n as t};
|
package/dist/minio.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as minioAdapter, n as MinioAdapterOptionsWithClient, r as MinioAdapterOptionsWithConfig, t as MinioAdapterOptions } from "./minio-
|
|
1
|
+
import { i as minioAdapter, n as MinioAdapterOptionsWithClient, r as MinioAdapterOptionsWithConfig, t as MinioAdapterOptions } from "./minio-D5nTLsj9.mjs";
|
|
2
2
|
export { MinioAdapterOptions, MinioAdapterOptionsWithClient, MinioAdapterOptionsWithConfig, minioAdapter };
|
package/dist/minio.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./minio-
|
|
1
|
+
import{t as e}from"./minio-Til1SDN2.mjs";export{e as minioAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@healthzkit/minio",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,14 +19,17 @@
|
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@healthzkit/shared": "0.0.0"
|
|
24
|
+
},
|
|
22
25
|
"devDependencies": {
|
|
23
|
-
"@types/node": "^
|
|
26
|
+
"@types/node": "^24",
|
|
24
27
|
"@typescript/native-preview": "7.0.0-dev.20260509.2",
|
|
25
28
|
"bumpp": "^11.1.0",
|
|
26
29
|
"minio": "8.0.7",
|
|
27
|
-
"typescript": "^
|
|
28
|
-
"vite-plus": "
|
|
29
|
-
"healthzkit": "0.0.
|
|
30
|
+
"typescript": "^5",
|
|
31
|
+
"vite-plus": "latest",
|
|
32
|
+
"healthzkit": "0.0.3"
|
|
30
33
|
},
|
|
31
34
|
"peerDependencies": {
|
|
32
35
|
"minio": ">=7.1.0 || >=8.0.0"
|
package/dist/minio-DICU8kyF.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){return{status:`ok`,metadata:{...t,latencyMs:e}}}function t(e){return{status:`fail`,error:e instanceof Error?e:Error(String(e))}}function n(n){let r=null,i=null;async function a(){return`client`in n&&n.client?n.client:r||(i||=(async()=>{try{let{Client:e}=await import(`minio`),t=new e(n.config);return r=t,t}finally{i=null}})(),i)}return{async check(){try{let t=await a(),r=Date.now();await t.listBuckets();let i=Date.now()-r,o=n.metadata?n.metadata(t):void 0;return e(i,o instanceof Promise?await o:o)}catch(e){return t(e)}}}}export{n as t};
|