@vendure/core 1.7.0 → 1.7.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/dist/api/resolvers/base/base-auth.resolver.d.ts +2 -2
- package/dist/api/resolvers/base/base-auth.resolver.js.map +1 -1
- package/dist/common/constants.d.ts +1 -2
- package/dist/config/catalog/default-collection-filters.d.ts +18 -19
- package/dist/config/promotion/conditions/buy-x-get-y-free-condition.d.ts +5 -7
- package/dist/connection/remove-custom-fields-with-eager-relations.d.ts +34 -0
- package/dist/connection/remove-custom-fields-with-eager-relations.js +55 -0
- package/dist/connection/remove-custom-fields-with-eager-relations.js.map +1 -0
- package/dist/connection/transactional-connection.d.ts +0 -33
- package/dist/connection/transactional-connection.js +21 -53
- package/dist/connection/transactional-connection.js.map +1 -1
- package/dist/entity/asset/asset.entity.js +4 -2
- package/dist/entity/asset/asset.entity.js.map +1 -1
- package/dist/entity/asset/orderable-asset.entity.js +3 -1
- package/dist/entity/asset/orderable-asset.entity.js.map +1 -1
- package/dist/entity/authentication-method/external-authentication-method.entity.js +3 -1
- package/dist/entity/authentication-method/external-authentication-method.entity.js.map +1 -1
- package/dist/entity/authentication-method/native-authentication-method.entity.js +3 -1
- package/dist/entity/authentication-method/native-authentication-method.entity.js.map +1 -1
- package/dist/entity/channel/channel.entity.js +5 -3
- package/dist/entity/channel/channel.entity.js.map +1 -1
- package/dist/entity/collection/collection-asset.entity.js +4 -2
- package/dist/entity/collection/collection-asset.entity.js.map +1 -1
- package/dist/entity/collection/collection-translation.entity.js +4 -2
- package/dist/entity/collection/collection-translation.entity.js.map +1 -1
- package/dist/entity/country/country-translation.entity.js +4 -2
- package/dist/entity/country/country-translation.entity.js.map +1 -1
- package/dist/entity/country/country.entity.js +3 -1
- package/dist/entity/country/country.entity.js.map +1 -1
- package/dist/entity/customer-group/customer-group.entity.js +3 -1
- package/dist/entity/customer-group/customer-group.entity.js.map +1 -1
- package/dist/entity/fulfillment/fulfillment.entity.js +3 -1
- package/dist/entity/fulfillment/fulfillment.entity.js.map +1 -1
- package/dist/entity/global-settings/global-settings.entity.js +3 -1
- package/dist/entity/global-settings/global-settings.entity.js.map +1 -1
- package/dist/entity/product/product-asset.entity.js +4 -2
- package/dist/entity/product/product-asset.entity.js.map +1 -1
- package/dist/entity/product-variant/product-variant-asset.entity.js +4 -2
- package/dist/entity/product-variant/product-variant-asset.entity.js.map +1 -1
- package/dist/entity/role/role.entity.js +3 -1
- package/dist/entity/role/role.entity.js.map +1 -1
- package/dist/entity/tag/tag.entity.js +3 -1
- package/dist/entity/tag/tag.entity.js.map +1 -1
- package/dist/entity/user/user.entity.js +3 -1
- package/dist/entity/user/user.entity.js.map +1 -1
- package/dist/entity/zone/zone.entity.js +3 -1
- package/dist/entity/zone/zone.entity.js.map +1 -1
- package/dist/job-queue/in-memory-job-queue-strategy.d.ts +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js +7 -7
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/postgres-search-strategy.js +7 -7
- package/dist/plugin/default-search-plugin/search-strategy/postgres-search-strategy.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-utils.js +8 -10
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-utils.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.js +7 -10
- package/dist/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.js.map +1 -1
- package/dist/service/services/order.service.js +1 -1
- package/dist/service/services/order.service.js.map +1 -1
- package/dist/service/services/product.service.js +3 -1
- package/dist/service/services/product.service.js.map +1 -1
- package/dist/service/services/user.service.d.ts +1 -1
- package/dist/service/services/user.service.js +5 -0
- package/dist/service/services/user.service.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthenticationResult as ShopAuthenticationResult } from '@vendure/common/lib/generated-shop-types';
|
|
1
|
+
import { AuthenticationResult as ShopAuthenticationResult, PasswordValidationError } from '@vendure/common/lib/generated-shop-types';
|
|
2
2
|
import { AuthenticationResult as AdminAuthenticationResult, CurrentUser, MutationAuthenticateArgs, MutationLoginArgs, Success } from '@vendure/common/lib/generated-types';
|
|
3
3
|
import { Request, Response } from 'express';
|
|
4
4
|
import { NativeAuthStrategyError as AdminNativeAuthStrategyError } from '../../../common/error/generated-graphql-admin-errors';
|
|
@@ -34,7 +34,7 @@ export declare class BaseAuthResolver {
|
|
|
34
34
|
/**
|
|
35
35
|
* Updates the password of an existing User.
|
|
36
36
|
*/
|
|
37
|
-
protected updatePassword(ctx: RequestContext, currentPassword: string, newPassword: string): Promise<boolean | InvalidCredentialsError>;
|
|
37
|
+
protected updatePassword(ctx: RequestContext, currentPassword: string, newPassword: string): Promise<boolean | InvalidCredentialsError | PasswordValidationError>;
|
|
38
38
|
/**
|
|
39
39
|
* Exposes a subset of the User properties which we want to expose to the public API.
|
|
40
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-auth.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/base/base-auth.resolver.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"base-auth.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/base/base-auth.resolver.ts"],"names":[],"mappings":";;;AAcA,qEAA0E;AAC1E,yDAA8D;AAC9D,yGAA+H;AAC/H,uGAI6D;AAC7D,wGAAgG;AAEhG,0EAAyE;AAEzE,gHAA0G;AAI1G,8EAAyE;AAGzE,sEAAiE;AAEjE,MAAa,gBAAgB;IAGzB,YACc,WAAwB,EACxB,WAAwB,EACxB,oBAA0C,EAC1C,aAA4B;QAH5B,gBAAW,GAAX,WAAW,CAAa;QACxB,gBAAW,GAAX,WAAW,CAAa;QACxB,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,kBAAa,GAAb,aAAa,CAAe;QAEtC,IAAI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common/lib/generated-types';
|
|
2
1
|
import { PermissionDefinition, PermissionMetadata } from './permission-definition';
|
|
3
2
|
/**
|
|
4
3
|
* This value should be rarely used - only in those contexts where we have no access to the
|
|
5
4
|
* VendureConfig to ensure at least a valid LanguageCode is available.
|
|
6
5
|
*/
|
|
7
|
-
export declare const DEFAULT_LANGUAGE_CODE
|
|
6
|
+
export declare const DEFAULT_LANGUAGE_CODE: any;
|
|
8
7
|
export declare const TRANSACTION_MANAGER_KEY: unique symbol;
|
|
9
8
|
export declare const REQUEST_CONTEXT_KEY = "vendureRequestContext";
|
|
10
9
|
export declare const REQUEST_CONTEXT_MAP_KEY = "vendureRequestContextMap";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { LanguageCode } from '@vendure/common/lib/generated-types';
|
|
2
1
|
import { ConfigArgDef } from '../../common/configurable-operation';
|
|
3
2
|
import { CollectionFilter } from './collection-filter';
|
|
4
3
|
/**
|
|
@@ -18,24 +17,24 @@ export declare const combineWithAndArg: ConfigArgDef<'boolean'>;
|
|
|
18
17
|
*/
|
|
19
18
|
export declare const facetValueCollectionFilter: CollectionFilter<{
|
|
20
19
|
facetValueIds: {
|
|
21
|
-
type:
|
|
20
|
+
type: string;
|
|
22
21
|
list: true;
|
|
23
22
|
ui: {
|
|
24
23
|
component: string;
|
|
25
24
|
};
|
|
26
25
|
label: {
|
|
27
|
-
languageCode:
|
|
26
|
+
languageCode: any;
|
|
28
27
|
value: string;
|
|
29
28
|
}[];
|
|
30
29
|
};
|
|
31
30
|
containsAny: {
|
|
32
|
-
type:
|
|
31
|
+
type: string;
|
|
33
32
|
label: {
|
|
34
|
-
languageCode:
|
|
33
|
+
languageCode: any;
|
|
35
34
|
value: string;
|
|
36
35
|
}[];
|
|
37
36
|
description: {
|
|
38
|
-
languageCode:
|
|
37
|
+
languageCode: any;
|
|
39
38
|
value: string;
|
|
40
39
|
}[];
|
|
41
40
|
};
|
|
@@ -58,10 +57,10 @@ export declare const variantNameCollectionFilter: CollectionFilter<{
|
|
|
58
57
|
}>;
|
|
59
58
|
export declare const variantIdCollectionFilter: CollectionFilter<{
|
|
60
59
|
variantIds: {
|
|
61
|
-
type:
|
|
60
|
+
type: string;
|
|
62
61
|
list: true;
|
|
63
62
|
label: {
|
|
64
|
-
languageCode:
|
|
63
|
+
languageCode: any;
|
|
65
64
|
value: string;
|
|
66
65
|
}[];
|
|
67
66
|
ui: {
|
|
@@ -73,10 +72,10 @@ export declare const variantIdCollectionFilter: CollectionFilter<{
|
|
|
73
72
|
}>;
|
|
74
73
|
export declare const productIdCollectionFilter: CollectionFilter<{
|
|
75
74
|
productIds: {
|
|
76
|
-
type:
|
|
75
|
+
type: string;
|
|
77
76
|
list: true;
|
|
78
77
|
label: {
|
|
79
|
-
languageCode:
|
|
78
|
+
languageCode: any;
|
|
80
79
|
value: string;
|
|
81
80
|
}[];
|
|
82
81
|
ui: {
|
|
@@ -88,24 +87,24 @@ export declare const productIdCollectionFilter: CollectionFilter<{
|
|
|
88
87
|
}>;
|
|
89
88
|
export declare const defaultCollectionFilters: (CollectionFilter<{
|
|
90
89
|
facetValueIds: {
|
|
91
|
-
type:
|
|
90
|
+
type: string;
|
|
92
91
|
list: true;
|
|
93
92
|
ui: {
|
|
94
93
|
component: string;
|
|
95
94
|
};
|
|
96
95
|
label: {
|
|
97
|
-
languageCode:
|
|
96
|
+
languageCode: any;
|
|
98
97
|
value: string;
|
|
99
98
|
}[];
|
|
100
99
|
};
|
|
101
100
|
containsAny: {
|
|
102
|
-
type:
|
|
101
|
+
type: string;
|
|
103
102
|
label: {
|
|
104
|
-
languageCode:
|
|
103
|
+
languageCode: any;
|
|
105
104
|
value: string;
|
|
106
105
|
}[];
|
|
107
106
|
description: {
|
|
108
|
-
languageCode:
|
|
107
|
+
languageCode: any;
|
|
109
108
|
value: string;
|
|
110
109
|
}[];
|
|
111
110
|
};
|
|
@@ -126,10 +125,10 @@ export declare const defaultCollectionFilters: (CollectionFilter<{
|
|
|
126
125
|
combineWithAnd: import("../../common/configurable-operation").ConfigArgCommonDef<"boolean"> & import("../../common/configurable-operation").WithArgConfig<never>;
|
|
127
126
|
}> | CollectionFilter<{
|
|
128
127
|
variantIds: {
|
|
129
|
-
type:
|
|
128
|
+
type: string;
|
|
130
129
|
list: true;
|
|
131
130
|
label: {
|
|
132
|
-
languageCode:
|
|
131
|
+
languageCode: any;
|
|
133
132
|
value: string;
|
|
134
133
|
}[];
|
|
135
134
|
ui: {
|
|
@@ -140,10 +139,10 @@ export declare const defaultCollectionFilters: (CollectionFilter<{
|
|
|
140
139
|
combineWithAnd: import("../../common/configurable-operation").ConfigArgCommonDef<"boolean"> & import("../../common/configurable-operation").WithArgConfig<never>;
|
|
141
140
|
}> | CollectionFilter<{
|
|
142
141
|
productIds: {
|
|
143
|
-
type:
|
|
142
|
+
type: string;
|
|
144
143
|
list: true;
|
|
145
144
|
label: {
|
|
146
|
-
languageCode:
|
|
145
|
+
languageCode: any;
|
|
147
146
|
value: string;
|
|
148
147
|
}[];
|
|
149
148
|
ui: {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { LanguageCode } from '@vendure/common/lib/generated-types';
|
|
2
|
-
import { ID } from '@vendure/common/lib/shared-types';
|
|
3
1
|
import { PromotionCondition } from '../promotion-condition';
|
|
4
2
|
export declare const buyXGetYFreeCondition: PromotionCondition<{
|
|
5
3
|
amountX: {
|
|
@@ -7,13 +5,13 @@ export declare const buyXGetYFreeCondition: PromotionCondition<{
|
|
|
7
5
|
defaultValue: number;
|
|
8
6
|
};
|
|
9
7
|
variantIdsX: {
|
|
10
|
-
type:
|
|
8
|
+
type: string;
|
|
11
9
|
list: true;
|
|
12
10
|
ui: {
|
|
13
11
|
component: string;
|
|
14
12
|
};
|
|
15
13
|
label: {
|
|
16
|
-
languageCode:
|
|
14
|
+
languageCode: any;
|
|
17
15
|
value: string;
|
|
18
16
|
}[];
|
|
19
17
|
};
|
|
@@ -22,16 +20,16 @@ export declare const buyXGetYFreeCondition: PromotionCondition<{
|
|
|
22
20
|
defaultValue: number;
|
|
23
21
|
};
|
|
24
22
|
variantIdsY: {
|
|
25
|
-
type:
|
|
23
|
+
type: string;
|
|
26
24
|
list: true;
|
|
27
25
|
ui: {
|
|
28
26
|
component: string;
|
|
29
27
|
};
|
|
30
28
|
label: {
|
|
31
|
-
languageCode:
|
|
29
|
+
languageCode: any;
|
|
32
30
|
value: string;
|
|
33
31
|
}[];
|
|
34
32
|
};
|
|
35
33
|
}, "buy_x_get_y_free", false | {
|
|
36
|
-
freeItemIds:
|
|
34
|
+
freeItemIds: any[];
|
|
37
35
|
}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SelectQueryBuilder } from 'typeorm';
|
|
2
|
+
/**
|
|
3
|
+
* This is a work-around for this issue: https://github.com/vendure-ecommerce/vendure/issues/1664
|
|
4
|
+
*
|
|
5
|
+
* Explanation:
|
|
6
|
+
* When calling `FindOptionsUtils.joinEagerRelations()`, there appears to be a bug in TypeORM whereby
|
|
7
|
+
* it will throw the following error *if* the `options.relations` array contains any customField relations
|
|
8
|
+
* where the related entity itself has eagerly-loaded relations.
|
|
9
|
+
*
|
|
10
|
+
* For example, let's say we define a custom field on the Product entity like this:
|
|
11
|
+
* ```
|
|
12
|
+
* Product: [{
|
|
13
|
+
* name: 'featuredFacet',
|
|
14
|
+
* type: 'relation',
|
|
15
|
+
* entity: Facet,
|
|
16
|
+
* }],
|
|
17
|
+
* ```
|
|
18
|
+
* and then we pass into `TransactionalConnection.findOneInChannel()` an options array of:
|
|
19
|
+
*
|
|
20
|
+
* ```
|
|
21
|
+
* { relations: ['customFields.featuredFacet'] }
|
|
22
|
+
* ```
|
|
23
|
+
* it will throw an error because the `Facet` entity itself has eager relations (namely the `translations` property).
|
|
24
|
+
* This will cause TypeORM to throw the error:
|
|
25
|
+
* ```
|
|
26
|
+
* TypeORMError: "entity__customFields" alias was not found. Maybe you forgot to join it?
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* So this method introspects the QueryBuilder metadata and checks for any custom field relations which
|
|
30
|
+
* themselves have eager relations. If found, it removes those items from the `options.relations` array.
|
|
31
|
+
*
|
|
32
|
+
* TODO: Ideally create a minimal reproduction case and report in the TypeORM repo for an upstream fix.
|
|
33
|
+
*/
|
|
34
|
+
export declare function removeCustomFieldsWithEagerRelations(qb: SelectQueryBuilder<any>, relations?: string[]): string[];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeCustomFieldsWithEagerRelations = void 0;
|
|
4
|
+
const index_1 = require("../config/index");
|
|
5
|
+
/**
|
|
6
|
+
* This is a work-around for this issue: https://github.com/vendure-ecommerce/vendure/issues/1664
|
|
7
|
+
*
|
|
8
|
+
* Explanation:
|
|
9
|
+
* When calling `FindOptionsUtils.joinEagerRelations()`, there appears to be a bug in TypeORM whereby
|
|
10
|
+
* it will throw the following error *if* the `options.relations` array contains any customField relations
|
|
11
|
+
* where the related entity itself has eagerly-loaded relations.
|
|
12
|
+
*
|
|
13
|
+
* For example, let's say we define a custom field on the Product entity like this:
|
|
14
|
+
* ```
|
|
15
|
+
* Product: [{
|
|
16
|
+
* name: 'featuredFacet',
|
|
17
|
+
* type: 'relation',
|
|
18
|
+
* entity: Facet,
|
|
19
|
+
* }],
|
|
20
|
+
* ```
|
|
21
|
+
* and then we pass into `TransactionalConnection.findOneInChannel()` an options array of:
|
|
22
|
+
*
|
|
23
|
+
* ```
|
|
24
|
+
* { relations: ['customFields.featuredFacet'] }
|
|
25
|
+
* ```
|
|
26
|
+
* it will throw an error because the `Facet` entity itself has eager relations (namely the `translations` property).
|
|
27
|
+
* This will cause TypeORM to throw the error:
|
|
28
|
+
* ```
|
|
29
|
+
* TypeORMError: "entity__customFields" alias was not found. Maybe you forgot to join it?
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* So this method introspects the QueryBuilder metadata and checks for any custom field relations which
|
|
33
|
+
* themselves have eager relations. If found, it removes those items from the `options.relations` array.
|
|
34
|
+
*
|
|
35
|
+
* TODO: Ideally create a minimal reproduction case and report in the TypeORM repo for an upstream fix.
|
|
36
|
+
*/
|
|
37
|
+
function removeCustomFieldsWithEagerRelations(qb, relations = []) {
|
|
38
|
+
let resultingRelations = relations;
|
|
39
|
+
const mainAlias = qb.expressionMap.mainAlias;
|
|
40
|
+
const customFieldsMetadata = mainAlias === null || mainAlias === void 0 ? void 0 : mainAlias.metadata.embeddeds.find(metadata => metadata.propertyName === 'customFields');
|
|
41
|
+
if (customFieldsMetadata) {
|
|
42
|
+
const customFieldRelationsWithEagerRelations = customFieldsMetadata.relations.filter(relation => !!relation.inverseEntityMetadata.ownRelations.find(or => or.isEager === true));
|
|
43
|
+
for (const relation of customFieldRelationsWithEagerRelations) {
|
|
44
|
+
const propertyName = relation.propertyName;
|
|
45
|
+
const relationsToRemove = relations.filter(r => r.startsWith(`customFields.${propertyName}`));
|
|
46
|
+
if (relationsToRemove.length) {
|
|
47
|
+
index_1.Logger.debug(`TransactionalConnection.findOneInChannel cannot automatically join relation [${mainAlias === null || mainAlias === void 0 ? void 0 : mainAlias.metadata.name}.customFields.${propertyName}]`);
|
|
48
|
+
resultingRelations = relations.filter(r => !r.startsWith(`customFields.${propertyName}`));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return resultingRelations;
|
|
53
|
+
}
|
|
54
|
+
exports.removeCustomFieldsWithEagerRelations = removeCustomFieldsWithEagerRelations;
|
|
55
|
+
//# sourceMappingURL=remove-custom-fields-with-eager-relations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-custom-fields-with-eager-relations.js","sourceRoot":"","sources":["../../src/connection/remove-custom-fields-with-eager-relations.ts"],"names":[],"mappings":";;;AAEA,2CAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,SAAgB,oCAAoC,CAChD,EAA2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122
122
|
*/
|
|
123
123
|
findOneInChannel<T extends ChannelAware & VendureEntity>(ctx: RequestContext, entity: Type<T>, id: ID, channelId: ID, options?: FindOneOptions): Promise<T | undefined>;
|
|
124
|
-
/**
|
|
125
|
-
* This is a work-around for this issue: https://github.com/vendure-ecommerce/vendure/issues/1664
|
|
126
|
-
*
|
|
127
|
-
* Explanation:
|
|
128
|
-
* When calling `FindOptionsUtils.joinEagerRelations()`, there appears to be a bug in TypeORM whereby
|
|
129
|
-
* it will throw the following error *if* the `options.relations` array contains any customField relations
|
|
130
|
-
* where the related entity itself has eagerly-loaded relations.
|
|
131
|
-
*
|
|
132
|
-
* For example, let's say we define a custom field on the Product entity like this:
|
|
133
|
-
* ```
|
|
134
|
-
* Product: [{
|
|
135
|
-
* name: 'featuredFacet',
|
|
136
|
-
* type: 'relation',
|
|
137
|
-
* entity: Facet,
|
|
138
|
-
* }],
|
|
139
|
-
* ```
|
|
140
|
-
* and then we pass into `TransactionalConnection.findOneInChannel()` an options array of:
|
|
141
|
-
*
|
|
142
|
-
* ```
|
|
143
|
-
* { relations: ['customFields.featuredFacet'] }
|
|
144
|
-
* ```
|
|
145
|
-
* it will throw an error because the `Facet` entity itself has eager relations (namely the `translations` property).
|
|
146
|
-
* This will cause TypeORM to throw the error:
|
|
147
|
-
* ```
|
|
148
|
-
* TypeORMError: "entity__customFields" alias was not found. Maybe you forgot to join it?
|
|
149
|
-
* ```
|
|
150
|
-
*
|
|
151
|
-
* So this method introspects the QueryBuilder metadata and checks for any custom field relations which
|
|
152
|
-
* themselves have eager relations. If found, it removes those items from the `options.relations` array.
|
|
153
|
-
*
|
|
154
|
-
* TODO: Ideally create a minimal reproduction case and report in the TypeORM repo for an upstream fix.
|
|
155
|
-
*/
|
|
156
|
-
private removeCustomFieldsWithEagerRelations;
|
|
157
124
|
/**
|
|
158
125
|
* @description
|
|
159
126
|
* Like the TypeOrm `Repository.findByIds()` method, but limits the results to
|
|
@@ -31,6 +31,7 @@ const request_context_1 = require("../api/common/request-context");
|
|
|
31
31
|
const constants_1 = require("../common/constants");
|
|
32
32
|
const errors_1 = require("../common/error/errors");
|
|
33
33
|
const index_1 = require("../config/index");
|
|
34
|
+
const remove_custom_fields_with_eager_relations_1 = require("./remove-custom-fields-with-eager-relations");
|
|
34
35
|
const transaction_wrapper_1 = require("./transaction-wrapper");
|
|
35
36
|
/**
|
|
36
37
|
* @description
|
|
@@ -180,10 +181,26 @@ let TransactionalConnection = class TransactionalConnection {
|
|
|
180
181
|
* the given Channel.
|
|
181
182
|
*/
|
|
182
183
|
findOneInChannel(ctx, entity, id, channelId, options = {}) {
|
|
183
|
-
|
|
184
|
-
options.relations =
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
let qb = this.getRepository(ctx, entity).createQueryBuilder('entity');
|
|
185
|
+
options.relations = remove_custom_fields_with_eager_relations_1.removeCustomFieldsWithEagerRelations(qb, options.relations);
|
|
186
|
+
let skipEagerRelations = false;
|
|
187
|
+
try {
|
|
188
|
+
typeorm_2.FindOptionsUtils.applyFindManyOptionsOrConditionsToQueryBuilder(qb, options);
|
|
189
|
+
}
|
|
190
|
+
catch (e) {
|
|
191
|
+
// https://github.com/vendure-ecommerce/vendure/issues/1664
|
|
192
|
+
// This is a failsafe to catch edge cases related to the TypeORM
|
|
193
|
+
// bug described in the doc block of `removeCustomFieldsWithEagerRelations`.
|
|
194
|
+
// In this case, a nested custom field relation has an eager-loaded relation,
|
|
195
|
+
// and is throwing an error. In this case we throw our hands up and say
|
|
196
|
+
// "sod it!", refuse to load _any_ relations at all, and rely on the
|
|
197
|
+
// GraphQL entity resolvers to take care of them.
|
|
198
|
+
index_1.Logger.debug(`TransactionalConnection.findOneInChannel ran into issues joining nested custom field relations. Running the query without joining any relations instead.`);
|
|
199
|
+
qb = this.getRepository(ctx, entity).createQueryBuilder('entity');
|
|
200
|
+
typeorm_2.FindOptionsUtils.applyFindManyOptionsOrConditionsToQueryBuilder(qb, Object.assign(Object.assign({}, options), { relations: [], loadEagerRelations: false }));
|
|
201
|
+
skipEagerRelations = true;
|
|
202
|
+
}
|
|
203
|
+
if (options.loadEagerRelations !== false && !skipEagerRelations) {
|
|
187
204
|
// tslint:disable-next-line:no-non-null-assertion
|
|
188
205
|
typeorm_2.FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias.metadata);
|
|
189
206
|
}
|
|
@@ -193,55 +210,6 @@ let TransactionalConnection = class TransactionalConnection {
|
|
|
193
210
|
.andWhere('channel.id = :channelId', { channelId })
|
|
194
211
|
.getOne();
|
|
195
212
|
}
|
|
196
|
-
/**
|
|
197
|
-
* This is a work-around for this issue: https://github.com/vendure-ecommerce/vendure/issues/1664
|
|
198
|
-
*
|
|
199
|
-
* Explanation:
|
|
200
|
-
* When calling `FindOptionsUtils.joinEagerRelations()`, there appears to be a bug in TypeORM whereby
|
|
201
|
-
* it will throw the following error *if* the `options.relations` array contains any customField relations
|
|
202
|
-
* where the related entity itself has eagerly-loaded relations.
|
|
203
|
-
*
|
|
204
|
-
* For example, let's say we define a custom field on the Product entity like this:
|
|
205
|
-
* ```
|
|
206
|
-
* Product: [{
|
|
207
|
-
* name: 'featuredFacet',
|
|
208
|
-
* type: 'relation',
|
|
209
|
-
* entity: Facet,
|
|
210
|
-
* }],
|
|
211
|
-
* ```
|
|
212
|
-
* and then we pass into `TransactionalConnection.findOneInChannel()` an options array of:
|
|
213
|
-
*
|
|
214
|
-
* ```
|
|
215
|
-
* { relations: ['customFields.featuredFacet'] }
|
|
216
|
-
* ```
|
|
217
|
-
* it will throw an error because the `Facet` entity itself has eager relations (namely the `translations` property).
|
|
218
|
-
* This will cause TypeORM to throw the error:
|
|
219
|
-
* ```
|
|
220
|
-
* TypeORMError: "entity__customFields" alias was not found. Maybe you forgot to join it?
|
|
221
|
-
* ```
|
|
222
|
-
*
|
|
223
|
-
* So this method introspects the QueryBuilder metadata and checks for any custom field relations which
|
|
224
|
-
* themselves have eager relations. If found, it removes those items from the `options.relations` array.
|
|
225
|
-
*
|
|
226
|
-
* TODO: Ideally create a minimal reproduction case and report in the TypeORM repo for an upstream fix.
|
|
227
|
-
*/
|
|
228
|
-
removeCustomFieldsWithEagerRelations(qb, relations = []) {
|
|
229
|
-
let resultingRelations = relations;
|
|
230
|
-
const mainAlias = qb.expressionMap.mainAlias;
|
|
231
|
-
const customFieldsMetadata = mainAlias === null || mainAlias === void 0 ? void 0 : mainAlias.metadata.embeddeds.find(metadata => metadata.propertyName === 'customFields');
|
|
232
|
-
if (customFieldsMetadata) {
|
|
233
|
-
const customFieldRelationsWithEagerRelations = customFieldsMetadata.relations.filter(relation => !!relation.inverseEntityMetadata.ownRelations.find(or => or.isEager === true));
|
|
234
|
-
for (const relation of customFieldRelationsWithEagerRelations) {
|
|
235
|
-
const propertyName = relation.propertyName;
|
|
236
|
-
const relationsToRemove = relations.filter(r => r.startsWith(`customFields.${propertyName}`));
|
|
237
|
-
if (relationsToRemove.length) {
|
|
238
|
-
index_1.Logger.debug(`TransactionalConnection.findOneInChannel cannot automatically join relation [${mainAlias === null || mainAlias === void 0 ? void 0 : mainAlias.metadata.name}.customFields.${propertyName}]`);
|
|
239
|
-
resultingRelations = relations.filter(r => !r.startsWith(`customFields.${propertyName}`));
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
return resultingRelations;
|
|
244
|
-
}
|
|
245
213
|
/**
|
|
246
214
|
* @description
|
|
247
215
|
* Like the TypeOrm `Repository.findByIds()` method, but limits the results to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactional-connection.js","sourceRoot":"","sources":["../../src/connection/transactional-connection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AAEnD,qCASiB;AAEjB,mEAA+D;AAC/D,mDAA8D;AAC9D,mDAA6D;AAE7D,2CAAyC;AAGzC,+DAA2D;AAG3D;;;;;;;;;;;GAWG;AAEH,IAAa,uBAAuB,GAApC,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AC9B,MAA4B,CAAC,SAAS,KAAK,IAAI;gBAChD,OAAO,CAAC,kBAAkB,KAAK,IAAI,CAAC,EAC1C;YACE,MAAM,IAAI,4BAAmB,CAAC,UAAU,CAAC,IAAW,EAAE,EAAE,CAAC,CAAC;SAC7D;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACH,gBAAgB,CACZ,GAAmB,EACnB,MAAe,EACf,EAAM,EACN,SAAa,EACb,UAA0B,EAAE;QAE5B,
|
|
1
|
+
{"version":3,"file":"transactional-connection.js","sourceRoot":"","sources":["../../src/connection/transactional-connection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AAEnD,qCASiB;AAEjB,mEAA+D;AAC/D,mDAA8D;AAC9D,mDAA6D;AAE7D,2CAAyC;AAGzC,2GAAmG;AACnG,+DAA2D;AAG3D;;;;;;;;;;;GAWG;AAEH,IAAa,uBAAuB,GAApC,MAAa,uBAAuB;IAChC,YACgC,UAAsB,EAC1C,kBAAsC;QADlB,eAAU,GAAV,UAAU,CAAY;QAC1C,uBAAkB,GAAlB,kBAAkB,CAAoB;IAC/C,CAAC;IAEJ;;;;;OAKG;IACH,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAqBD,aAAa,CACT,WAA4F,EAC5F,WAAgE;QAEhE,IAAI,WAAW,YAAY,gCAAc,EAAE;YACvC,MAAM,kBAAkB,GAAG,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;YACnE,IAAI,kBAAkB,EAAE;gBACpB,iDAAiD;gBACjD,OAAO,kBAAkB,CAAC,aAAa,CAAC,WAAY,CAAC,CAAC;aACzD;iBAAM;gBACH,iDAAiD;gBACjD,OAAO,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,WAAY,CAAC,CAAC;aACzD;SACJ;aAAM;YACH,iDAAiD;YACjD,OAAO,IAAI,CAAC,aAAa,C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8C,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC7E,IAAI,OAAO,CAAC,kBAAkB,KAAK,KAAK,EAAE;YACtC,iDAAiD;YACjD,0BAAgB,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,SAAU,CAAC,QAAQ,CAAC,CAAC;SAC3F;QACD,OAAO,EAAE;aACJ,QAAQ,CAAC,iBAAiB,EAAE,SAAS,CAAC;aACtC,QAAQ,CAAC,wBAAwB,EAAE,EAAE,GAAG,EAAE,CAAC;aAC3C,QAAQ,CAAC,yBAAyB,EAAE,EAAE,SAAS,EAAE,CAAC;aAClD,OAAO,EAAE,CAAC;IACnB,CAAC;IAEO,qBAAqB,CAAC,GAAmB;QAC7C,OAAQ,GAAW,CAAC,mCAAuB,CAAC,CAAC;IACjD,CAAC;CACJ,CAAA;AAzSY,uBAAuB;IADnC,mBAAU,EAAE;IAGJ,WAAA,0BAAgB,EAAE,CAAA;qCAAqB,oBAAU;QACtB,wCAAkB;GAHzC,uBAAuB,CAySnC;AAzSY,0DAAuB"}
|
|
@@ -8,9 +8,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var _a, _b;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.Asset = void 0;
|
|
13
14
|
const generated_types_1 = require("@vendure/common/lib/generated-types");
|
|
15
|
+
const shared_types_1 = require("@vendure/common/lib/shared-types");
|
|
14
16
|
const typeorm_1 = require("typeorm");
|
|
15
17
|
const base_entity_1 = require("../base/base.entity");
|
|
16
18
|
const channel_entity_1 = require("../channel/channel.entity");
|
|
@@ -34,7 +36,7 @@ __decorate([
|
|
|
34
36
|
], Asset.prototype, "name", void 0);
|
|
35
37
|
__decorate([
|
|
36
38
|
typeorm_1.Column('varchar'),
|
|
37
|
-
__metadata("design:type",
|
|
39
|
+
__metadata("design:type", typeof (_a = typeof generated_types_1.AssetType !== "undefined" && generated_types_1.AssetType) === "function" ? _a : Object)
|
|
38
40
|
], Asset.prototype, "type", void 0);
|
|
39
41
|
__decorate([
|
|
40
42
|
typeorm_1.Column(),
|
|
@@ -80,7 +82,7 @@ __decorate([
|
|
|
80
82
|
], Asset.prototype, "customFields", void 0);
|
|
81
83
|
Asset = __decorate([
|
|
82
84
|
typeorm_1.Entity(),
|
|
83
|
-
__metadata("design:paramtypes", [Object])
|
|
85
|
+
__metadata("design:paramtypes", [typeof (_b = typeof shared_types_1.DeepPartial !== "undefined" && shared_types_1.DeepPartial) === "function" ? _b : Object])
|
|
84
86
|
], Asset);
|
|
85
87
|
exports.Asset = Asset;
|
|
86
88
|
//# sourceMappingURL=asset.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.entity.js","sourceRoot":"","sources":["../../../src/entity/asset/asset.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asset.entity.js","sourceRoot":"","sources":["../../../src/entity/asset/asset.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yEAAgE;AAChE,mEAA+D;AAC/D,qCAAgE;AAIhE,qDAAoD;AACpD,8DAAoD;AACpD,kEAA4D;AAC5D,kDAAwC;AAExC;;;;;;GAMG;AAEH,IAAa,KAAK,GAAlB,MAAa,KAAM,SAAQ,2BAAa;IACpC,YAAY,KAA0B;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CA+BJ,CAAA;AA7Ba;IAAT,gBAAM,EAAE;;mCAAc;AAEJ;IAAlB,gBAAM,CAAC,SAAS,CAAC;kDAAO,2BAAS,oBAAT,2BAAS;mCAAC;AAEzB;IAAT,gBAAM,EAAE;;uCAAkB;AAEH;IAAvB,gBAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oCAAe;AAEd;IAAvB,gBAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qCAAgB;AAE7B;IAAT,gBAAM,EAAE;;uCAAkB;AAEjB;IAAT,gBAAM,EAAE;;qCAAgB;AAEf;IAAT,gBAAM,EAAE;;sCAAiB;AAG1B;IADC,gBAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACJ;AAItC;IAFC,oBAAU,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAG,CAAC;IACvB,mBAAS,EAAE;;mCACA;AAIZ;IAFC,oBAAU,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAO,CAAC;IAC3B,mBAAS,EAAE;;uCACQ;AAGpB;IADC,gBAAM,CAAC,IAAI,CAAC,EAAE,CAAC,wCAAiB,CAAC;8BACpB,wCAAiB;2CAAC;AAjCvB,KAAK;IADjB,gBAAM,EAAE;yDAEe,0BAAW,oBAAX,0BAAW;GADtB,KAAK,CAkCjB;AAlCY,sBAAK"}
|
|
@@ -8,8 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var _a;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.OrderableAsset = void 0;
|
|
14
|
+
const shared_types_1 = require("@vendure/common/lib/shared-types");
|
|
13
15
|
const typeorm_1 = require("typeorm");
|
|
14
16
|
const asset_entity_1 = require("../asset/asset.entity");
|
|
15
17
|
const base_entity_1 = require("../base/base.entity");
|
|
@@ -30,7 +32,7 @@ class OrderableAsset extends base_entity_1.VendureEntity {
|
|
|
30
32
|
}
|
|
31
33
|
__decorate([
|
|
32
34
|
typeorm_1.Column(),
|
|
33
|
-
__metadata("design:type", Object)
|
|
35
|
+
__metadata("design:type", typeof (_a = typeof shared_types_1.ID !== "undefined" && shared_types_1.ID) === "function" ? _a : Object)
|
|
34
36
|
], OrderableAsset.prototype, "assetId", void 0);
|
|
35
37
|
__decorate([
|
|
36
38
|
typeorm_1.ManyToOne(type => asset_entity_1.Asset, { eager: true, onDelete: 'CASCADE' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orderable-asset.entity.js","sourceRoot":"","sources":["../../../src/entity/asset/orderable-asset.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orderable-asset.entity.js","sourceRoot":"","sources":["../../../src/entity/asset/orderable-asset.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mEAAmE;AACnE,qCAA4C;AAG5C,wDAA8C;AAC9C,qDAAoD;AAEpD;;;;;;;;;GASG;AACH,MAAsB,cAAe,SAAQ,2BAAa;IACtD,YAAsB,KAAmC;QACrD,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CAUJ;AAPG;IADC,gBAAM,EAAE;kDACA,iBAAE,oBAAF,iBAAE;+CAAC;AAGZ;IADC,mBAAS,CAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACxD,oBAAK;6CAAC;AAGb;IADC,gBAAM,EAAE;;gDACQ;AAZrB,wCAaC"}
|
|
@@ -8,8 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var _a;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.ExternalAuthenticationMethod = void 0;
|
|
14
|
+
const shared_types_1 = require("@vendure/common/lib/shared-types");
|
|
13
15
|
const typeorm_1 = require("typeorm");
|
|
14
16
|
const authentication_method_entity_1 = require("./authentication-method.entity");
|
|
15
17
|
/**
|
|
@@ -39,7 +41,7 @@ __decorate([
|
|
|
39
41
|
], ExternalAuthenticationMethod.prototype, "metadata", void 0);
|
|
40
42
|
ExternalAuthenticationMethod = __decorate([
|
|
41
43
|
typeorm_1.ChildEntity(),
|
|
42
|
-
__metadata("design:paramtypes", [Object])
|
|
44
|
+
__metadata("design:paramtypes", [typeof (_a = typeof shared_types_1.DeepPartial !== "undefined" && shared_types_1.DeepPartial) === "function" ? _a : Object])
|
|
43
45
|
], ExternalAuthenticationMethod);
|
|
44
46
|
exports.ExternalAuthenticationMethod = ExternalAuthenticationMethod;
|
|
45
47
|
//# sourceMappingURL=external-authentication-method.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-authentication-method.entity.js","sourceRoot":"","sources":["../../../src/entity/authentication-method/external-authentication-method.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"external-authentication-method.entity.js","sourceRoot":"","sources":["../../../src/entity/authentication-method/external-authentication-method.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mEAA+D;AAC/D,qCAA8C;AAE9C,iFAAsE;AAEtE;;;;;;;GAOG;AAEH,IAAa,4BAA4B,GAAzC,MAAa,4BAA6B,SAAQ,mDAAoB;IAClE,YAAY,KAAgD;QACxD,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CAUJ,CAAA;AAPG;IADC,gBAAM,EAAE;;8DACQ;AAGjB;IADC,gBAAM,EAAE;;wEACkB;AAG3B;IADC,gBAAM,CAAC,aAAa,CAAC;;8DACR;AAZL,4BAA4B;IADxC,qBAAW,EAAE;yDAES,0BAAW,oBAAX,0BAAW;GADrB,4BAA4B,CAaxC;AAbY,oEAA4B"}
|
|
@@ -8,8 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var _a;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.NativeAuthenticationMethod = void 0;
|
|
14
|
+
const shared_types_1 = require("@vendure/common/lib/shared-types");
|
|
13
15
|
const typeorm_1 = require("typeorm");
|
|
14
16
|
const authentication_method_entity_1 = require("./authentication-method.entity");
|
|
15
17
|
/**
|
|
@@ -51,7 +53,7 @@ __decorate([
|
|
|
51
53
|
], NativeAuthenticationMethod.prototype, "pendingIdentifier", void 0);
|
|
52
54
|
NativeAuthenticationMethod = __decorate([
|
|
53
55
|
typeorm_1.ChildEntity(),
|
|
54
|
-
__metadata("design:paramtypes", [Object])
|
|
56
|
+
__metadata("design:paramtypes", [typeof (_a = typeof shared_types_1.DeepPartial !== "undefined" && shared_types_1.DeepPartial) === "function" ? _a : Object])
|
|
55
57
|
], NativeAuthenticationMethod);
|
|
56
58
|
exports.NativeAuthenticationMethod = NativeAuthenticationMethod;
|
|
57
59
|
//# sourceMappingURL=native-authentication-method.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-authentication-method.entity.js","sourceRoot":"","sources":["../../../src/entity/authentication-method/native-authentication-method.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native-authentication-method.entity.js","sourceRoot":"","sources":["../../../src/entity/authentication-method/native-authentication-method.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mEAA+D;AAC/D,qCAA8C;AAE9C,iFAAsE;AAEtE;;;;;;;GAOG;AAEH,IAAa,0BAA0B,GAAvC,MAAa,0BAA2B,SAAQ,mDAAoB;IAChE,YAAY,KAA+C;QACvD,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CA6BJ,CAAA;AA1BG;IADC,gBAAM,EAAE;;8DACU;AAEQ;IAA1B,gBAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;gEAAsB;AAGhD;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qEACX;AAGjC;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sEACV;AAQlC;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yEACP;AASrC;IADC,gBAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qEACX;AA/BxB,0BAA0B;IADtC,qBAAW,EAAE;yDAEU,0BAAW,oBAAX,0BAAW;GADtB,0BAA0B,CAgCtC;AAhCY,gEAA0B"}
|
|
@@ -8,9 +8,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var _a, _b, _c;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.Channel = void 0;
|
|
13
14
|
const generated_types_1 = require("@vendure/common/lib/generated-types");
|
|
15
|
+
const shared_types_1 = require("@vendure/common/lib/shared-types");
|
|
14
16
|
const typeorm_1 = require("typeorm");
|
|
15
17
|
const base_entity_1 = require("../base/base.entity");
|
|
16
18
|
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
@@ -44,7 +46,7 @@ __decorate([
|
|
|
44
46
|
], Channel.prototype, "token", void 0);
|
|
45
47
|
__decorate([
|
|
46
48
|
typeorm_1.Column('varchar'),
|
|
47
|
-
__metadata("design:type",
|
|
49
|
+
__metadata("design:type", typeof (_a = typeof generated_types_1.LanguageCode !== "undefined" && generated_types_1.LanguageCode) === "function" ? _a : Object)
|
|
48
50
|
], Channel.prototype, "defaultLanguageCode", void 0);
|
|
49
51
|
__decorate([
|
|
50
52
|
typeorm_1.ManyToOne(type => zone_entity_1.Zone),
|
|
@@ -56,7 +58,7 @@ __decorate([
|
|
|
56
58
|
], Channel.prototype, "defaultShippingZone", void 0);
|
|
57
59
|
__decorate([
|
|
58
60
|
typeorm_1.Column('varchar'),
|
|
59
|
-
__metadata("design:type",
|
|
61
|
+
__metadata("design:type", typeof (_b = typeof generated_types_1.CurrencyCode !== "undefined" && generated_types_1.CurrencyCode) === "function" ? _b : Object)
|
|
60
62
|
], Channel.prototype, "currencyCode", void 0);
|
|
61
63
|
__decorate([
|
|
62
64
|
typeorm_1.Column(type => custom_entity_fields_1.CustomChannelFields),
|
|
@@ -68,7 +70,7 @@ __decorate([
|
|
|
68
70
|
], Channel.prototype, "pricesIncludeTax", void 0);
|
|
69
71
|
Channel = __decorate([
|
|
70
72
|
typeorm_1.Entity(),
|
|
71
|
-
__metadata("design:paramtypes", [Object])
|
|
73
|
+
__metadata("design:paramtypes", [typeof (_c = typeof shared_types_1.DeepPartial !== "undefined" && shared_types_1.DeepPartial) === "function" ? _c : Object])
|
|
72
74
|
], Channel);
|
|
73
75
|
exports.Channel = Channel;
|
|
74
76
|
//# sourceMappingURL=channel.entity.js.map
|