@infrab4a/connect-nestjs 1.0.0-beta.10 → 1.0.0-beta.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/index.cjs.js +9 -107
- package/index.esm.js +10 -108
- package/package.json +1 -1
- package/src/nest-connect.module.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -168,6 +168,8 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
168
168
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
+
const HASURA_OPTIONS = 'HASURA_OPTIONS';
|
|
172
|
+
|
|
171
173
|
var NestFirestoreModule_1;
|
|
172
174
|
exports.NestFirestoreModule = NestFirestoreModule_1 = class NestFirestoreModule {
|
|
173
175
|
static initializeApp(options) {
|
|
@@ -182,13 +184,12 @@ exports.NestFirestoreModule = NestFirestoreModule_1 = class NestFirestoreModule
|
|
|
182
184
|
}
|
|
183
185
|
};
|
|
184
186
|
exports.NestFirestoreModule = NestFirestoreModule_1 = __decorate([
|
|
185
|
-
common.Global(),
|
|
186
187
|
common.Module({
|
|
187
188
|
providers: [
|
|
188
189
|
{
|
|
189
190
|
provide: 'FirestoreOptions',
|
|
190
|
-
useFactory: (
|
|
191
|
-
firestore: new ConnectFirestoreService(
|
|
191
|
+
useFactory: (firestore) => ({
|
|
192
|
+
firestore: new ConnectFirestoreService(firestore),
|
|
192
193
|
}),
|
|
193
194
|
inject: [nestjsFirebase.FirebaseConstants.FIREBASE_TOKEN],
|
|
194
195
|
},
|
|
@@ -382,40 +383,9 @@ exports.NestFirestoreModule = NestFirestoreModule_1 = __decorate([
|
|
|
382
383
|
inject: ['FirestoreOptions', connect.ProductFirestoreRepository],
|
|
383
384
|
},
|
|
384
385
|
],
|
|
385
|
-
exports: [
|
|
386
|
-
'BeautyProfileRepository',
|
|
387
|
-
'Buy2WinRepository',
|
|
388
|
-
connect.CategoryFirestoreRepository,
|
|
389
|
-
'CheckoutRepository',
|
|
390
|
-
'CheckoutSubscriptionRepository',
|
|
391
|
-
'CouponRepository',
|
|
392
|
-
'CampaignHashtagRepository',
|
|
393
|
-
'CampaignDashboardRepository',
|
|
394
|
-
'EditionRepository',
|
|
395
|
-
'HomeRepository',
|
|
396
|
-
'LeadRepository',
|
|
397
|
-
'LegacyOrderRepository',
|
|
398
|
-
'ShopMenuRepository',
|
|
399
|
-
'OrderRepository',
|
|
400
|
-
'PaymentRepository',
|
|
401
|
-
connect.ProductFirestoreRepository,
|
|
402
|
-
'ShopSettingsRepository',
|
|
403
|
-
'SubscriptionPaymentRepository',
|
|
404
|
-
'SubscriptionPlanRepository',
|
|
405
|
-
'SubscriptionProductRepository',
|
|
406
|
-
'SubscriptionRepository',
|
|
407
|
-
'UserRepository',
|
|
408
|
-
'UserAddressRepository',
|
|
409
|
-
'UserPaymentMethodRepository',
|
|
410
|
-
'SubscriptionMaterializationRepository',
|
|
411
|
-
'SubscriptionSummaryRepository',
|
|
412
|
-
connect.ProductVariantFirestoreRepository,
|
|
413
|
-
],
|
|
414
386
|
})
|
|
415
387
|
], exports.NestFirestoreModule);
|
|
416
388
|
|
|
417
|
-
const HASURA_OPTIONS = 'HASURA_OPTIONS';
|
|
418
|
-
|
|
419
389
|
var NestHasuraGraphQLModule_1;
|
|
420
390
|
exports.NestHasuraGraphQLModule = NestHasuraGraphQLModule_1 = class NestHasuraGraphQLModule {
|
|
421
391
|
static initializeApp(options) {
|
|
@@ -426,7 +396,6 @@ exports.NestHasuraGraphQLModule = NestHasuraGraphQLModule_1 = class NestHasuraGr
|
|
|
426
396
|
}
|
|
427
397
|
};
|
|
428
398
|
exports.NestHasuraGraphQLModule = NestHasuraGraphQLModule_1 = __decorate([
|
|
429
|
-
common.Global(),
|
|
430
399
|
common.Module({
|
|
431
400
|
providers: [
|
|
432
401
|
{
|
|
@@ -535,26 +504,6 @@ exports.NestHasuraGraphQLModule = NestHasuraGraphQLModule_1 = __decorate([
|
|
|
535
504
|
useExisting: connect.WishlistHasuraGraphQLRepository,
|
|
536
505
|
},
|
|
537
506
|
],
|
|
538
|
-
exports: [
|
|
539
|
-
'CategoryRepository',
|
|
540
|
-
connect.CategoryHasuraGraphQLRepository,
|
|
541
|
-
'ProductRepository',
|
|
542
|
-
connect.ProductHasuraGraphQLRepository,
|
|
543
|
-
'ProductReviewsRepository',
|
|
544
|
-
connect.ProductReviewsHasuraGraphQLRepository,
|
|
545
|
-
'VariantRepository',
|
|
546
|
-
connect.VariantHasuraGraphQLRepository,
|
|
547
|
-
'CategoryFilterRepository',
|
|
548
|
-
connect.CategoryFilterHasuraGraphQLRepository,
|
|
549
|
-
'FilterOptionRepository',
|
|
550
|
-
connect.FilterOptionHasuraGraphQLRepository,
|
|
551
|
-
'FilterRepository',
|
|
552
|
-
connect.FilterHasuraGraphQLRepository,
|
|
553
|
-
'CategoryCollectionChildrenRepository',
|
|
554
|
-
connect.CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
555
|
-
'WishlistRepository',
|
|
556
|
-
connect.WishlistHasuraGraphQLRepository,
|
|
557
|
-
],
|
|
558
507
|
})
|
|
559
508
|
], exports.NestHasuraGraphQLModule);
|
|
560
509
|
|
|
@@ -564,64 +513,17 @@ exports.NestConnectModule = NestConnectModule_1 = class NestConnectModule {
|
|
|
564
513
|
return {
|
|
565
514
|
module: NestConnectModule_1,
|
|
566
515
|
imports: [
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
googleApplicationCredential: options.firebase.googleApplicationCredential,
|
|
571
|
-
}),
|
|
572
|
-
]
|
|
573
|
-
: []),
|
|
574
|
-
...(connect.isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [exports.NestHasuraGraphQLModule.initializeApp(options.hasura)]),
|
|
516
|
+
nestjsFirebase.FirebaseModule.forRoot({
|
|
517
|
+
googleApplicationCredential: options.firebase.googleApplicationCredential,
|
|
518
|
+
}),
|
|
575
519
|
],
|
|
576
|
-
|
|
577
|
-
// ...(isNil(options?.hasura)
|
|
578
|
-
// ? []
|
|
579
|
-
// : [
|
|
580
|
-
// 'CategoryRepository',
|
|
581
|
-
// 'ProductRepository',
|
|
582
|
-
// 'ProductReviewsRepository',
|
|
583
|
-
// 'VariantRepository',
|
|
584
|
-
// 'CategoryFilterRepository',
|
|
585
|
-
// 'FilterOptionRepository',
|
|
586
|
-
// 'FilterRepository',
|
|
587
|
-
// 'CategoryCollectionChildrenRepository',
|
|
588
|
-
// 'WishlistRepository',
|
|
589
|
-
// ]),
|
|
590
|
-
// ...(isNil(options?.firebase?.googleApplicationCredential)
|
|
591
|
-
// ? []
|
|
592
|
-
// : [
|
|
593
|
-
// 'BeautyProfileRepository',
|
|
594
|
-
// 'Buy2WinRepository',
|
|
595
|
-
// 'CheckoutRepository',
|
|
596
|
-
// 'CheckoutSubscriptionRepository',
|
|
597
|
-
// 'CouponRepository',
|
|
598
|
-
// 'CampaignHashtagRepository',
|
|
599
|
-
// 'CampaignDashboardRepository',
|
|
600
|
-
// 'EditionRepository',
|
|
601
|
-
// 'HomeRepository',
|
|
602
|
-
// 'LeadRepository',
|
|
603
|
-
// 'LegacyOrderRepository',
|
|
604
|
-
// 'ShopMenuRepository',
|
|
605
|
-
// 'OrderRepository',
|
|
606
|
-
// 'PaymentRepository',
|
|
607
|
-
// 'ShopSettingsRepository',
|
|
608
|
-
// 'SubscriptionPaymentRepository',
|
|
609
|
-
// 'SubscriptionPlanRepository',
|
|
610
|
-
// 'SubscriptionProductRepository',
|
|
611
|
-
// 'SubscriptionRepository',
|
|
612
|
-
// 'UserRepository',
|
|
613
|
-
// 'UserAddressRepository',
|
|
614
|
-
// 'UserPaymentMethodRepository',
|
|
615
|
-
// 'SubscriptionMaterializationRepository',
|
|
616
|
-
// 'SubscriptionSummaryRepository',
|
|
617
|
-
// ]),
|
|
618
|
-
// ],
|
|
520
|
+
providers: [...(connect.isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }])],
|
|
619
521
|
};
|
|
620
522
|
}
|
|
621
523
|
};
|
|
622
524
|
exports.NestConnectModule = NestConnectModule_1 = __decorate([
|
|
623
525
|
common.Module({
|
|
624
|
-
imports: [exports.NestFirestoreModule],
|
|
526
|
+
imports: [exports.NestFirestoreModule, exports.NestHasuraGraphQLModule],
|
|
625
527
|
})
|
|
626
528
|
], exports.NestConnectModule);
|
|
627
529
|
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isEmpty, 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 {
|
|
2
|
+
import { Module } from '@nestjs/common';
|
|
3
3
|
import { FirebaseConstants, FirebaseModule } from 'nestjs-firebase';
|
|
4
4
|
|
|
5
5
|
class ConnectBaseDocumentSnapshot {
|
|
@@ -164,6 +164,8 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
164
164
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
+
const HASURA_OPTIONS = 'HASURA_OPTIONS';
|
|
168
|
+
|
|
167
169
|
var NestFirestoreModule_1;
|
|
168
170
|
let NestFirestoreModule = NestFirestoreModule_1 = class NestFirestoreModule {
|
|
169
171
|
static initializeApp(options) {
|
|
@@ -178,13 +180,12 @@ let NestFirestoreModule = NestFirestoreModule_1 = class NestFirestoreModule {
|
|
|
178
180
|
}
|
|
179
181
|
};
|
|
180
182
|
NestFirestoreModule = NestFirestoreModule_1 = __decorate([
|
|
181
|
-
Global(),
|
|
182
183
|
Module({
|
|
183
184
|
providers: [
|
|
184
185
|
{
|
|
185
186
|
provide: 'FirestoreOptions',
|
|
186
|
-
useFactory: (
|
|
187
|
-
firestore: new ConnectFirestoreService(
|
|
187
|
+
useFactory: (firestore) => ({
|
|
188
|
+
firestore: new ConnectFirestoreService(firestore),
|
|
188
189
|
}),
|
|
189
190
|
inject: [FirebaseConstants.FIREBASE_TOKEN],
|
|
190
191
|
},
|
|
@@ -378,40 +379,9 @@ NestFirestoreModule = NestFirestoreModule_1 = __decorate([
|
|
|
378
379
|
inject: ['FirestoreOptions', ProductFirestoreRepository],
|
|
379
380
|
},
|
|
380
381
|
],
|
|
381
|
-
exports: [
|
|
382
|
-
'BeautyProfileRepository',
|
|
383
|
-
'Buy2WinRepository',
|
|
384
|
-
CategoryFirestoreRepository,
|
|
385
|
-
'CheckoutRepository',
|
|
386
|
-
'CheckoutSubscriptionRepository',
|
|
387
|
-
'CouponRepository',
|
|
388
|
-
'CampaignHashtagRepository',
|
|
389
|
-
'CampaignDashboardRepository',
|
|
390
|
-
'EditionRepository',
|
|
391
|
-
'HomeRepository',
|
|
392
|
-
'LeadRepository',
|
|
393
|
-
'LegacyOrderRepository',
|
|
394
|
-
'ShopMenuRepository',
|
|
395
|
-
'OrderRepository',
|
|
396
|
-
'PaymentRepository',
|
|
397
|
-
ProductFirestoreRepository,
|
|
398
|
-
'ShopSettingsRepository',
|
|
399
|
-
'SubscriptionPaymentRepository',
|
|
400
|
-
'SubscriptionPlanRepository',
|
|
401
|
-
'SubscriptionProductRepository',
|
|
402
|
-
'SubscriptionRepository',
|
|
403
|
-
'UserRepository',
|
|
404
|
-
'UserAddressRepository',
|
|
405
|
-
'UserPaymentMethodRepository',
|
|
406
|
-
'SubscriptionMaterializationRepository',
|
|
407
|
-
'SubscriptionSummaryRepository',
|
|
408
|
-
ProductVariantFirestoreRepository,
|
|
409
|
-
],
|
|
410
382
|
})
|
|
411
383
|
], NestFirestoreModule);
|
|
412
384
|
|
|
413
|
-
const HASURA_OPTIONS = 'HASURA_OPTIONS';
|
|
414
|
-
|
|
415
385
|
var NestHasuraGraphQLModule_1;
|
|
416
386
|
let NestHasuraGraphQLModule = NestHasuraGraphQLModule_1 = class NestHasuraGraphQLModule {
|
|
417
387
|
static initializeApp(options) {
|
|
@@ -422,7 +392,6 @@ let NestHasuraGraphQLModule = NestHasuraGraphQLModule_1 = class NestHasuraGraphQ
|
|
|
422
392
|
}
|
|
423
393
|
};
|
|
424
394
|
NestHasuraGraphQLModule = NestHasuraGraphQLModule_1 = __decorate([
|
|
425
|
-
Global(),
|
|
426
395
|
Module({
|
|
427
396
|
providers: [
|
|
428
397
|
{
|
|
@@ -531,26 +500,6 @@ NestHasuraGraphQLModule = NestHasuraGraphQLModule_1 = __decorate([
|
|
|
531
500
|
useExisting: WishlistHasuraGraphQLRepository,
|
|
532
501
|
},
|
|
533
502
|
],
|
|
534
|
-
exports: [
|
|
535
|
-
'CategoryRepository',
|
|
536
|
-
CategoryHasuraGraphQLRepository,
|
|
537
|
-
'ProductRepository',
|
|
538
|
-
ProductHasuraGraphQLRepository,
|
|
539
|
-
'ProductReviewsRepository',
|
|
540
|
-
ProductReviewsHasuraGraphQLRepository,
|
|
541
|
-
'VariantRepository',
|
|
542
|
-
VariantHasuraGraphQLRepository,
|
|
543
|
-
'CategoryFilterRepository',
|
|
544
|
-
CategoryFilterHasuraGraphQLRepository,
|
|
545
|
-
'FilterOptionRepository',
|
|
546
|
-
FilterOptionHasuraGraphQLRepository,
|
|
547
|
-
'FilterRepository',
|
|
548
|
-
FilterHasuraGraphQLRepository,
|
|
549
|
-
'CategoryCollectionChildrenRepository',
|
|
550
|
-
CategoryCollectionChildrenHasuraGraphQLRepository,
|
|
551
|
-
'WishlistRepository',
|
|
552
|
-
WishlistHasuraGraphQLRepository,
|
|
553
|
-
],
|
|
554
503
|
})
|
|
555
504
|
], NestHasuraGraphQLModule);
|
|
556
505
|
|
|
@@ -560,64 +509,17 @@ let NestConnectModule = NestConnectModule_1 = class NestConnectModule {
|
|
|
560
509
|
return {
|
|
561
510
|
module: NestConnectModule_1,
|
|
562
511
|
imports: [
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
googleApplicationCredential: options.firebase.googleApplicationCredential,
|
|
567
|
-
}),
|
|
568
|
-
]
|
|
569
|
-
: []),
|
|
570
|
-
...(isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [NestHasuraGraphQLModule.initializeApp(options.hasura)]),
|
|
512
|
+
FirebaseModule.forRoot({
|
|
513
|
+
googleApplicationCredential: options.firebase.googleApplicationCredential,
|
|
514
|
+
}),
|
|
571
515
|
],
|
|
572
|
-
|
|
573
|
-
// ...(isNil(options?.hasura)
|
|
574
|
-
// ? []
|
|
575
|
-
// : [
|
|
576
|
-
// 'CategoryRepository',
|
|
577
|
-
// 'ProductRepository',
|
|
578
|
-
// 'ProductReviewsRepository',
|
|
579
|
-
// 'VariantRepository',
|
|
580
|
-
// 'CategoryFilterRepository',
|
|
581
|
-
// 'FilterOptionRepository',
|
|
582
|
-
// 'FilterRepository',
|
|
583
|
-
// 'CategoryCollectionChildrenRepository',
|
|
584
|
-
// 'WishlistRepository',
|
|
585
|
-
// ]),
|
|
586
|
-
// ...(isNil(options?.firebase?.googleApplicationCredential)
|
|
587
|
-
// ? []
|
|
588
|
-
// : [
|
|
589
|
-
// 'BeautyProfileRepository',
|
|
590
|
-
// 'Buy2WinRepository',
|
|
591
|
-
// 'CheckoutRepository',
|
|
592
|
-
// 'CheckoutSubscriptionRepository',
|
|
593
|
-
// 'CouponRepository',
|
|
594
|
-
// 'CampaignHashtagRepository',
|
|
595
|
-
// 'CampaignDashboardRepository',
|
|
596
|
-
// 'EditionRepository',
|
|
597
|
-
// 'HomeRepository',
|
|
598
|
-
// 'LeadRepository',
|
|
599
|
-
// 'LegacyOrderRepository',
|
|
600
|
-
// 'ShopMenuRepository',
|
|
601
|
-
// 'OrderRepository',
|
|
602
|
-
// 'PaymentRepository',
|
|
603
|
-
// 'ShopSettingsRepository',
|
|
604
|
-
// 'SubscriptionPaymentRepository',
|
|
605
|
-
// 'SubscriptionPlanRepository',
|
|
606
|
-
// 'SubscriptionProductRepository',
|
|
607
|
-
// 'SubscriptionRepository',
|
|
608
|
-
// 'UserRepository',
|
|
609
|
-
// 'UserAddressRepository',
|
|
610
|
-
// 'UserPaymentMethodRepository',
|
|
611
|
-
// 'SubscriptionMaterializationRepository',
|
|
612
|
-
// 'SubscriptionSummaryRepository',
|
|
613
|
-
// ]),
|
|
614
|
-
// ],
|
|
516
|
+
providers: [...(isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }])],
|
|
615
517
|
};
|
|
616
518
|
}
|
|
617
519
|
};
|
|
618
520
|
NestConnectModule = NestConnectModule_1 = __decorate([
|
|
619
521
|
Module({
|
|
620
|
-
imports: [NestFirestoreModule],
|
|
522
|
+
imports: [NestFirestoreModule, NestHasuraGraphQLModule],
|
|
621
523
|
})
|
|
622
524
|
], NestConnectModule);
|
|
623
525
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { DynamicModule } from '@nestjs/common';
|
|
|
2
2
|
import { HasuraGraphQLOptions } from './nest-hasura-graphql.module';
|
|
3
3
|
export declare class NestConnectModule {
|
|
4
4
|
static initializeApp(options: {
|
|
5
|
-
firebase
|
|
5
|
+
firebase: {
|
|
6
6
|
googleApplicationCredential: string;
|
|
7
7
|
};
|
|
8
8
|
hasura: HasuraGraphQLOptions;
|