@infrab4a/connect-nestjs 1.1.0-beta.0 → 1.1.0-beta.1
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/index.cjs.js +25 -0
- package/index.esm.js +26 -1
- package/package.json +1 -1
- package/src/nest-connect.module.d.ts +2 -0
package/index.cjs.js
CHANGED
|
@@ -282,6 +282,29 @@ class ConnectFirestoreService {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
var NestElasticSeachModule_1;
|
|
286
|
+
let NestElasticSeachModule = NestElasticSeachModule_1 = class NestElasticSeachModule {
|
|
287
|
+
static initializeApp(options) {
|
|
288
|
+
return {
|
|
289
|
+
module: NestElasticSeachModule_1,
|
|
290
|
+
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
291
|
+
exports: [ES_CONFIG],
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
NestElasticSeachModule = NestElasticSeachModule_1 = __decorate([
|
|
296
|
+
common.Module({
|
|
297
|
+
providers: [
|
|
298
|
+
{
|
|
299
|
+
provide: connect.ProductsIndex,
|
|
300
|
+
useFactory: (adapter) => new connect.ProductsIndex(adapter),
|
|
301
|
+
inject: [exports.NativeElasticSearchAdapter],
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
exports: [connect.ProductsIndex],
|
|
305
|
+
})
|
|
306
|
+
], NestElasticSeachModule);
|
|
307
|
+
|
|
285
308
|
var NestFirestoreModule_1;
|
|
286
309
|
exports.NestFirestoreModule = NestFirestoreModule_1 = class NestFirestoreModule {
|
|
287
310
|
static initializeApp(options) {
|
|
@@ -678,10 +701,12 @@ exports.NestConnectModule = NestConnectModule_1 = class NestConnectModule {
|
|
|
678
701
|
imports: [
|
|
679
702
|
...(options.firebase ? [exports.NestFirestoreModule] : []),
|
|
680
703
|
...(connect.isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [exports.NestHasuraGraphQLModule.initializeApp(options.hasura)]),
|
|
704
|
+
...(connect.isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [NestElasticSeachModule.initializeApp(options.elasticSearch)]),
|
|
681
705
|
],
|
|
682
706
|
exports: [
|
|
683
707
|
...(options.firebase ? [exports.NestFirestoreModule] : []),
|
|
684
708
|
...(connect.isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [exports.NestHasuraGraphQLModule]),
|
|
709
|
+
...(connect.isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [NestElasticSeachModule]),
|
|
685
710
|
],
|
|
686
711
|
};
|
|
687
712
|
}
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from '@elastic/elasticsearch';
|
|
2
|
-
import { DebugHelper, isEmpty, NotFoundError, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewsHasuraGraphQLRepository, VariantHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, isNil } from '@infrab4a/connect';
|
|
2
|
+
import { DebugHelper, isEmpty, NotFoundError, ProductsIndex, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewsHasuraGraphQLRepository, VariantHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, isNil } from '@infrab4a/connect';
|
|
3
3
|
import { Injectable, Inject, Module, Global } from '@nestjs/common';
|
|
4
4
|
import { FirebaseConstants, FirebaseModule } from 'nestjs-firebase';
|
|
5
5
|
|
|
@@ -278,6 +278,29 @@ class ConnectFirestoreService {
|
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
+
var NestElasticSeachModule_1;
|
|
282
|
+
let NestElasticSeachModule = NestElasticSeachModule_1 = class NestElasticSeachModule {
|
|
283
|
+
static initializeApp(options) {
|
|
284
|
+
return {
|
|
285
|
+
module: NestElasticSeachModule_1,
|
|
286
|
+
providers: [{ provide: ES_CONFIG, useValue: options }],
|
|
287
|
+
exports: [ES_CONFIG],
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
NestElasticSeachModule = NestElasticSeachModule_1 = __decorate([
|
|
292
|
+
Module({
|
|
293
|
+
providers: [
|
|
294
|
+
{
|
|
295
|
+
provide: ProductsIndex,
|
|
296
|
+
useFactory: (adapter) => new ProductsIndex(adapter),
|
|
297
|
+
inject: [NativeElasticSearchAdapter],
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
exports: [ProductsIndex],
|
|
301
|
+
})
|
|
302
|
+
], NestElasticSeachModule);
|
|
303
|
+
|
|
281
304
|
var NestFirestoreModule_1;
|
|
282
305
|
let NestFirestoreModule = NestFirestoreModule_1 = class NestFirestoreModule {
|
|
283
306
|
static initializeApp(options) {
|
|
@@ -674,10 +697,12 @@ let NestConnectModule = NestConnectModule_1 = class NestConnectModule {
|
|
|
674
697
|
imports: [
|
|
675
698
|
...(options.firebase ? [NestFirestoreModule] : []),
|
|
676
699
|
...(isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [NestHasuraGraphQLModule.initializeApp(options.hasura)]),
|
|
700
|
+
...(isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [NestElasticSeachModule.initializeApp(options.elasticSearch)]),
|
|
677
701
|
],
|
|
678
702
|
exports: [
|
|
679
703
|
...(options.firebase ? [NestFirestoreModule] : []),
|
|
680
704
|
...(isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [NestHasuraGraphQLModule]),
|
|
705
|
+
...(isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [NestElasticSeachModule]),
|
|
681
706
|
],
|
|
682
707
|
};
|
|
683
708
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { ESClientOptions } from './infra';
|
|
2
3
|
import { HasuraGraphQLOptions } from './nest-hasura-graphql.module';
|
|
3
4
|
export declare class NestConnectModule {
|
|
4
5
|
static initializeApp(options: {
|
|
5
6
|
firebase?: {
|
|
6
7
|
googleApplicationCredential: string;
|
|
7
8
|
};
|
|
9
|
+
elasticSearch?: ESClientOptions;
|
|
8
10
|
hasura: HasuraGraphQLOptions;
|
|
9
11
|
}): DynamicModule;
|
|
10
12
|
}
|