@atls/nestjs-gcs-client 0.0.1 → 0.0.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
 
2
2
 
3
+ ## [0.0.2](https://github.com/atls/nestjs/compare/@atls/nestjs-gcs-client@0.0.1...@atls/nestjs-gcs-client@0.0.2) (2025-12-31)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+
9
+ * **packages:** linter errors ([204ce22](https://github.com/atls/nestjs/commit/204ce229e375b09ffd69d93e47c08bd1d1fbea1b))
10
+
11
+
12
+
13
+
14
+
15
+ ## [0.0.1](https://github.com/atls/nestjs/compare/@atls/nestjs-gcs-client@0.0.1...@atls/nestjs-gcs-client@0.0.1) (2025-12-31)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+
21
+ * **packages:** linter errors ([204ce22](https://github.com/atls/nestjs/commit/204ce229e375b09ffd69d93e47c08bd1d1fbea1b))
22
+
23
+
24
+
25
+
26
+
3
27
  ## 0.0.1 (2025-03-15)
4
28
 
5
29
 
@@ -1,4 +1,6 @@
1
+ import type { InjectionToken } from '@nestjs/common/interfaces';
1
2
  import type { ModuleMetadata } from '@nestjs/common/interfaces';
3
+ import type { OptionalFactoryDependency } from '@nestjs/common/interfaces';
2
4
  import type { Type } from '@nestjs/common/interfaces';
3
5
  export interface GcsClientModuleOptions {
4
6
  apiEndpoint?: string;
@@ -10,6 +12,6 @@ export interface GcsClientOptionsFactory {
10
12
  export interface GcsClientModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
11
13
  useExisting?: Type<GcsClientOptionsFactory>;
12
14
  useClass?: Type<GcsClientOptionsFactory>;
13
- useFactory?: (...args: Array<any>) => GcsClientModuleOptions | Promise<GcsClientModuleOptions>;
14
- inject?: Array<any>;
15
+ useFactory?: (...args: Array<unknown>) => GcsClientModuleOptions | Promise<GcsClientModuleOptions>;
16
+ inject?: Array<InjectionToken | OptionalFactoryDependency>;
15
17
  }
@@ -52,10 +52,14 @@ let GcsClientModule = GcsClientModule_1 = class GcsClientModule {
52
52
  inject: options.inject || [],
53
53
  };
54
54
  }
55
+ const injectTarget = options.useExisting ?? options.useClass;
56
+ if (!injectTarget) {
57
+ throw new Error('GcsClientModule requires useExisting, useClass, or useFactory');
58
+ }
55
59
  return {
56
60
  provide: GCS_CLIENT_MODULE_OPTIONS,
57
61
  useFactory: (optionsFactory) => optionsFactory.createGcsClientOptions(),
58
- inject: [options.useExisting || options.useClass],
62
+ inject: [injectTarget],
59
63
  };
60
64
  }
61
65
  };
@@ -1,4 +1,4 @@
1
- export * from './gcs-client.module.interfaces.js';
1
+ export type * from './gcs-client.module.interfaces.js';
2
2
  export * from './gcs-client.module.constants.js';
3
3
  export * from './gcs-client.config-factory.js';
4
4
  export * from './gcs-client.factory.js';
@@ -1,4 +1,3 @@
1
- export * from "./gcs-client.module.interfaces.js";
2
1
  export * from "./gcs-client.module.constants.js";
3
2
  export * from "./gcs-client.config-factory.js";
4
3
  export * from "./gcs-client.factory.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atls/nestjs-gcs-client",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "license": "BSD-3-Clause",
5
5
  "type": "module",
6
6
  "exports": {