@ccci/micro-server 1.0.49 → 1.0.50

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -103691,14 +103691,21 @@ class Uploader {
103691
103691
  constructor() {
103692
103692
  }
103693
103693
  static async init(options) {
103694
- if (!Uploader.client && Uploader.hasValidConfig(options)) {
103695
- Uploader.client = new Client({
103696
- endPoint: options.minioHost,
103697
- port: options.minioPort,
103698
- useSSL: options.minioUseSSL,
103699
- accessKey: options.minioAccessKey,
103700
- secretKey: options.minioSecretKey
103701
- });
103694
+ try {
103695
+ if (!Uploader.client && Uploader.hasValidConfig(options)) {
103696
+ Logger.info("Connecting to minIO server...");
103697
+ Uploader.client = new Client({
103698
+ endPoint: options.minioHost,
103699
+ port: options.minioPort,
103700
+ useSSL: options.minioUseSSL,
103701
+ accessKey: options.minioAccessKey,
103702
+ secretKey: options.minioSecretKey
103703
+ });
103704
+ Logger.info("minio client:", Uploader.client);
103705
+ }
103706
+ } catch (error) {
103707
+ Logger.error(error);
103708
+ throw error;
103702
103709
  }
103703
103710
  }
103704
103711
  static hasValidConfig(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccci/micro-server",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",