@vendure/core 2.0.0-beta.0 → 2.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/dist/api/config/generate-resolvers.d.ts +7 -0
- package/dist/api/config/generate-resolvers.js +18 -1
- package/dist/api/config/generate-resolvers.js.map +1 -1
- package/dist/api/config/get-custom-fields-config-without-interfaces.d.ts +8 -0
- package/dist/api/config/get-custom-fields-config-without-interfaces.js +29 -0
- package/dist/api/config/get-custom-fields-config-without-interfaces.js.map +1 -0
- package/dist/api/config/graphql-custom-fields.js +4 -2
- package/dist/api/config/graphql-custom-fields.js.map +1 -1
- package/dist/api/decorators/transaction.decorator.d.ts +13 -1
- package/dist/api/decorators/transaction.decorator.js +4 -3
- package/dist/api/decorators/transaction.decorator.js.map +1 -1
- package/dist/api/middleware/transaction-interceptor.js +2 -1
- package/dist/api/middleware/transaction-interceptor.js.map +1 -1
- package/dist/api/resolvers/admin/country.resolver.d.ts +1 -1
- package/dist/api/resolvers/admin/country.resolver.js +1 -1
- package/dist/api/resolvers/admin/country.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/country-entity.resolver.d.ts +1 -1
- package/dist/api/resolvers/entity/country-entity.resolver.js +1 -1
- package/dist/api/resolvers/entity/country-entity.resolver.js.map +1 -1
- package/dist/api/resolvers/entity/zone-entity.resolver.d.ts +1 -1
- package/dist/api/schema/admin-api/province.api.graphql +37 -0
- package/dist/api/schema/common/region.type.graphql +59 -0
- package/dist/api/schema/common/zone.type.graphql +2 -1
- package/dist/bootstrap.js +21 -9
- package/dist/bootstrap.js.map +1 -1
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/index.js.map +1 -1
- package/dist/common/round-money.d.ts +7 -0
- package/dist/common/round-money.js +7 -0
- package/dist/common/round-money.js.map +1 -1
- package/dist/config/custom-field/custom-field-types.d.ts +1 -1
- package/dist/config/default-config.js +1 -1
- package/dist/config/default-config.js.map +1 -1
- package/dist/config/order/order-item-price-calculation-strategy.d.ts +12 -3
- package/dist/connection/transaction-wrapper.d.ts +2 -2
- package/dist/connection/transaction-wrapper.js +4 -4
- package/dist/connection/transaction-wrapper.js.map +1 -1
- package/dist/connection/transactional-connection.d.ts +2 -1
- package/dist/connection/transactional-connection.js +3 -3
- package/dist/connection/transactional-connection.js.map +1 -1
- package/dist/entity/address/address.entity.d.ts +1 -1
- package/dist/entity/address/address.entity.js +1 -1
- package/dist/entity/address/address.entity.js.map +1 -1
- package/dist/entity/custom-entity-fields.d.ts +4 -4
- package/dist/entity/custom-entity-fields.js +7 -7
- package/dist/entity/custom-entity-fields.js.map +1 -1
- package/dist/entity/entities.d.ts +7 -3
- package/dist/entity/entities.js +7 -3
- package/dist/entity/entities.js.map +1 -1
- package/dist/entity/index.d.ts +1 -2
- package/dist/entity/index.js +1 -2
- package/dist/entity/index.js.map +1 -1
- package/dist/entity/payment-method/payment-method-translation.entity.js +6 -1
- package/dist/entity/payment-method/payment-method-translation.entity.js.map +1 -1
- package/dist/entity/promotion/promotion-translation.entity.js +6 -1
- package/dist/entity/promotion/promotion-translation.entity.js.map +1 -1
- package/dist/entity/region/country.entity.d.ts +14 -0
- package/dist/entity/{country → region}/country.entity.js +4 -21
- package/dist/entity/region/country.entity.js.map +1 -0
- package/dist/entity/region/province.entity.d.ts +13 -0
- package/dist/entity/region/province.entity.js +33 -0
- package/dist/entity/region/province.entity.js.map +1 -0
- package/dist/entity/{country/country-translation.entity.d.ts → region/region-translation.entity.d.ts} +6 -6
- package/dist/entity/{country/country-translation.entity.js → region/region-translation.entity.js} +15 -15
- package/dist/entity/region/region-translation.entity.js.map +1 -0
- package/dist/entity/region/region.entity.d.ts +30 -0
- package/dist/entity/region/region.entity.js +62 -0
- package/dist/entity/region/region.entity.js.map +1 -0
- package/dist/entity/register-custom-entity-fields.js +2 -2
- package/dist/entity/register-custom-entity-fields.js.map +1 -1
- package/dist/entity/zone/zone.entity.d.ts +2 -2
- package/dist/entity/zone/zone.entity.js +2 -2
- package/dist/entity/zone/zone.entity.js.map +1 -1
- package/dist/i18n/i18n.service.js +1 -0
- package/dist/i18n/i18n.service.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin/default-job-queue-plugin/default-job-queue-plugin.js +1 -0
- package/dist/plugin/default-job-queue-plugin/default-job-queue-plugin.js.map +1 -1
- package/dist/plugin/default-search-plugin/default-search-plugin.js +1 -0
- package/dist/plugin/default-search-plugin/default-search-plugin.js.map +1 -1
- package/dist/plugin/plugin-metadata.d.ts +2 -1
- package/dist/plugin/plugin-metadata.js +5 -4
- package/dist/plugin/plugin-metadata.js.map +1 -1
- package/dist/plugin/vendure-plugin.d.ts +19 -0
- package/dist/plugin/vendure-plugin.js.map +1 -1
- package/dist/service/helpers/utils/translate-entity.js +1 -1
- package/dist/service/helpers/utils/translate-entity.js.map +1 -1
- package/dist/service/services/channel.service.js +3 -0
- package/dist/service/services/channel.service.js.map +1 -1
- package/dist/service/services/country.service.d.ts +1 -1
- package/dist/service/services/country.service.js +4 -4
- package/dist/service/services/country.service.js.map +1 -1
- package/dist/service/services/order-testing.service.js +1 -1
- package/dist/service/services/order-testing.service.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/zone.service.js +1 -1
- package/dist/service/services/zone.service.js.map +1 -1
- package/dist/version.d.ts +16 -0
- package/dist/version.js +21 -0
- package/dist/version.js.map +1 -0
- package/package.json +5 -4
- package/dist/api/schema/common/country.type.graphql +0 -23
- package/dist/entity/country/country-translation.entity.js.map +0 -1
- package/dist/entity/country/country.entity.d.ts +0 -21
- package/dist/entity/country/country.entity.js.map +0 -1
package/dist/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA4D;AAC5D,+DAA6C;AAC7C,gDAA8B;AAC9B,iDAA+B;AAC/B,uDAAqC;AACrC,yEAAuD;AACvD,6CAA2B;AAC3B,0DAAwC;AACxC,8CAA4B;AAC5B,0DAAwC;AACxC,uDAAqC;AACrC,gEAA8C;AAC9C,8DAA4C;AAC5C,uDAAqC;AACrC,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA4D;AAC5D,+DAA6C;AAC7C,gDAA8B;AAC9B,iDAA+B;AAC/B,uDAAqC;AACrC,yEAAuD;AACvD,6CAA2B;AAC3B,0DAAwC;AACxC,8CAA4B;AAC5B,0DAAwC;AACxC,gDAA8B;AAC9B,uDAAqC;AACrC,gEAA8C;AAC9C,8DAA4C;AAC5C,uDAAqC;AACrC,0CAAwB"}
|
|
@@ -3,6 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.roundMoney = void 0;
|
|
4
4
|
const config_helpers_1 = require("../config/config-helpers");
|
|
5
5
|
let moneyStrategy;
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* Rounds a monetary value according to the configured {@link MoneyStrategy}.
|
|
9
|
+
*
|
|
10
|
+
* @docsCategory money
|
|
11
|
+
* @since 2.0.0
|
|
12
|
+
*/
|
|
6
13
|
function roundMoney(value, quantity = 1) {
|
|
7
14
|
if (!moneyStrategy) {
|
|
8
15
|
moneyStrategy = (0, config_helpers_1.getConfig)().entityOptions.moneyStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"round-money.js","sourceRoot":"","sources":["../../src/common/round-money.ts"],"names":[],"mappings":";;;AAAA,6DAAqD;AAGrD,IAAI,aAA4B,CAAC;AAEjC,SAAgB,UAAU,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC;IAClD,IAAI,CAAC,aAAa,EAAE;QAChB,aAAa,GAAG,IAAA,0BAAS,GAAE,CAAC,aAAa,CAAC,aAAa,CAAC;KAC3D;IACD,OAAO,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAChD,CAAC;AALD,gCAKC"}
|
|
1
|
+
{"version":3,"file":"round-money.js","sourceRoot":"","sources":["../../src/common/round-money.ts"],"names":[],"mappings":";;;AAAA,6DAAqD;AAGrD,IAAI,aAA4B,CAAC;AAEjC;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC;IAClD,IAAI,CAAC,aAAa,EAAE;QAChB,aAAa,GAAG,IAAA,0BAAS,GAAE,CAAC,aAAa,CAAC,aAAa,CAAC;KAC3D;IACD,OAAO,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAChD,CAAC;AALD,gCAKC"}
|
|
@@ -145,7 +145,6 @@ export interface CustomFields {
|
|
|
145
145
|
Asset?: CustomFieldConfig[];
|
|
146
146
|
Channel?: CustomFieldConfig[];
|
|
147
147
|
Collection?: CustomFieldConfig[];
|
|
148
|
-
Country?: CustomFieldConfig[];
|
|
149
148
|
Customer?: CustomFieldConfig[];
|
|
150
149
|
CustomerGroup?: CustomFieldConfig[];
|
|
151
150
|
Facet?: CustomFieldConfig[];
|
|
@@ -160,6 +159,7 @@ export interface CustomFields {
|
|
|
160
159
|
ProductOptionGroup?: CustomFieldConfig[];
|
|
161
160
|
ProductVariant?: CustomFieldConfig[];
|
|
162
161
|
Promotion?: CustomFieldConfig[];
|
|
162
|
+
Region?: CustomFieldConfig[];
|
|
163
163
|
Seller?: CustomFieldConfig[];
|
|
164
164
|
ShippingMethod?: CustomFieldConfig[];
|
|
165
165
|
StockLocation?: CustomFieldConfig[];
|
|
@@ -179,7 +179,6 @@ exports.defaultConfig = {
|
|
|
179
179
|
Asset: [],
|
|
180
180
|
Channel: [],
|
|
181
181
|
Collection: [],
|
|
182
|
-
Country: [],
|
|
183
182
|
Customer: [],
|
|
184
183
|
CustomerGroup: [],
|
|
185
184
|
Facet: [],
|
|
@@ -194,6 +193,7 @@ exports.defaultConfig = {
|
|
|
194
193
|
ProductOptionGroup: [],
|
|
195
194
|
ProductVariant: [],
|
|
196
195
|
Promotion: [],
|
|
196
|
+
Region: [],
|
|
197
197
|
Seller: [],
|
|
198
198
|
ShippingMethod: [],
|
|
199
199
|
StockLocation: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-config.js","sourceRoot":"","sources":["../../src/config/default-config.ts"],"names":[],"mappings":";;;AAAA,yEAAmE;AACnE,2EAI8C;AAE9C,iGAA2F;AAC3F,4FAAqF;AACrF,yHAAiH;AAEjH,yGAAmG;AACnG,yGAAmG;AACnG,kGAA4F;AAC5F,kGAA4F;AAC5F,8FAAwF;AACxF,sGAAgG;AAChG,0FAAqF;AACrF,qFAAgF;AAChF,qIAA6H;AAC7H,iIAAyH;AACzH,6FAAuF;AACvF,+FAAyF;AACzF,oFAA8E;AAC9E,4EAAuE;AACvE,2FAAsF;AACtF,yFAAoF;AACpF,4DAAwD;AACxD,yFAAmF;AACnF,6GAAsG;AACtG,6FAAuF;AACvF,yHAAiH;AACjH,yFAAmF;AACnF,yEAAoE;AACpE,yFAAmF;AACnF,iGAA2F;AAC3F,yEAAoE;AACpE,yFAAyF;AACzF,qEAAuE;AACvE,mEAA8D;AAC9D,+EAA0E;AAC1E,2CAAkF;AAClF,uGAAgG;AAChG,+FAA0F;AAC1F,iHAA2G;AAC3G,2HAAoH;AACpH,uGAAgG;AAChG,+EAAyE;AAGzE;;;;;GAKG;AACU,QAAA,aAAa,GAAyB;IAC/C,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,8BAAY,CAAC,EAAE;IACpC,MAAM,EAAE,IAAI,8BAAa,EAAE;IAC3B,UAAU,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,WAAW;QACzB,kBAAkB,EAAE,KAAK;Q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AiB,EAAE,IAAI,8CAAwB,EAAE;QACjD,yBAAyB,EAAE,IAAI,gEAAgC,CAAC,IAAI,CAAC;QACrE,4BAA4B,EAAE,IAAI,6EAAmC,EAAE;QACvE,mBAAmB,EAAE,IAAI,0DAA0B,EAAE;QACrD,mBAAmB,EAAE,IAAI,0DAA0B,EAAE;QACrD,mBAAmB,EAAE,IAAI,0DAA0B,EAAE;QACrD,qBAAqB,EAAE,IAAI,8DAA4B,EAAE;KAC5D;IACD,cAAc,EAAE;QACZ,gCAAgC,EAAE,EAAE;QACpC,qBAAqB,EAAE,EAAE;QACzB,oBAAoB,EAAE,EAAE;QACxB,OAAO,EAAE,CAAC,+CAAqB,CAAC;KACnC;IACD,UAAU,EAAE;QACR,eAAe,EAAE,IAAI,kDAAsB,EAAE;QAC7C,0BAA0B,EAAE,IAAI,yEAAiC,EAAE;KACtE;IACD,mBAAmB,EAAE;QACjB,eAAe,EAAE,SAAS;QAC1B,mBAAmB,EAAE,IAAI,0DAA0B,EAAE;KACxD;IACD,eAAe,EAAE;QACb,gBAAgB,EAAE,IAAI,uDAAwB,EAAE;QAChD,wBAAwB,EAAE,IAAI,wEAAgC,EAAE;QAChE,YAAY,EAAE,EAAE;QAChB,uBAAuB,EAAE,KAAK;QAC9B,MAAM,EAAE,EAAE;KACb;IACD,YAAY,EAAE;QACV,OAAO,EAAE,EAAE;QACX,aAAa,EAAE,EAAE;QACjB,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,EAAE;QACd,
|
|
1
|
+
{"version":3,"file":"default-config.js","sourceRoot":"","sources":["../../src/config/default-config.ts"],"names":[],"mappings":";;;AAAA,yEAAmE;AACnE,2EAI8C;AAE9C,iGAA2F;AAC3F,4FAAqF;AACrF,yHAAiH;AAEjH,yGAAmG;AACnG,yGAAmG;AACnG,kGAA4F;AAC5F,kGAA4F;AAC5F,8FAAwF;AACxF,sGAAgG;AAChG,0FAAqF;AACrF,qFAAgF;AAChF,qIAA6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EAAE;QACjB,eAAe,EAAE,SAAS;QAC1B,mBAAmB,EAAE,IAAI,0DAA0B,EAAE;KACxD;IACD,eAAe,EAAE;QACb,gBAAgB,EAAE,IAAI,uDAAwB,EAAE;QAChD,wBAAwB,EAAE,IAAI,wEAAgC,EAAE;QAChE,YAAY,EAAE,EAAE;QAChB,uBAAuB,EAAE,KAAK;QAC9B,MAAM,EAAE,EAAE;KACb;IACD,YAAY,EAAE;QACV,OAAO,EAAE,EAAE;QACX,aAAa,EAAE,EAAE;QACjB,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,aAAa,EAAE,EAAE;QACjB,KAAK,EAAE,EAAE;QACT,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,EAAE;QAClB,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,EAAE;QACb,aAAa,EAAE,EAAE;QACjB,OAAO,EAAE,EAAE;QACX,aAAa,EAAE,EAAE;QACjB,kBAAkB,EAAE,EAAE;QACtB,cAAc,EAAE,EAAE;QAClB,SAAS,EAAE,EAAE;QACb,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,EAAE;QACV,cAAc,EAAE,EAAE;QAClB,aAAa,EAAE,EAAE;QACjB,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;KACX;IACD,OAAO,EAAE,EAAE;IACX,aAAa,EAAE;QACX,YAAY,EAAE,CAAC,IAAI,0DAA0B,EAAE,CAAC;KACnD;CACJ,CAAC"}
|
|
@@ -17,9 +17,13 @@ import { ProductVariant } from '../../entity/product-variant/product-variant.ent
|
|
|
17
17
|
* ### OrderItemPriceCalculationStrategy vs Promotions
|
|
18
18
|
* Both the OrderItemPriceCalculationStrategy and Promotions can be used to alter the price paid for a product.
|
|
19
19
|
*
|
|
20
|
+
* The main difference is when a Promotion is applied, it adds a `discount` line to the Order, and the regular
|
|
21
|
+
* price is used for the value of `OrderLine.listPrice` property, whereas
|
|
22
|
+
* the OrderItemPriceCalculationStrategy actually alters the value of `OrderLine.listPrice` itself, and does not
|
|
23
|
+
* add any discounts to the Order.
|
|
24
|
+
*
|
|
20
25
|
* Use OrderItemPriceCalculationStrategy if:
|
|
21
26
|
*
|
|
22
|
-
* * The price is not dependent on quantity or on the other contents of the Order.
|
|
23
27
|
* * The price calculation is based on the properties of the ProductVariant and any CustomFields
|
|
24
28
|
* specified on the OrderLine, for example via a product configurator.
|
|
25
29
|
* * The logic is a permanent part of your business requirements.
|
|
@@ -40,6 +44,8 @@ import { ProductVariant } from '../../entity/product-variant/product-variant.ent
|
|
|
40
44
|
* a gift-wrapping surcharge would be added to the price.
|
|
41
45
|
* * A product-configurator where e.g. various finishes, colors, and materials can be selected and stored
|
|
42
46
|
* as OrderLine custom fields (see [Customizing models](/docs/developer-guide/customizing-models/#configurable-order-products).
|
|
47
|
+
* * Price lists or bulk pricing, where different price bands are stored e.g. in a customField on the ProductVariant, and this
|
|
48
|
+
* is used to calculate the price based on the current quantity.
|
|
43
49
|
*
|
|
44
50
|
* @docsCategory Orders
|
|
45
51
|
*/
|
|
@@ -50,9 +56,12 @@ export interface OrderItemPriceCalculationStrategy extends InjectableStrategy {
|
|
|
50
56
|
* the price for a single unit.
|
|
51
57
|
*
|
|
52
58
|
* Note: if you have any `relation` type custom fields defined on the OrderLine entity, they will only be
|
|
53
|
-
* passed in to this method if they are set to `eager: true`.
|
|
59
|
+
* passed in to this method if they are set to `eager: true`. Otherwise, you can use the {@link EntityHydrator}
|
|
60
|
+
* to join the missing relations.
|
|
61
|
+
*
|
|
62
|
+
* Note: the `quantity` argument was added in v2.0.0
|
|
54
63
|
*/
|
|
55
64
|
calculateUnitPrice(ctx: RequestContext, productVariant: ProductVariant, orderLineCustomFields: {
|
|
56
65
|
[key: string]: any;
|
|
57
|
-
}, order: Order): PriceCalculationResult | Promise<PriceCalculationResult>;
|
|
66
|
+
}, order: Order, quantity: number): PriceCalculationResult | Promise<PriceCalculationResult>;
|
|
58
67
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { Connection } from 'typeorm';
|
|
3
3
|
import { RequestContext } from '../api/common/request-context';
|
|
4
|
-
import { TransactionMode } from '../api/decorators/transaction.decorator';
|
|
4
|
+
import { TransactionIsolationLevel, TransactionMode } from '../api/decorators/transaction.decorator';
|
|
5
5
|
/**
|
|
6
6
|
* @description
|
|
7
7
|
* This helper class is used to wrap operations in a TypeORM transaction in order to ensure
|
|
@@ -18,7 +18,7 @@ export declare class TransactionWrapper {
|
|
|
18
18
|
* This function does not mutate your context. Instead, this function makes a copy and passes
|
|
19
19
|
* context to work function.
|
|
20
20
|
*/
|
|
21
|
-
executeInTransaction<T>(originalCtx: RequestContext, work: (ctx: RequestContext) => Observable<T> | Promise<T>, mode: TransactionMode, connection: Connection): Promise<T>;
|
|
21
|
+
executeInTransaction<T>(originalCtx: RequestContext, work: (ctx: RequestContext) => Observable<T> | Promise<T>, mode: TransactionMode, isolationLevel: TransactionIsolationLevel | undefined, connection: Connection): Promise<T>;
|
|
22
22
|
/**
|
|
23
23
|
* Attempts to start a DB transaction, with retry logic in the case that a transaction
|
|
24
24
|
* is already started for the connection (which is mainly a problem with SQLite/Sql.js)
|
|
@@ -21,13 +21,13 @@ class TransactionWrapper {
|
|
|
21
21
|
* This function does not mutate your context. Instead, this function makes a copy and passes
|
|
22
22
|
* context to work function.
|
|
23
23
|
*/
|
|
24
|
-
async executeInTransaction(originalCtx, work, mode, connection) {
|
|
24
|
+
async executeInTransaction(originalCtx, work, mode, isolationLevel, connection) {
|
|
25
25
|
// Copy to make sure original context will remain valid after transaction completes
|
|
26
26
|
const ctx = originalCtx.copy();
|
|
27
27
|
const entityManager = ctx[constants_1.TRANSACTION_MANAGER_KEY];
|
|
28
28
|
const queryRunner = (entityManager === null || entityManager === void 0 ? void 0 : entityManager.queryRunner) || connection.createQueryRunner();
|
|
29
29
|
if (mode === 'auto') {
|
|
30
|
-
await this.startTransaction(queryRunner);
|
|
30
|
+
await this.startTransaction(queryRunner, isolationLevel);
|
|
31
31
|
}
|
|
32
32
|
ctx[constants_1.TRANSACTION_MANAGER_KEY] = queryRunner.manager;
|
|
33
33
|
try {
|
|
@@ -61,14 +61,14 @@ class TransactionWrapper {
|
|
|
61
61
|
* Attempts to start a DB transaction, with retry logic in the case that a transaction
|
|
62
62
|
* is already started for the connection (which is mainly a problem with SQLite/Sql.js)
|
|
63
63
|
*/
|
|
64
|
-
async startTransaction(queryRunner) {
|
|
64
|
+
async startTransaction(queryRunner, isolationLevel) {
|
|
65
65
|
const maxRetries = 25;
|
|
66
66
|
let attempts = 0;
|
|
67
67
|
let lastError;
|
|
68
68
|
// Returns false if a transaction is already in progress
|
|
69
69
|
async function attemptStartTransaction() {
|
|
70
70
|
try {
|
|
71
|
-
await queryRunner.startTransaction();
|
|
71
|
+
await queryRunner.startTransaction(isolationLevel);
|
|
72
72
|
return true;
|
|
73
73
|
}
|
|
74
74
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-wrapper.js","sourceRoot":"","sources":["../../src/connection/transaction-wrapper.ts"],"names":[],"mappings":";;;AAAA,+BAA2D;AAC3D,8CAAsD;AAEtD,iGAA8F;AAI9F,mDAA8D;AAE9D;;;;GAIG;AACH,MAAa,kBAAkB;IAC3B;;;;;;;;;OASG;IACH,KAAK,CAAC,oBAAoB,CACtB,WAA2B,EAC3B,IAAyD,EACzD,IAAqB,EACrB,UAAsB;QAEtB,mFAAmF;QACnF,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;QAE/B,MAAM,aAAa,GAA+B,GAAW,CAAC,mCAAuB,CAAC,CAAC;QACvF,MAAM,WAAW,GAAG,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,
|
|
1
|
+
{"version":3,"file":"transaction-wr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KAAK,kBAAkB,CAAC;QACtD,MAAM,gBAAgB,GAAG,GAAG,CAAC,IAAI,KAAK,mBAAmB,CAAC;QAC1D,OAAO,aAAa,IAAI,gBAAgB,CAAC;IAC7C,CAAC;CACJ;AA9GD,gDA8GC"}
|
|
@@ -6,6 +6,7 @@ import { ChannelAware } from '../common/types/common-types';
|
|
|
6
6
|
import { VendureEntity } from '../entity/base/base.entity';
|
|
7
7
|
import { TransactionWrapper } from './transaction-wrapper';
|
|
8
8
|
import { GetEntityOrThrowOptions } from './types';
|
|
9
|
+
import { TransactionIsolationLevel } from '../api/decorators/transaction.decorator';
|
|
9
10
|
/**
|
|
10
11
|
* @description
|
|
11
12
|
* The TransactionalConnection is a wrapper around the TypeORM `Connection` object which works in conjunction
|
|
@@ -93,7 +94,7 @@ export declare class TransactionalConnection {
|
|
|
93
94
|
* Manually start a transaction if one is not already in progress. This method should be used in
|
|
94
95
|
* conjunction with the `'manual'` mode of the {@link Transaction} decorator.
|
|
95
96
|
*/
|
|
96
|
-
startTransaction(ctx: RequestContext): Promise<void>;
|
|
97
|
+
startTransaction(ctx: RequestContext, isolationLevel?: TransactionIsolationLevel): Promise<void>;
|
|
97
98
|
/**
|
|
98
99
|
* @description
|
|
99
100
|
* Manually commits any open transaction. Should be very rarely needed, since the {@link Transaction} decorator
|
|
@@ -86,18 +86,18 @@ let TransactionalConnection = class TransactionalConnection {
|
|
|
86
86
|
ctx = request_context_1.RequestContext.empty();
|
|
87
87
|
work = ctxOrWork;
|
|
88
88
|
}
|
|
89
|
-
return this.transactionWrapper.executeInTransaction(ctx, work, 'auto', this.rawConnection);
|
|
89
|
+
return this.transactionWrapper.executeInTransaction(ctx, work, 'auto', undefined, this.rawConnection);
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* @description
|
|
93
93
|
* Manually start a transaction if one is not already in progress. This method should be used in
|
|
94
94
|
* conjunction with the `'manual'` mode of the {@link Transaction} decorator.
|
|
95
95
|
*/
|
|
96
|
-
async startTransaction(ctx) {
|
|
96
|
+
async startTransaction(ctx, isolationLevel) {
|
|
97
97
|
var _a;
|
|
98
98
|
const transactionManager = this.getTransactionManager(ctx);
|
|
99
99
|
if (((_a = transactionManager === null || transactionManager === void 0 ? void 0 : transactionManager.queryRunner) === null || _a === void 0 ? void 0 : _a.isTransactionActive) === false) {
|
|
100
|
-
await transactionManager.queryRunner.startTransaction();
|
|
100
|
+
await transactionManager.queryRunner.startTransaction(isolationLevel);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactional-connection.js","sourceRoot":"","sources":["../../src/connection/transactional-connection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AAEnD,qCASiB;AAGjB,mEAA+D;AAC/D,mDAA8D;AAC9D,mDAA6D;AAI7D,+DAA2D;
|
|
1
|
+
{"version":3,"file":"transactional-connection.js","sourceRoot":"","sources":["../../src/connection/transactional-connection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AAEnD,qCASiB;AAGjB,mEAA+D;AAC/D,mDAA8D;AAC9D,mDAA6D;AAI7D,+DAA2D;AAI3D;;;;;;;;;;;GAWG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAChC,YACgC,UAAsB,EAC1C,kBAAsC;QADlB,eAAU,GAAV,UAAU,CAAY;QAC1C,uBAAkB,GAAlB,kBAAkB,CAAoB;IAC9C,CAAC;IAEL;;;;;OAKG;IACH,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAuBD,aAAa,CACT,WAA4F,EAC5F,WAAgE;QAEhE,IAAI,WAAW,YAAY,gCAAc,EAAE;YACvC,MAAM,kBAAkB,GAAG,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;YACnE,IAAI,kBA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,EAAE;YACtC,oEAAoE;YACpE,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;AA5RY,uBAAuB;IADnC,IAAA,mBAAU,GAAE;IAGJ,WAAA,IAAA,0BAAgB,GAAE,CAAA;qCAAqB,oBAAU;QACtB,wCAAkB;GAHzC,uBAAuB,CA4RnC;AA5RY,0DAAuB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DeepPartial } from '@vendure/common/lib/shared-types';
|
|
2
2
|
import { HasCustomFields } from '../../config/custom-field/custom-field-types';
|
|
3
3
|
import { VendureEntity } from '../base/base.entity';
|
|
4
|
-
import { Country } from '../country/country.entity';
|
|
5
4
|
import { CustomAddressFields } from '../custom-entity-fields';
|
|
6
5
|
import { Customer } from '../customer/customer.entity';
|
|
6
|
+
import { Country } from '../region/country.entity';
|
|
7
7
|
/**
|
|
8
8
|
* @description
|
|
9
9
|
* Represents a {@link Customer}'s address.
|
|
@@ -12,9 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.Address = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const base_entity_1 = require("../base/base.entity");
|
|
15
|
-
const country_entity_1 = require("../country/country.entity");
|
|
16
15
|
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
17
16
|
const customer_entity_1 = require("../customer/customer.entity");
|
|
17
|
+
const country_entity_1 = require("../region/country.entity");
|
|
18
18
|
/**
|
|
19
19
|
* @description
|
|
20
20
|
* Represents a {@link Customer}'s address.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.entity.js","sourceRoot":"","sources":["../../../src/entity/address/address.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAA2D;AAG3D,qDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"address.entity.js","sourceRoot":"","sources":["../../../src/entity/address/address.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qCAA2D;AAG3D,qDAAoD;AACpD,kEAA8D;AAC9D,iEAAuD;AACvD,6DAAmD;AAEnD;;;;;GAKG;AAEI,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAa;IACtC,YAAY,KAA4B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CAsCJ,CAAA;AApCG;IAAC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;8BAClD,0BAAQ;yCAAC;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;yCAAkB;AAE1C;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;wCACR;AAEhB;IAAC,IAAA,gBAAM,GAAE;;4CAAqB;AAE9B;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;4CACJ;AAEpB;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qCAAc;AAEtC;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;yCACP;AAEjB;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CAAoB;AAE5C;IAAC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAO,CAAC;8BAClB,wBAAO;wCAAC;AAEjB;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;4CACJ;AAEpB;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uDACK;AAEhC;IAAC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;sDACI;AAE/B;IAAC,IAAA,gBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,0CAAmB,CAAC;8BACtB,0CAAmB;6CAAC;AAxCzB,OAAO;IADnB,IAAA,gBAAM,GAAE;;GACI,OAAO,CAyCnB;AAzCY,0BAAO"}
|
|
@@ -10,10 +10,6 @@ export declare class CustomCollectionFields {
|
|
|
10
10
|
}
|
|
11
11
|
export declare class CustomCollectionFieldsTranslation {
|
|
12
12
|
}
|
|
13
|
-
export declare class CustomCountryFields {
|
|
14
|
-
}
|
|
15
|
-
export declare class CustomCountryFieldsTranslation {
|
|
16
|
-
}
|
|
17
13
|
export declare class CustomCustomerFields {
|
|
18
14
|
}
|
|
19
15
|
export declare class CustomCustomerGroupFields {
|
|
@@ -58,6 +54,10 @@ export declare class CustomPromotionFields {
|
|
|
58
54
|
}
|
|
59
55
|
export declare class CustomPromotionFieldsTranslation {
|
|
60
56
|
}
|
|
57
|
+
export declare class CustomRegionFields {
|
|
58
|
+
}
|
|
59
|
+
export declare class CustomRegionFieldsTranslation {
|
|
60
|
+
}
|
|
61
61
|
export declare class CustomSellerFields {
|
|
62
62
|
}
|
|
63
63
|
export declare class CustomShippingMethodFields {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CustomZoneFields = exports.CustomUserFields = exports.CustomTaxRateFields = exports.CustomTaxCategoryFields = exports.CustomStockLocationFields = exports.CustomShippingMethodFieldsTranslation = exports.CustomShippingMethodFields = exports.CustomSellerFields = exports.CustomPromotionFieldsTranslation = exports.CustomPromotionFields = exports.CustomProductVariantFieldsTranslation = exports.CustomProductVariantFields = exports.CustomProductOptionGroupFieldsTranslation = exports.CustomProductOptionGroupFields = exports.CustomProductOptionFieldsTranslation = exports.CustomProductOptionFields = exports.CustomProductFieldsTranslation = exports.CustomProductFields = exports.CustomPaymentMethodFieldsTranslation = exports.CustomPaymentMethodFields = exports.CustomOrderLineFields = exports.CustomOrderFields = exports.CustomGlobalSettingsFields = exports.CustomFulfillmentFields = exports.CustomFacetValueFieldsTranslation = exports.CustomFacetValueFields = exports.CustomFacetFieldsTranslation = exports.CustomFacetFields = exports.CustomCustomerGroupFields = exports.CustomCustomerFields = exports.
|
|
3
|
+
exports.CustomZoneFields = exports.CustomUserFields = exports.CustomTaxRateFields = exports.CustomTaxCategoryFields = exports.CustomStockLocationFields = exports.CustomShippingMethodFieldsTranslation = exports.CustomShippingMethodFields = exports.CustomSellerFields = exports.CustomRegionFieldsTranslation = exports.CustomRegionFields = exports.CustomPromotionFieldsTranslation = exports.CustomPromotionFields = exports.CustomProductVariantFieldsTranslation = exports.CustomProductVariantFields = exports.CustomProductOptionGroupFieldsTranslation = exports.CustomProductOptionGroupFields = exports.CustomProductOptionFieldsTranslation = exports.CustomProductOptionFields = exports.CustomProductFieldsTranslation = exports.CustomProductFields = exports.CustomPaymentMethodFieldsTranslation = exports.CustomPaymentMethodFields = exports.CustomOrderLineFields = exports.CustomOrderFields = exports.CustomGlobalSettingsFields = exports.CustomFulfillmentFields = exports.CustomFacetValueFieldsTranslation = exports.CustomFacetValueFields = exports.CustomFacetFieldsTranslation = exports.CustomFacetFields = exports.CustomCustomerGroupFields = exports.CustomCustomerFields = exports.CustomCollectionFieldsTranslation = exports.CustomCollectionFields = exports.CustomChannelFields = exports.CustomAssetFields = exports.CustomAdministratorFields = exports.CustomAddressFields = void 0;
|
|
4
4
|
class CustomAddressFields {
|
|
5
5
|
}
|
|
6
6
|
exports.CustomAddressFields = CustomAddressFields;
|
|
@@ -19,12 +19,6 @@ exports.CustomCollectionFields = CustomCollectionFields;
|
|
|
19
19
|
class CustomCollectionFieldsTranslation {
|
|
20
20
|
}
|
|
21
21
|
exports.CustomCollectionFieldsTranslation = CustomCollectionFieldsTranslation;
|
|
22
|
-
class CustomCountryFields {
|
|
23
|
-
}
|
|
24
|
-
exports.CustomCountryFields = CustomCountryFields;
|
|
25
|
-
class CustomCountryFieldsTranslation {
|
|
26
|
-
}
|
|
27
|
-
exports.CustomCountryFieldsTranslation = CustomCountryFieldsTranslation;
|
|
28
22
|
class CustomCustomerFields {
|
|
29
23
|
}
|
|
30
24
|
exports.CustomCustomerFields = CustomCustomerFields;
|
|
@@ -91,6 +85,12 @@ exports.CustomPromotionFields = CustomPromotionFields;
|
|
|
91
85
|
class CustomPromotionFieldsTranslation {
|
|
92
86
|
}
|
|
93
87
|
exports.CustomPromotionFieldsTranslation = CustomPromotionFieldsTranslation;
|
|
88
|
+
class CustomRegionFields {
|
|
89
|
+
}
|
|
90
|
+
exports.CustomRegionFields = CustomRegionFields;
|
|
91
|
+
class CustomRegionFieldsTranslation {
|
|
92
|
+
}
|
|
93
|
+
exports.CustomRegionFieldsTranslation = CustomRegionFieldsTranslation;
|
|
94
94
|
class CustomSellerFields {
|
|
95
95
|
}
|
|
96
96
|
exports.CustomSellerFields = CustomSellerFields;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-entity-fields.js","sourceRoot":"","sources":["../../src/entity/custom-entity-fields.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAmB;CAAG;AAAnC,kDAAmC;AACnC,MAAa,yBAAyB;CAAG;AAAzC,8DAAyC;AACzC,MAAa,iBAAiB;CAAG;AAAjC,8CAAiC;AACjC,MAAa,mBAAmB;CAAG;AAAnC,kDAAmC;AACnC,MAAa,sBAAsB;CAAG;AAAtC,wDAAsC;AACtC,MAAa,iCAAiC;CAAG;AAAjD,8EAAiD;AACjD,MAAa,
|
|
1
|
+
{"version":3,"file":"custom-entity-fields.js","sourceRoot":"","sources":["../../src/entity/custom-entity-fields.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAmB;CAAG;AAAnC,kDAAmC;AACnC,MAAa,yBAAyB;CAAG;AAAzC,8DAAyC;AACzC,MAAa,iBAAiB;CAAG;AAAjC,8CAAiC;AACjC,MAAa,mBAAmB;CAAG;AAAnC,kDAAmC;AACnC,MAAa,sBAAsB;CAAG;AAAtC,wDAAsC;AACtC,MAAa,iCAAiC;CAAG;AAAjD,8EAAiD;AACjD,MAAa,oBAAoB;CAAG;AAApC,oDAAoC;AACpC,MAAa,yBAAyB;CAAG;AAAzC,8DAAyC;AACzC,MAAa,iBAAiB;CAAG;AAAjC,8CAAiC;AACjC,MAAa,4BAA4B;CAAG;AAA5C,oEAA4C;AAC5C,MAAa,sBAAsB;CAAG;AAAtC,wDAAsC;AACtC,MAAa,iCAAiC;CAAG;AAAjD,8EAAiD;AACjD,MAAa,uBAAuB;CAAG;AAAvC,0DAAuC;AACvC,MAAa,0BAA0B;CAAG;AAA1C,gEAA0C;AAC1C,MAAa,iBAAiB;CAAG;AAAjC,8CAAiC;AACjC,MAAa,qBAAqB;CAAG;AAArC,sDAAqC;AACrC,MAAa,yBAAyB;CAAG;AAAzC,8DAAyC;AACzC,MAAa,oCAAoC;CAAG;AAApD,oFAAoD;AACpD,MAAa,mBAAmB;CAAG;AAAnC,kDAAmC;AACnC,MAAa,8BAA8B;CAAG;AAA9C,wEAA8C;AAC9C,MAAa,yBAAyB;CAAG;AAAzC,8DAAyC;AACzC,MAAa,oCAAoC;CAAG;AAApD,oFAAoD;AACpD,MAAa,8BAA8B;CAAG;AAA9C,wEAA8C;AAC9C,MAAa,yCAAyC;CAAG;AAAzD,8FAAyD;AACzD,MAAa,0BAA0B;CAAG;AAA1C,gEAA0C;AAC1C,MAAa,qCAAqC;CAAG;AAArD,sFAAqD;AACrD,MAAa,qBAAqB;CAAG;AAArC,sDAAqC;AACrC,MAAa,gCAAgC;CAAG;AAAhD,4EAAgD;AAChD,MAAa,kBAAkB;CAAG;AAAlC,gDAAkC;AAClC,MAAa,6BAA6B;CAAG;AAA7C,sEAA6C;AAC7C,MAAa,kBAAkB;CAAG;AAAlC,gDAAkC;AAClC,MAAa,0BAA0B;CAAG;AAA1C,gEAA0C;AAC1C,MAAa,qCAAqC;CAAG;AAArD,sFAAqD;AACrD,MAAa,yBAAyB;CAAG;AAAzC,8DAAyC;AACzC,MAAa,uBAAuB;CAAG;AAAvC,0DAAuC;AACvC,MAAa,mBAAmB;CAAG;AAAnC,kDAAmC;AACnC,MAAa,gBAAgB;CAAG;AAAhC,4CAAgC;AAChC,MAAa,gBAAgB;CAAG;AAAhC,4CAAgC"}
|
|
@@ -8,8 +8,6 @@ import { Channel } from './channel/channel.entity';
|
|
|
8
8
|
import { CollectionAsset } from './collection/collection-asset.entity';
|
|
9
9
|
import { CollectionTranslation } from './collection/collection-translation.entity';
|
|
10
10
|
import { Collection } from './collection/collection.entity';
|
|
11
|
-
import { CountryTranslation } from './country/country-translation.entity';
|
|
12
|
-
import { Country } from './country/country.entity';
|
|
13
11
|
import { Customer } from './customer/customer.entity';
|
|
14
12
|
import { CustomerGroup } from './customer-group/customer-group.entity';
|
|
15
13
|
import { FacetTranslation } from './facet/facet-translation.entity';
|
|
@@ -45,6 +43,10 @@ import { ProductVariant } from './product-variant/product-variant.entity';
|
|
|
45
43
|
import { PromotionTranslation } from './promotion/promotion-translation.entity';
|
|
46
44
|
import { Promotion } from './promotion/promotion.entity';
|
|
47
45
|
import { Refund } from './refund/refund.entity';
|
|
46
|
+
import { Country } from './region/country.entity';
|
|
47
|
+
import { Province } from './region/province.entity';
|
|
48
|
+
import { RegionTranslation } from './region/region-translation.entity';
|
|
49
|
+
import { Region } from './region/region.entity';
|
|
48
50
|
import { Role } from './role/role.entity';
|
|
49
51
|
import { Seller } from './seller/seller.entity';
|
|
50
52
|
import { AnonymousSession } from './session/anonymous-session.entity';
|
|
@@ -84,7 +86,6 @@ export declare const coreEntitiesMap: {
|
|
|
84
86
|
CollectionAsset: typeof CollectionAsset;
|
|
85
87
|
CollectionTranslation: typeof CollectionTranslation;
|
|
86
88
|
Country: typeof Country;
|
|
87
|
-
CountryTranslation: typeof CountryTranslation;
|
|
88
89
|
Customer: typeof Customer;
|
|
89
90
|
CustomerGroup: typeof CustomerGroup;
|
|
90
91
|
CustomerHistoryEntry: typeof CustomerHistoryEntry;
|
|
@@ -120,8 +121,11 @@ export declare const coreEntitiesMap: {
|
|
|
120
121
|
ProductVariantTranslation: typeof ProductVariantTranslation;
|
|
121
122
|
Promotion: typeof Promotion;
|
|
122
123
|
PromotionTranslation: typeof PromotionTranslation;
|
|
124
|
+
Province: typeof Province;
|
|
123
125
|
Refund: typeof Refund;
|
|
124
126
|
RefundLine: typeof RefundLine;
|
|
127
|
+
Region: typeof Region;
|
|
128
|
+
RegionTranslation: typeof RegionTranslation;
|
|
125
129
|
Release: typeof Release;
|
|
126
130
|
Role: typeof Role;
|
|
127
131
|
Sale: typeof Sale;
|
package/dist/entity/entities.js
CHANGED
|
@@ -11,8 +11,6 @@ const channel_entity_1 = require("./channel/channel.entity");
|
|
|
11
11
|
const collection_asset_entity_1 = require("./collection/collection-asset.entity");
|
|
12
12
|
const collection_translation_entity_1 = require("./collection/collection-translation.entity");
|
|
13
13
|
const collection_entity_1 = require("./collection/collection.entity");
|
|
14
|
-
const country_translation_entity_1 = require("./country/country-translation.entity");
|
|
15
|
-
const country_entity_1 = require("./country/country.entity");
|
|
16
14
|
const customer_entity_1 = require("./customer/customer.entity");
|
|
17
15
|
const customer_group_entity_1 = require("./customer-group/customer-group.entity");
|
|
18
16
|
const facet_translation_entity_1 = require("./facet/facet-translation.entity");
|
|
@@ -48,6 +46,10 @@ const product_variant_entity_1 = require("./product-variant/product-variant.enti
|
|
|
48
46
|
const promotion_translation_entity_1 = require("./promotion/promotion-translation.entity");
|
|
49
47
|
const promotion_entity_1 = require("./promotion/promotion.entity");
|
|
50
48
|
const refund_entity_1 = require("./refund/refund.entity");
|
|
49
|
+
const country_entity_1 = require("./region/country.entity");
|
|
50
|
+
const province_entity_1 = require("./region/province.entity");
|
|
51
|
+
const region_translation_entity_1 = require("./region/region-translation.entity");
|
|
52
|
+
const region_entity_1 = require("./region/region.entity");
|
|
51
53
|
const role_entity_1 = require("./role/role.entity");
|
|
52
54
|
const seller_entity_1 = require("./seller/seller.entity");
|
|
53
55
|
const anonymous_session_entity_1 = require("./session/anonymous-session.entity");
|
|
@@ -87,7 +89,6 @@ exports.coreEntitiesMap = {
|
|
|
87
89
|
CollectionAsset: collection_asset_entity_1.CollectionAsset,
|
|
88
90
|
CollectionTranslation: collection_translation_entity_1.CollectionTranslation,
|
|
89
91
|
Country: country_entity_1.Country,
|
|
90
|
-
CountryTranslation: country_translation_entity_1.CountryTranslation,
|
|
91
92
|
Customer: customer_entity_1.Customer,
|
|
92
93
|
CustomerGroup: customer_group_entity_1.CustomerGroup,
|
|
93
94
|
CustomerHistoryEntry: customer_history_entry_entity_1.CustomerHistoryEntry,
|
|
@@ -123,8 +124,11 @@ exports.coreEntitiesMap = {
|
|
|
123
124
|
ProductVariantTranslation: product_variant_translation_entity_1.ProductVariantTranslation,
|
|
124
125
|
Promotion: promotion_entity_1.Promotion,
|
|
125
126
|
PromotionTranslation: promotion_translation_entity_1.PromotionTranslation,
|
|
127
|
+
Province: province_entity_1.Province,
|
|
126
128
|
Refund: refund_entity_1.Refund,
|
|
127
129
|
RefundLine: refund_line_entity_1.RefundLine,
|
|
130
|
+
Region: region_entity_1.Region,
|
|
131
|
+
RegionTranslation: region_translation_entity_1.RegionTranslation,
|
|
128
132
|
Release: release_entity_1.Release,
|
|
129
133
|
Role: role_entity_1.Role,
|
|
130
134
|
Sale: sale_entity_1.Sale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../src/entity/entities.ts"],"names":[],"mappings":";;;AAAA,6DAAmD;AACnD,+EAAqE;AACrE,uDAA6C;AAC7C,uGAA4F;AAC5F,yHAA6G;AAC7G,qHAAyG;AACzG,6DAAmD;AACnD,kFAAuE;AACvE,8FAAmF;AACnF,sEAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../src/entity/entities.ts"],"names":[],"mappings":";;;AAAA,6DAAmD;AACnD,+EAAqE;AACrE,uDAA6C;AAC7C,uGAA4F;AAC5F,yHAA6G;AAC7G,qHAAyG;AACzG,6DAAmD;AACnD,kFAAuE;AACvE,8FAAmF;AACnF,sEAA4D;AAC5D,gEAAsD;AACtD,kFAAuE;AACvE,+EAAoE;AACpE,uDAA6C;AAC7C,iGAAqF;AACrF,yEAA8D;AAC9D,yEAA+D;AAC/D,qFAA0E;AAC1E,iGAAqF;AACrF,+EAAoE;AACpE,2FAA+E;AAC/E,uDAA6C;AAC7C,sEAA2D;AAC3D,4FAAiF;AACjF,oGAAwF;AACxF,0GAA8F;AAC9F,kFAAuE;AACvE,8FAAmF;AACnF,6DAAmD;AACnD,0GAA8F;AAC9F,kFAAuE;AACvE,yEAA8D;AAC9D,qFAA0E;AAC1E,6DAAmD;AACnD,0GAA8F;AAC9F,kFAAuE;AACvE,4HAA+G;AAC/G,oGAAwF;AACxF,iGAAqF;AACrF,iGAAqF;AACrF,6GAAiG;AACjG,qFAA0E;AAC1E,2FAAgF;AAChF,mEAAyD;AACzD,0DAAgD;AAChD,4DAAkD;AAClD,8DAAoD;AACpD,kFAAuE;AACvE,0DAAgD;AAChD,oDAA0C;AAC1C,0DAAgD;AAChD,iFAAsE;AACtE,yFAA8E;AAC9E,6DAAmD;AACnD,+EAAoE;AACpE,6GAAiG;AACjG,qFAA0E;AAC1E,yEAA8D;AAC9D,kFAAuE;AACvE,0EAAgE;AAChE,8EAAoE;AACpE,oEA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uEAA6B;IAC7B,wBAAwB,EAAxB,4DAAwB;IACxB,kBAAkB,EAAlB,+CAAkB;IAClB,cAAc,EAAd,uCAAc;IACd,mBAAmB,EAAnB,kDAAmB;IACnB,mBAAmB,EAAnB,kDAAmB;IACnB,yBAAyB,EAAzB,8DAAyB;IACzB,SAAS,EAAT,4BAAS;IACT,oBAAoB,EAApB,mDAAoB;IACpB,QAAQ,EAAR,0BAAQ;IACR,MAAM,EAAN,sBAAM;IACN,UAAU,EAAV,+BAAU;IACV,MAAM,EAAN,sBAAM;IACN,iBAAiB,EAAjB,6CAAiB;IACjB,OAAO,EAAP,wBAAO;IACP,IAAI,EAAJ,kBAAI;IACJ,IAAI,EAAJ,kBAAI;IACJ,OAAO,EAAP,wBAAO;IACP,YAAY,EAAZ,mCAAY;IACZ,cAAc,EAAd,uCAAc;IACd,yBAAyB,EAAzB,8DAAyB;IACzB,eAAe,EAAf,yCAAe;IACf,UAAU,EAAV,+BAAU;IACV,aAAa,EAAb,qCAAa;IACb,aAAa,EAAb,qCAAa;IACb,SAAS,EAAT,4BAAS;IACT,GAAG,EAAH,gBAAG;IACH,WAAW,EAAX,iCAAW;IACX,OAAO,EAAP,yBAAO;IACP,IAAI,EAAJ,kBAAI;IACJ,MAAM,EAAN,sBAAM;IACN,IAAI,EAAJ,kBAAI;CACP,CAAC"}
|
package/dist/entity/index.d.ts
CHANGED
|
@@ -9,8 +9,7 @@ export * from './channel/channel.entity';
|
|
|
9
9
|
export * from './collection/collection-asset.entity';
|
|
10
10
|
export * from './collection/collection-translation.entity';
|
|
11
11
|
export * from './collection/collection.entity';
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './country/country.entity';
|
|
12
|
+
export * from './region/country.entity';
|
|
14
13
|
export * from './custom-entity-fields';
|
|
15
14
|
export * from './customer-group/customer-group.entity';
|
|
16
15
|
export * from './customer/customer.entity';
|
package/dist/entity/index.js
CHANGED
|
@@ -25,8 +25,7 @@ __exportStar(require("./channel/channel.entity"), exports);
|
|
|
25
25
|
__exportStar(require("./collection/collection-asset.entity"), exports);
|
|
26
26
|
__exportStar(require("./collection/collection-translation.entity"), exports);
|
|
27
27
|
__exportStar(require("./collection/collection.entity"), exports);
|
|
28
|
-
__exportStar(require("./
|
|
29
|
-
__exportStar(require("./country/country.entity"), exports);
|
|
28
|
+
__exportStar(require("./region/country.entity"), exports);
|
|
30
29
|
__exportStar(require("./custom-entity-fields"), exports);
|
|
31
30
|
__exportStar(require("./customer-group/customer-group.entity"), exports);
|
|
32
31
|
__exportStar(require("./customer/customer.entity"), exports);
|
package/dist/entity/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,uEAAqD;AACrD,uDAAqC;AACrC,uFAAqE;AACrE,gGAA8E;AAC9E,8FAA4E;AAC5E,qDAAmC;AACnC,2DAAyC;AACzC,uEAAqD;AACrD,6EAA2D;AAC3D,iEAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,uEAAqD;AACrD,uDAAqC;AACrC,uFAAqE;AACrE,gGAA8E;AAC9E,8FAA4E;AAC5E,qDAAmC;AACnC,2DAAyC;AACzC,uEAAqD;AACrD,6EAA2D;AAC3D,iEAA+C;AAC/C,0DAAwC;AACxC,yDAAuC;AACvC,yEAAuD;AACvD,6DAA2C;AAC3C,+EAA6D;AAC7D,mEAAiD;AACjD,mEAAiD;AACjD,uDAAqC;AACrC,mEAAiD;AACjD,2EAAyD;AACzD,uDAAqC;AACrC,iEAA+C;AAC/C,iFAA+D;AAC/D,wFAAsE;AACtE,qFAAmE;AACnE,4EAA0D;AAC1D,2DAAyC;AACzC,yEAAuD;AACvD,2DAAyC;AACzC,iGAA+E;AAC/E,qFAAmE;AACnE,qFAAmE;AACnE,yEAAuD;AACvD,iFAA+D;AAC/D,iFAA+D;AAC/D,uFAAqE;AACrE,2EAAyD;AACzD,iEAA+C;AAC/C,uEAAqD;AACrD,2DAAyC;AACzC,+DAA6C;AAC7C,yDAAuC;AACvC,qDAAmC;AACnC,qEAAmD;AACnD,yEAAuD;AACvD,2DAAyC;AACzC,uEAAqD;AACrD,2EAAyD;AACzD,mEAAiD;AACjD,yEAAuD;AACvD,qEAAmD;AACnD,uEAAqD;AACrD,kEAAgD;AAChD,+DAA6C;AAC7C,2EAAyD;AACzD,yEAAuD;AACvD,+DAA6C;AAC7C,mDAAiC;AACjC,qEAAmD;AACnD,6DAA2C;AAC3C,qDAAmC;AACnC,qDAAmC"}
|
|
@@ -18,6 +18,11 @@ const payment_method_entity_1 = require("./payment-method.entity");
|
|
|
18
18
|
let PaymentMethodTranslation = class PaymentMethodTranslation extends base_entity_1.VendureEntity {
|
|
19
19
|
constructor(input) {
|
|
20
20
|
super(input);
|
|
21
|
+
// This is a workaround for the fact that
|
|
22
|
+
// MySQL does not support default values on TEXT columns
|
|
23
|
+
if (this.description === undefined) {
|
|
24
|
+
this.description = '';
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
28
|
__decorate([
|
|
@@ -29,7 +34,7 @@ __decorate([
|
|
|
29
34
|
__metadata("design:type", String)
|
|
30
35
|
], PaymentMethodTranslation.prototype, "name", void 0);
|
|
31
36
|
__decorate([
|
|
32
|
-
(0, typeorm_1.Column)('text'
|
|
37
|
+
(0, typeorm_1.Column)('text'),
|
|
33
38
|
__metadata("design:type", String)
|
|
34
39
|
], PaymentMethodTranslation.prototype, "description", void 0);
|
|
35
40
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-method-translation.entity.js","sourceRoot":"","sources":["../../../src/entity/payment-method/payment-method-translation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAAmE;AAEnE,qCAA2D;AAI3D,qDAAoD;AACpD,kEAA+E;AAE/E,mEAAwD;AAGjD,IAAM,wBAAwB,GAA9B,MAAM,wBACT,SAAQ,2BAAa;IAGrB,YAAY,KAA+C;QACvD,KAAK,CAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"payment-method-translation.entity.js","sourceRoot":"","sources":["../../../src/entity/payment-method/payment-method-translation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAAmE;AAEnE,qCAA2D;AAI3D,qDAAoD;AACpD,kEAA+E;AAE/E,mEAAwD;AAGjD,IAAM,wBAAwB,GAA9B,MAAM,wBACT,SAAQ,2BAAa;IAGrB,YAAY,KAA+C;QACvD,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,yCAAyC;QACzC,wDAAwD;QACxD,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;YAChC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;SACzB;IACL,CAAC;CAcJ,CAAA;AAZG;IAAC,IAAA,gBAAM,EAAC,SAAS,CAAC;;8DAA4B;AAE9C;IAAC,IAAA,gBAAM,GAAE;;sDAAc;AAEvB;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;;6DAAqB;AAEpC;IAAC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,qCAAa,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC/E,qCAAa;sDAAC;AAEpB;IAAC,IAAA,gBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,2DAAoC,CAAC;8BACvC,2DAAoC;8DAAC;AAxB1C,wBAAwB;IADpC,IAAA,gBAAM,GAAE;;GACI,wBAAwB,CAyBpC;AAzBY,4DAAwB"}
|
|
@@ -18,6 +18,11 @@ const promotion_entity_1 = require("./promotion.entity");
|
|
|
18
18
|
let PromotionTranslation = class PromotionTranslation extends base_entity_1.VendureEntity {
|
|
19
19
|
constructor(input) {
|
|
20
20
|
super(input);
|
|
21
|
+
// This is a workaround for the fact that
|
|
22
|
+
// MySQL does not support default values on TEXT columns
|
|
23
|
+
if (this.description === undefined) {
|
|
24
|
+
this.description = '';
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
28
|
__decorate([
|
|
@@ -29,7 +34,7 @@ __decorate([
|
|
|
29
34
|
__metadata("design:type", String)
|
|
30
35
|
], PromotionTranslation.prototype, "name", void 0);
|
|
31
36
|
__decorate([
|
|
32
|
-
(0, typeorm_1.Column)('text'
|
|
37
|
+
(0, typeorm_1.Column)('text'),
|
|
33
38
|
__metadata("design:type", String)
|
|
34
39
|
], PromotionTranslation.prototype, "description", void 0);
|
|
35
40
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promotion-translation.entity.js","sourceRoot":"","sources":["../../../src/entity/promotion/promotion-translation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAAmE;AAEnE,qCAA2D;AAI3D,qDAAoD;AACpD,kEAA2E;AAE3E,yDAA+C;AAGxC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,2BAAa;IACnD,YAAY,KAA2C;QACnD,KAAK,CAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"promotion-translation.entity.js","sourceRoot":"","sources":["../../../src/entity/promotion/promotion-translation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAAmE;AAEnE,qCAA2D;AAI3D,qDAAoD;AACpD,kEAA2E;AAE3E,yDAA+C;AAGxC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,2BAAa;IACnD,YAAY,KAA2C;QACnD,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,yCAAyC;QACzC,wDAAwD;QACxD,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;YAChC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;SACzB;IACL,CAAC;CAcJ,CAAA;AAZG;IAAC,IAAA,gBAAM,EAAC,SAAS,CAAC;;0DAA4B;AAE9C;IAAC,IAAA,gBAAM,GAAE;;kDAAc;AAEvB;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;;yDAAqB;AAEpC;IAAC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAS,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC3E,4BAAS;kDAAC;AAEhB;IAAC,IAAA,gBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,uDAAgC,CAAC;8BACnC,uDAAgC;0DAAC;AArBtC,oBAAoB;IADhC,IAAA,gBAAM,GAAE;;GACI,oBAAoB,CAsBhC;AAtBY,oDAAoB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DeepPartial } from '@vendure/common/lib/shared-types';
|
|
2
|
+
import { Region, RegionType } from './region.entity';
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
* A country to which is available when creating / updating an {@link Address}. Countries are
|
|
6
|
+
* grouped together into {@link Zone}s which are in turn used to determine applicable shipping
|
|
7
|
+
* and taxes for an {@link Order}.
|
|
8
|
+
*
|
|
9
|
+
* @docsCategory entities
|
|
10
|
+
*/
|
|
11
|
+
export declare class Country extends Region {
|
|
12
|
+
constructor(input?: DeepPartial<Country>);
|
|
13
|
+
readonly type: RegionType;
|
|
14
|
+
}
|
|
@@ -11,9 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Country = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
-
const
|
|
15
|
-
const custom_entity_fields_1 = require("../custom-entity-fields");
|
|
16
|
-
const country_translation_entity_1 = require("./country-translation.entity");
|
|
14
|
+
const region_entity_1 = require("./region.entity");
|
|
17
15
|
/**
|
|
18
16
|
* @description
|
|
19
17
|
* A country to which is available when creating / updating an {@link Address}. Countries are
|
|
@@ -22,29 +20,14 @@ const country_translation_entity_1 = require("./country-translation.entity");
|
|
|
22
20
|
*
|
|
23
21
|
* @docsCategory entities
|
|
24
22
|
*/
|
|
25
|
-
let Country = class Country extends
|
|
23
|
+
let Country = class Country extends region_entity_1.Region {
|
|
26
24
|
constructor(input) {
|
|
27
25
|
super(input);
|
|
26
|
+
this.type = 'country';
|
|
28
27
|
}
|
|
29
28
|
};
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)(),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], Country.prototype, "code", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)(),
|
|
36
|
-
__metadata("design:type", Boolean)
|
|
37
|
-
], Country.prototype, "enabled", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.OneToMany)(type => country_translation_entity_1.CountryTranslation, translation => translation.base, { eager: true }),
|
|
40
|
-
__metadata("design:type", Array)
|
|
41
|
-
], Country.prototype, "translations", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)(type => custom_entity_fields_1.CustomCountryFields),
|
|
44
|
-
__metadata("design:type", custom_entity_fields_1.CustomCountryFields)
|
|
45
|
-
], Country.prototype, "customFields", void 0);
|
|
46
29
|
Country = __decorate([
|
|
47
|
-
(0, typeorm_1.
|
|
30
|
+
(0, typeorm_1.ChildEntity)(),
|
|
48
31
|
__metadata("design:paramtypes", [Object])
|
|
49
32
|
], Country);
|
|
50
33
|
exports.Country = Country;
|