@xnestjs/storage 1.12.2 → 1.12.3
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.
|
@@ -48,6 +48,7 @@ class StorageCoreModule {
|
|
|
48
48
|
static _createDynamicModule(opts, metadata) {
|
|
49
49
|
const token = opts.token ?? storage_connection_js_1.StorageConnection;
|
|
50
50
|
const providers = [
|
|
51
|
+
...(metadata.providers ?? []),
|
|
51
52
|
{
|
|
52
53
|
provide: token,
|
|
53
54
|
inject: [constants_js_1.STORAGE_OPTIONS],
|
|
@@ -69,18 +70,17 @@ class StorageCoreModule {
|
|
|
69
70
|
? new common_1.Logger(opts.logger)
|
|
70
71
|
: opts.logger,
|
|
71
72
|
},
|
|
73
|
+
{
|
|
74
|
+
provide: constants_js_1.STORAGE_MODULE_ID,
|
|
75
|
+
useValue: crypto_1.default.randomUUID(),
|
|
76
|
+
},
|
|
72
77
|
];
|
|
73
78
|
return {
|
|
79
|
+
global: opts.global,
|
|
74
80
|
module: StorageCoreModule,
|
|
81
|
+
imports: opts.imports,
|
|
75
82
|
...metadata,
|
|
76
|
-
providers
|
|
77
|
-
...(metadata.providers ?? []),
|
|
78
|
-
...providers,
|
|
79
|
-
{
|
|
80
|
-
provide: constants_js_1.STORAGE_MODULE_ID,
|
|
81
|
-
useValue: crypto_1.default.randomUUID(),
|
|
82
|
-
},
|
|
83
|
-
],
|
|
83
|
+
providers,
|
|
84
84
|
exports: [constants_js_1.STORAGE_OPTIONS, token, ...(metadata.exports ?? [])],
|
|
85
85
|
};
|
|
86
86
|
}
|
|
@@ -44,6 +44,7 @@ export class StorageCoreModule {
|
|
|
44
44
|
static _createDynamicModule(opts, metadata) {
|
|
45
45
|
const token = opts.token ?? StorageConnection;
|
|
46
46
|
const providers = [
|
|
47
|
+
...(metadata.providers ?? []),
|
|
47
48
|
{
|
|
48
49
|
provide: token,
|
|
49
50
|
inject: [STORAGE_OPTIONS],
|
|
@@ -65,18 +66,17 @@ export class StorageCoreModule {
|
|
|
65
66
|
? new Logger(opts.logger)
|
|
66
67
|
: opts.logger,
|
|
67
68
|
},
|
|
69
|
+
{
|
|
70
|
+
provide: STORAGE_MODULE_ID,
|
|
71
|
+
useValue: crypto.randomUUID(),
|
|
72
|
+
},
|
|
68
73
|
];
|
|
69
74
|
return {
|
|
75
|
+
global: opts.global,
|
|
70
76
|
module: StorageCoreModule,
|
|
77
|
+
imports: opts.imports,
|
|
71
78
|
...metadata,
|
|
72
|
-
providers
|
|
73
|
-
...(metadata.providers ?? []),
|
|
74
|
-
...providers,
|
|
75
|
-
{
|
|
76
|
-
provide: STORAGE_MODULE_ID,
|
|
77
|
-
useValue: crypto.randomUUID(),
|
|
78
|
-
},
|
|
79
|
-
],
|
|
79
|
+
providers,
|
|
80
80
|
exports: [STORAGE_OPTIONS, token, ...(metadata.exports ?? [])],
|
|
81
81
|
};
|
|
82
82
|
}
|