@vendure/core 1.4.1 → 1.4.5
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/graphql-custom-fields.js +128 -128
- package/dist/api/middleware/exception-logger.filter.d.ts +1 -1
- package/dist/api/middleware/exception-logger.filter.js +10 -4
- package/dist/api/middleware/exception-logger.filter.js.map +1 -1
- package/dist/api/resolvers/shop/shop-auth.resolver.js +3 -0
- package/dist/api/resolvers/shop/shop-auth.resolver.js.map +1 -1
- package/dist/api/schema/shop-api/shop.api.graphql +1 -0
- package/dist/common/types/entity-relation-paths.d.ts +2 -2
- package/dist/config/entity-id-strategy/uuid-id-strategy.d.ts +6 -3
- package/dist/config/entity-id-strategy/uuid-id-strategy.js +6 -3
- package/dist/config/entity-id-strategy/uuid-id-strategy.js.map +1 -1
- package/dist/config/logger/vendure-logger.d.ts +20 -1
- package/dist/config/logger/vendure-logger.js +35 -6
- package/dist/config/logger/vendure-logger.js.map +1 -1
- package/dist/config/promotion/promotion-action.js +2 -2
- package/dist/config/promotion/promotion-action.js.map +1 -1
- package/dist/entity/asset/orderable-asset.entity.d.ts +3 -0
- package/dist/entity/asset/orderable-asset.entity.js +4 -1
- package/dist/entity/asset/orderable-asset.entity.js.map +1 -1
- package/dist/entity/register-custom-entity-fields.js +4 -1
- package/dist/entity/register-custom-entity-fields.js.map +1 -1
- package/dist/i18n/messages/en.json +2 -0
- package/dist/i18n/messages/pt_PT.json +1 -1
- package/dist/job-queue/subscribable-job.js +1 -1
- package/dist/job-queue/subscribable-job.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-job-buffer/search-job-buffer.service.js +6 -1
- package/dist/plugin/default-search-plugin/search-job-buffer/search-job-buffer.service.js.map +1 -1
- package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js +11 -11
- 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 +15 -9
- 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.d.ts +1 -0
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy-utils.js +5 -1
- 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 -7
- package/dist/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.js.map +1 -1
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.d.ts +12 -1
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.js +17 -3
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.js.map +1 -1
- package/dist/service/helpers/order-modifier/order-modifier.js +10 -2
- package/dist/service/helpers/order-modifier/order-modifier.js.map +1 -1
- package/dist/service/services/administrator.service.d.ts +6 -0
- package/dist/service/services/administrator.service.js +57 -0
- package/dist/service/services/administrator.service.js.map +1 -1
- package/dist/service/services/asset.service.d.ts +40 -2
- package/dist/service/services/asset.service.js +23 -1
- package/dist/service/services/asset.service.js.map +1 -1
- package/dist/service/services/customer.service.js +2 -4
- package/dist/service/services/customer.service.js.map +1 -1
- package/package.json +3 -3
|
@@ -13,13 +13,13 @@ function addGraphQLCustomFields(typeDefsOrSchema, customFieldConfig, publicOnly)
|
|
|
13
13
|
const schema = typeof typeDefsOrSchema === 'string' ? graphql_1.buildSchema(typeDefsOrSchema) : typeDefsOrSchema;
|
|
14
14
|
let customFieldTypeDefs = '';
|
|
15
15
|
if (!schema.getType('JSON')) {
|
|
16
|
-
customFieldTypeDefs += `
|
|
17
|
-
scalar JSON
|
|
16
|
+
customFieldTypeDefs += `
|
|
17
|
+
scalar JSON
|
|
18
18
|
`;
|
|
19
19
|
}
|
|
20
20
|
if (!schema.getType('DateTime')) {
|
|
21
|
-
customFieldTypeDefs += `
|
|
22
|
-
scalar DateTime
|
|
21
|
+
customFieldTypeDefs += `
|
|
22
|
+
scalar DateTime
|
|
23
23
|
`;
|
|
24
24
|
}
|
|
25
25
|
for (const entityName of Object.keys(customFieldConfig)) {
|
|
@@ -40,87 +40,87 @@ function addGraphQLCustomFields(typeDefsOrSchema, customFieldConfig, publicOnly)
|
|
|
40
40
|
const filterableFields = customEntityFields.filter(field => field.type !== 'relation');
|
|
41
41
|
if (schema.getType(entityName)) {
|
|
42
42
|
if (customEntityFields.length) {
|
|
43
|
-
customFieldTypeDefs += `
|
|
44
|
-
type ${entityName}CustomFields {
|
|
45
|
-
${mapToFields(customEntityFields, getGraphQlType)}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
extend type ${entityName} {
|
|
49
|
-
customFields: ${entityName}CustomFields
|
|
50
|
-
}
|
|
43
|
+
customFieldTypeDefs += `
|
|
44
|
+
type ${entityName}CustomFields {
|
|
45
|
+
${mapToFields(customEntityFields, getGraphQlType)}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
extend type ${entityName} {
|
|
49
|
+
customFields: ${entityName}CustomFields
|
|
50
|
+
}
|
|
51
51
|
`;
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
54
|
-
customFieldTypeDefs += `
|
|
55
|
-
extend type ${entityName} {
|
|
56
|
-
customFields: JSON
|
|
57
|
-
}
|
|
54
|
+
customFieldTypeDefs += `
|
|
55
|
+
extend type ${entityName} {
|
|
56
|
+
customFields: JSON
|
|
57
|
+
}
|
|
58
58
|
`;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
if (localeStringFields.length && schema.getType(`${entityName}Translation`)) {
|
|
62
|
-
customFieldTypeDefs += `
|
|
63
|
-
type ${entityName}TranslationCustomFields {
|
|
64
|
-
${mapToFields(localeStringFields, getGraphQlType)}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
extend type ${entityName}Translation {
|
|
68
|
-
customFields: ${entityName}TranslationCustomFields
|
|
69
|
-
}
|
|
62
|
+
customFieldTypeDefs += `
|
|
63
|
+
type ${entityName}TranslationCustomFields {
|
|
64
|
+
${mapToFields(localeStringFields, getGraphQlType)}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
extend type ${entityName}Translation {
|
|
68
|
+
customFields: ${entityName}TranslationCustomFields
|
|
69
|
+
}
|
|
70
70
|
`;
|
|
71
71
|
}
|
|
72
72
|
if (schema.getType(`Create${entityName}Input`)) {
|
|
73
73
|
if (writeableNonLocaleStringFields.length) {
|
|
74
|
-
customFieldTypeDefs += `
|
|
75
|
-
input Create${entityName}CustomFieldsInput {
|
|
76
|
-
${mapToFields(writeableNonLocaleStringFields, getGraphQlInputType, shared_utils_1.getGraphQlInputName)}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
extend input Create${entityName}Input {
|
|
80
|
-
customFields: Create${entityName}CustomFieldsInput
|
|
81
|
-
}
|
|
74
|
+
customFieldTypeDefs += `
|
|
75
|
+
input Create${entityName}CustomFieldsInput {
|
|
76
|
+
${mapToFields(writeableNonLocaleStringFields, getGraphQlInputType, shared_utils_1.getGraphQlInputName)}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
extend input Create${entityName}Input {
|
|
80
|
+
customFields: Create${entityName}CustomFieldsInput
|
|
81
|
+
}
|
|
82
82
|
`;
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
85
|
-
customFieldTypeDefs += `
|
|
86
|
-
extend input Create${entityName}Input {
|
|
87
|
-
customFields: JSON
|
|
88
|
-
}
|
|
85
|
+
customFieldTypeDefs += `
|
|
86
|
+
extend input Create${entityName}Input {
|
|
87
|
+
customFields: JSON
|
|
88
|
+
}
|
|
89
89
|
`;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
if (schema.getType(`Update${entityName}Input`)) {
|
|
93
93
|
if (writeableNonLocaleStringFields.length) {
|
|
94
|
-
customFieldTypeDefs += `
|
|
95
|
-
input Update${entityName}CustomFieldsInput {
|
|
96
|
-
${mapToFields(writeableNonLocaleStringFields, getGraphQlInputType, shared_utils_1.getGraphQlInputName)}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
extend input Update${entityName}Input {
|
|
100
|
-
customFields: Update${entityName}CustomFieldsInput
|
|
101
|
-
}
|
|
94
|
+
customFieldTypeDefs += `
|
|
95
|
+
input Update${entityName}CustomFieldsInput {
|
|
96
|
+
${mapToFields(writeableNonLocaleStringFields, getGraphQlInputType, shared_utils_1.getGraphQlInputName)}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
extend input Update${entityName}Input {
|
|
100
|
+
customFields: Update${entityName}CustomFieldsInput
|
|
101
|
+
}
|
|
102
102
|
`;
|
|
103
103
|
}
|
|
104
104
|
else {
|
|
105
|
-
customFieldTypeDefs += `
|
|
106
|
-
extend input Update${entityName}Input {
|
|
107
|
-
customFields: JSON
|
|
108
|
-
}
|
|
105
|
+
customFieldTypeDefs += `
|
|
106
|
+
extend input Update${entityName}Input {
|
|
107
|
+
customFields: JSON
|
|
108
|
+
}
|
|
109
109
|
`;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
if (customEntityFields.length && schema.getType(`${entityName}SortParameter`)) {
|
|
113
|
-
customFieldTypeDefs += `
|
|
114
|
-
extend input ${entityName}SortParameter {
|
|
115
|
-
${mapToFields(customEntityFields, () => 'SortOrder')}
|
|
116
|
-
}
|
|
113
|
+
customFieldTypeDefs += `
|
|
114
|
+
extend input ${entityName}SortParameter {
|
|
115
|
+
${mapToFields(customEntityFields, () => 'SortOrder')}
|
|
116
|
+
}
|
|
117
117
|
`;
|
|
118
118
|
}
|
|
119
119
|
if (filterableFields.length && schema.getType(`${entityName}FilterParameter`)) {
|
|
120
|
-
customFieldTypeDefs += `
|
|
121
|
-
extend input ${entityName}FilterParameter {
|
|
122
|
-
${mapToFields(filterableFields, getFilterOperator)}
|
|
123
|
-
}
|
|
120
|
+
customFieldTypeDefs += `
|
|
121
|
+
extend input ${entityName}FilterParameter {
|
|
122
|
+
${mapToFields(filterableFields, getFilterOperator)}
|
|
123
|
+
}
|
|
124
124
|
`;
|
|
125
125
|
}
|
|
126
126
|
if (writeableLocaleStringFields) {
|
|
@@ -132,21 +132,21 @@ function addGraphQLCustomFields(typeDefsOrSchema, customFieldConfig, publicOnly)
|
|
|
132
132
|
for (const inputName of translationInputs) {
|
|
133
133
|
if (schema.getType(inputName)) {
|
|
134
134
|
if (writeableLocaleStringFields.length) {
|
|
135
|
-
customFieldTypeDefs += `
|
|
136
|
-
input ${inputName}CustomFields {
|
|
137
|
-
${mapToFields(writeableLocaleStringFields, getGraphQlType)}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
extend input ${inputName} {
|
|
141
|
-
customFields: ${inputName}CustomFields
|
|
142
|
-
}
|
|
135
|
+
customFieldTypeDefs += `
|
|
136
|
+
input ${inputName}CustomFields {
|
|
137
|
+
${mapToFields(writeableLocaleStringFields, getGraphQlType)}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
extend input ${inputName} {
|
|
141
|
+
customFields: ${inputName}CustomFields
|
|
142
|
+
}
|
|
143
143
|
`;
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
|
-
customFieldTypeDefs += `
|
|
147
|
-
extend input ${inputName} {
|
|
148
|
-
customFields: JSON
|
|
149
|
-
}
|
|
146
|
+
customFieldTypeDefs += `
|
|
147
|
+
extend input ${inputName} {
|
|
148
|
+
customFields: JSON
|
|
149
|
+
}
|
|
150
150
|
`;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -157,26 +157,26 @@ function addGraphQLCustomFields(typeDefsOrSchema, customFieldConfig, publicOnly)
|
|
|
157
157
|
// For custom fields on the Address entity, we also extend the OrderAddress
|
|
158
158
|
// type (which is used to store address snapshots on Orders)
|
|
159
159
|
if (schema.getType('OrderAddress')) {
|
|
160
|
-
customFieldTypeDefs += `
|
|
161
|
-
extend type OrderAddress {
|
|
162
|
-
customFields: AddressCustomFields
|
|
163
|
-
}
|
|
160
|
+
customFieldTypeDefs += `
|
|
161
|
+
extend type OrderAddress {
|
|
162
|
+
customFields: AddressCustomFields
|
|
163
|
+
}
|
|
164
164
|
`;
|
|
165
165
|
}
|
|
166
166
|
if (schema.getType('UpdateOrderAddressInput')) {
|
|
167
|
-
customFieldTypeDefs += `
|
|
168
|
-
extend input UpdateOrderAddressInput {
|
|
169
|
-
customFields: UpdateAddressCustomFieldsInput
|
|
170
|
-
}
|
|
167
|
+
customFieldTypeDefs += `
|
|
168
|
+
extend input UpdateOrderAddressInput {
|
|
169
|
+
customFields: UpdateAddressCustomFieldsInput
|
|
170
|
+
}
|
|
171
171
|
`;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
else {
|
|
175
175
|
if (schema.getType('OrderAddress')) {
|
|
176
|
-
customFieldTypeDefs += `
|
|
177
|
-
extend type OrderAddress {
|
|
178
|
-
customFields: JSON
|
|
179
|
-
}
|
|
176
|
+
customFieldTypeDefs += `
|
|
177
|
+
extend type OrderAddress {
|
|
178
|
+
customFields: JSON
|
|
179
|
+
}
|
|
180
180
|
`;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -185,24 +185,24 @@ function addGraphQLCustomFields(typeDefsOrSchema, customFieldConfig, publicOnly)
|
|
|
185
185
|
exports.addGraphQLCustomFields = addGraphQLCustomFields;
|
|
186
186
|
function addServerConfigCustomFields(typeDefsOrSchema, customFieldConfig) {
|
|
187
187
|
const schema = typeof typeDefsOrSchema === 'string' ? graphql_1.buildSchema(typeDefsOrSchema) : typeDefsOrSchema;
|
|
188
|
-
const customFieldTypeDefs = `
|
|
189
|
-
type CustomFields {
|
|
190
|
-
${Object.keys(customFieldConfig).reduce((output, name) => output + name + `: [CustomFieldConfig!]!\n`, '')}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
extend type ServerConfig {
|
|
194
|
-
customFieldConfig: CustomFields!
|
|
195
|
-
}
|
|
188
|
+
const customFieldTypeDefs = `
|
|
189
|
+
type CustomFields {
|
|
190
|
+
${Object.keys(customFieldConfig).reduce((output, name) => output + name + `: [CustomFieldConfig!]!\n`, '')}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
extend type ServerConfig {
|
|
194
|
+
customFieldConfig: CustomFields!
|
|
195
|
+
}
|
|
196
196
|
`;
|
|
197
197
|
return graphql_1.extendSchema(schema, graphql_1.parse(customFieldTypeDefs));
|
|
198
198
|
}
|
|
199
199
|
exports.addServerConfigCustomFields = addServerConfigCustomFields;
|
|
200
200
|
function addActiveAdministratorCustomFields(typeDefsOrSchema, administratorCustomFields) {
|
|
201
201
|
const schema = typeof typeDefsOrSchema === 'string' ? graphql_1.buildSchema(typeDefsOrSchema) : typeDefsOrSchema;
|
|
202
|
-
const extension = `
|
|
203
|
-
extend input UpdateActiveAdministratorInput {
|
|
204
|
-
customFields: ${0 < (administratorCustomFields === null || administratorCustomFields === void 0 ? void 0 : administratorCustomFields.length) ? 'UpdateAdministratorCustomFieldsInput' : 'JSON'}
|
|
205
|
-
}
|
|
202
|
+
const extension = `
|
|
203
|
+
extend input UpdateActiveAdministratorInput {
|
|
204
|
+
customFields: ${0 < (administratorCustomFields === null || administratorCustomFields === void 0 ? void 0 : administratorCustomFields.length) ? 'UpdateAdministratorCustomFieldsInput' : 'JSON'}
|
|
205
|
+
}
|
|
206
206
|
`;
|
|
207
207
|
return graphql_1.extendSchema(schema, graphql_1.parse(extension));
|
|
208
208
|
}
|
|
@@ -223,14 +223,14 @@ function addRegisterCustomerCustomFieldsInput(typeDefsOrSchema, customerCustomFi
|
|
|
223
223
|
if (publicWritableCustomFields.length < 1) {
|
|
224
224
|
return schema;
|
|
225
225
|
}
|
|
226
|
-
const customFieldTypeDefs = `
|
|
227
|
-
input RegisterCustomerCustomFieldsInput {
|
|
228
|
-
${mapToFields(publicWritableCustomFields, getGraphQlInputType, shared_utils_1.getGraphQlInputName)}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
extend input RegisterCustomerInput {
|
|
232
|
-
customFields: RegisterCustomerCustomFieldsInput
|
|
233
|
-
}
|
|
226
|
+
const customFieldTypeDefs = `
|
|
227
|
+
input RegisterCustomerCustomFieldsInput {
|
|
228
|
+
${mapToFields(publicWritableCustomFields, getGraphQlInputType, shared_utils_1.getGraphQlInputName)}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
extend input RegisterCustomerInput {
|
|
232
|
+
customFields: RegisterCustomerCustomFieldsInput
|
|
233
|
+
}
|
|
234
234
|
`;
|
|
235
235
|
return graphql_1.extendSchema(schema, graphql_1.parse(customFieldTypeDefs));
|
|
236
236
|
}
|
|
@@ -245,10 +245,10 @@ function addModifyOrderCustomFields(typeDefsOrSchema, orderCustomFields) {
|
|
|
245
245
|
return schema;
|
|
246
246
|
}
|
|
247
247
|
if (schema.getType('ModifyOrderInput') && schema.getType('UpdateOrderCustomFieldsInput')) {
|
|
248
|
-
const customFieldTypeDefs = `
|
|
249
|
-
extend input ModifyOrderInput {
|
|
250
|
-
customFields: UpdateOrderCustomFieldsInput
|
|
251
|
-
}
|
|
248
|
+
const customFieldTypeDefs = `
|
|
249
|
+
extend input ModifyOrderInput {
|
|
250
|
+
customFields: UpdateOrderCustomFieldsInput
|
|
251
|
+
}
|
|
252
252
|
`;
|
|
253
253
|
return graphql_1.extendSchema(schema, graphql_1.parse(customFieldTypeDefs));
|
|
254
254
|
}
|
|
@@ -308,18 +308,18 @@ function addOrderLineCustomFieldsInput(typeDefsOrSchema, orderLineCustomFields)
|
|
|
308
308
|
}
|
|
309
309
|
let extendedSchema = new graphql_1.GraphQLSchema(schemaConfig);
|
|
310
310
|
if (schema.getType('AddItemInput')) {
|
|
311
|
-
const customFieldTypeDefs = `
|
|
312
|
-
extend input AddItemInput {
|
|
313
|
-
customFields: OrderLineCustomFieldsInput
|
|
314
|
-
}
|
|
311
|
+
const customFieldTypeDefs = `
|
|
312
|
+
extend input AddItemInput {
|
|
313
|
+
customFields: OrderLineCustomFieldsInput
|
|
314
|
+
}
|
|
315
315
|
`;
|
|
316
316
|
extendedSchema = graphql_1.extendSchema(extendedSchema, graphql_1.parse(customFieldTypeDefs));
|
|
317
317
|
}
|
|
318
318
|
if (schema.getType('AdjustOrderLineInput')) {
|
|
319
|
-
const customFieldTypeDefs = `
|
|
320
|
-
extend input AdjustOrderLineInput {
|
|
321
|
-
customFields: OrderLineCustomFieldsInput
|
|
322
|
-
}
|
|
319
|
+
const customFieldTypeDefs = `
|
|
320
|
+
extend input AdjustOrderLineInput {
|
|
321
|
+
customFields: OrderLineCustomFieldsInput
|
|
322
|
+
}
|
|
323
323
|
`;
|
|
324
324
|
extendedSchema = graphql_1.extendSchema(extendedSchema, graphql_1.parse(customFieldTypeDefs));
|
|
325
325
|
}
|
|
@@ -331,17 +331,17 @@ function addShippingMethodQuoteCustomFields(typeDefsOrSchema, shippingMethodCust
|
|
|
331
331
|
let customFieldTypeDefs = ``;
|
|
332
332
|
const publicCustomFields = shippingMethodCustomFields.filter(f => f.public !== false);
|
|
333
333
|
if (0 < publicCustomFields.length) {
|
|
334
|
-
customFieldTypeDefs = `
|
|
335
|
-
extend type ShippingMethodQuote {
|
|
336
|
-
customFields: ShippingMethodCustomFields
|
|
337
|
-
}
|
|
334
|
+
customFieldTypeDefs = `
|
|
335
|
+
extend type ShippingMethodQuote {
|
|
336
|
+
customFields: ShippingMethodCustomFields
|
|
337
|
+
}
|
|
338
338
|
`;
|
|
339
339
|
}
|
|
340
340
|
else {
|
|
341
|
-
customFieldTypeDefs = `
|
|
342
|
-
extend type ShippingMethodQuote {
|
|
343
|
-
customFields: JSON
|
|
344
|
-
}
|
|
341
|
+
customFieldTypeDefs = `
|
|
342
|
+
extend type ShippingMethodQuote {
|
|
343
|
+
customFields: JSON
|
|
344
|
+
}
|
|
345
345
|
`;
|
|
346
346
|
}
|
|
347
347
|
return graphql_1.extendSchema(schema, graphql_1.parse(customFieldTypeDefs));
|
|
@@ -352,17 +352,17 @@ function addPaymentMethodQuoteCustomFields(typeDefsOrSchema, paymentMethodCustom
|
|
|
352
352
|
let customFieldTypeDefs = ``;
|
|
353
353
|
const publicCustomFields = paymentMethodCustomFields.filter(f => f.public !== false);
|
|
354
354
|
if (0 < publicCustomFields.length) {
|
|
355
|
-
customFieldTypeDefs = `
|
|
356
|
-
extend type PaymentMethodQuote {
|
|
357
|
-
customFields: PaymentMethodCustomFields
|
|
358
|
-
}
|
|
355
|
+
customFieldTypeDefs = `
|
|
356
|
+
extend type PaymentMethodQuote {
|
|
357
|
+
customFields: PaymentMethodCustomFields
|
|
358
|
+
}
|
|
359
359
|
`;
|
|
360
360
|
}
|
|
361
361
|
else {
|
|
362
|
-
customFieldTypeDefs = `
|
|
363
|
-
extend type PaymentMethodQuote {
|
|
364
|
-
customFields: JSON
|
|
365
|
-
}
|
|
362
|
+
customFieldTypeDefs = `
|
|
363
|
+
extend type PaymentMethodQuote {
|
|
364
|
+
customFields: JSON
|
|
365
|
+
}
|
|
366
366
|
`;
|
|
367
367
|
}
|
|
368
368
|
return graphql_1.extendSchema(schema, graphql_1.parse(customFieldTypeDefs));
|
|
@@ -4,7 +4,7 @@ import { I18nError } from '../../i18n/i18n-error';
|
|
|
4
4
|
* Logs thrown I18nErrors via the configured VendureLogger.
|
|
5
5
|
*/
|
|
6
6
|
export declare class ExceptionLoggerFilter implements ExceptionFilter {
|
|
7
|
-
catch(exception: Error | HttpException | I18nError, host: ArgumentsHost):
|
|
7
|
+
catch(exception: Error | HttpException | I18nError, host: ArgumentsHost): I18nError | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* For a given I18nError.code, returns a corresponding HTTP
|
|
10
10
|
* status code.
|
|
@@ -35,17 +35,23 @@ class ExceptionLoggerFilter {
|
|
|
35
35
|
config_1.Logger.verbose(message);
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
|
+
if (exception.stack) {
|
|
39
|
+
config_1.Logger.debug(exception.stack);
|
|
40
|
+
}
|
|
41
|
+
if (isGraphQL) {
|
|
42
|
+
return exception;
|
|
43
|
+
}
|
|
38
44
|
}
|
|
39
45
|
else if (exception instanceof common_1.HttpException) {
|
|
40
46
|
// Handle other Nestjs errors
|
|
41
47
|
statusCode = exception.getStatus();
|
|
42
48
|
message = exception.message;
|
|
43
|
-
let stack = exception.stack;
|
|
44
49
|
if (statusCode === 404) {
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
config_1.Logger.verbose(exception.message);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
config_1.Logger.error(message, undefined, exception.stack);
|
|
47
54
|
}
|
|
48
|
-
config_1.Logger.error(message, undefined, stack);
|
|
49
55
|
}
|
|
50
56
|
else {
|
|
51
57
|
config_1.Logger.error(exception.message, undefined, exception.stack);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception-logger.filter.js","sourceRoot":"","sources":["../../../src/api/middleware/exception-logger.filter.ts"],"names":[],"mappings":";;;AAAA,2CAA+E;AAE/E,yCAAgD;AAChD,4DAAkE;AAClE,sDAAkD;AAClD,2DAAuD;AAEvD;;GAEG;AACH,MAAa,qBAAqB;IAC9B,KAAK,CAAC,SAA4C,EAAE,IAAmB;QACnE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,4BAAY,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,UAAU,GAAG,GAAG,CAAC;QACrB,IAAI,SAAS,YAAY,sBAAS,EAAE;YAChC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;YACnD,OAAO,GAAG,GAAG,IAAI,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YACvC,UAAU,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;YAE9C,QAAQ,QAAQ,EAAE;gBACd,KAAK,iBAAQ,CAAC,KAAK;oBACf,eAAM,CAAC,KAAK,CACR,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EACpE,SAAS,EACT,SAAS,CAAC,KAAK,CAClB,CAAC;oBACF,MAAM;gBACV,KAAK,iBAAQ,CAAC,IAAI;oBACd,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACrB,MAAM;gBACV,KAAK,iBAAQ,CAAC,IAAI;oBACd,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACrB,MAAM;gBACV,KAAK,iBAAQ,CAAC,KAAK;oBACf,eAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBACtB,MAAM;gBACV,KAAK,iBAAQ,CAAC,OAAO;oBACjB,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;oBACxB,MAAM;aACb;SACJ;aAAM,IAAI,SAAS,YAAY,sBAAa,EAAE;YAC3C,6BAA6B;YAC7B,UAAU,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;YACnC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;YAC5B,IAAI,
|
|
1
|
+
{"version":3,"file":"exception-logger.filter.js","sourceRoot":"","sources":["../../../src/api/middleware/exception-logger.filter.ts"],"names":[],"mappings":";;;AAAA,2CAA+E;AAE/E,yCAAgD;AAChD,4DAAkE;AAClE,sDAAkD;AAClD,2DAAuD;AAEvD;;GAEG;AACH,MAAa,qBAAqB;IAC9B,KAAK,CAAC,SAA4C,EAAE,IAAmB;QACnE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,4BAAY,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,UAAU,GAAG,GAAG,CAAC;QACrB,IAAI,SAAS,YAAY,sBAAS,EAAE;YAChC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;YACnD,OAAO,GAAG,GAAG,IAAI,IAAI,OAAO,KAAK,GAAG,E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ACH,eAAM,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;SAC/D;QAED,IAAI,SAAS,YAAY,sBAAa,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,8BAAkB,CAAC,EAAE;YACrF,sFAAsF;YACtF,gDAAgD;YAChD,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;SACnE;aAAM,IAAI,CAAC,SAAS,EAAE;YACnB,oDAAoD;YACpD,sDAAsD;YACtD,0DAA0D;YAC1D,6DAA6D;YAC7D,aAAa;YACb,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;gBACxB,UAAU;gBACV,OAAO;gBACP,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACnC,IAAI,EAAE,GAAG,CAAC,GAAG;aAChB,CAAC,CAAC;SACN;IACL,CAAC;IAED;;;OAGG;IACK,qBAAqB,CAAC,SAA6B;QACvD,QAAQ,SAAS,EAAE;YACf,KAAK,WAAW;gBACZ,OAAO,GAAG,CAAC;YACf,KAAK,cAAc;gBACf,OAAO,GAAG,CAAC;YACf,KAAK,kBAAkB,CAAC;YACxB,KAAK,mBAAmB;gBACpB,OAAO,GAAG,CAAC;YACf;gBACI,OAAO,GAAG,CAAC;SAClB;IACL,CAAC;CACJ;AAtFD,sDAsFC"}
|
|
@@ -135,6 +135,9 @@ let ShopAuthResolver = class ShopAuthResolver extends base_auth_resolver_1.BaseA
|
|
|
135
135
|
},
|
|
136
136
|
},
|
|
137
137
|
}, req, res);
|
|
138
|
+
if (error_result_1.isGraphQlErrorResult(authResult) && authResult.__typename === 'NotVerifiedError') {
|
|
139
|
+
return authResult;
|
|
140
|
+
}
|
|
138
141
|
if (error_result_1.isGraphQlErrorResult(authResult)) {
|
|
139
142
|
// This should never occur in theory
|
|
140
143
|
throw authResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-auth.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/shop/shop-auth.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA2E;AAC3E,mFA0BkD;AAClD,yEAAuE;AAGvE,qEAA0E;AAC1E,yDAA8D;AAE9D,wGAAgG;AAChG,mEAA+D;AAC/D,2FAAuF;AACvF,yEAAqE;AACrE,iFAA6E;AAC7E,+EAA2E;AAC3E,yEAAqE;AACrE,kEAA8D;AAC9D,sEAAiE;AACjE,sEAAyD;AACzD,0FAAiE;AACjE,kFAAqE;AACrE,mEAA8D;AAG9D,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,qCAAgB;IAClD,YACI,WAAwB,EACxB,WAAwB,EACxB,oBAA0C,EAC1C,aAA4B,EAClB,eAAgC,EAChC,cAA8B;QAExC,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,CAAC,CAAC;QAH3D,oBAAe,GAAf,eAAe,CAAiB;QAChC,mBAAc,GAAd,cAAc,CAAgB;IAG5C,CAAC;IAKD,KAAK,CAAC,KAAK,CACC,IAAuB,EACxB,GAAmB,EACV,GAAY,EACZ,GAAa;QAE7B,MAAM,uBAAuB,GAAG,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjE,IAAI,uBAAuB,EAAE;YACzB,OAAO,uBAAuB,CAAC;SAClC;QACD,OAAO,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAyB,CAAC;IAChF,CAAC;IAKD,KAAK,CAAC,YAAY,CACN,IAA8B,EAC/B,GAAmB,EACV,GAAY,EACZ,GAAa;QAE7B,OAAO,CAAC,MAAM,IAAI,CAAC,4BAA4B,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC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AM,uBAAuB,GAAG,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACjE,IAAI,uBAAuB,EAAE;YACzB,OAAO,uBAAuB,CAAC;SAClC;QACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9E,IAAI,mCAAoB,CAAC,MAAM,CAAC,EAAE;YAC9B,OAAO,MAAM,CAAC;SACjB;QACD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAC/B,CAAC;IAES,yBAAyB;QAC/B,OAAO,KAAK,CAAC,yBAAyB,EAAyC,CAAC;IACpF,CAAC;CACJ,CAAA;
|
|
1
|
+
{"version":3,"file":"shop-auth.resolver.js","sourceRoot":"","sources":["../../../../src/api/resolvers/shop/shop-auth.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA2E;AAC3E,mFA0BkD;AAClD,yEAAuE;AAGvE,qEAA0E;AAC1E,yDAA8D;AAE9D,wGAAgG;AAChG,mEAA+D;AAC/D,2FAAuF;AACvF,yEAAqE;AACrE,iFAA6E;AAC7E,+EAA2E;AAC3E,yEAAqE;AACrE,kEAA8D;AAC9D,sEAAiE;AACjE,sEAAyD;AACzD,0FAAiE;AACjE,kFAAqE;AACrE,mEAA8D;AAG9D,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,qCAAgB;IAClD,YACI,WAAwB,EACxB,WAAwB,EACxB,oBAA0C,EAC1C,aAA4B,EAClB,eAAgC,EAChC,cAA8B;QAExC,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,CAAC,CAAC;QAH3D,oBAAe,GAAf,eAAe,CAAiB;QAChC,mBAAc,GAAd,cAAc,CAAgB;IAG5C,CAAC;IAKD,KAAK,CAAC,KAAK,CACC,IAAuB,EACxB,GAAmB,EACV,GAAY,EACZ,GAAa;QAE7B,MAAM,uBAAuB,GAAG,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,uBAAK,CAAC,iCAAU,CAAC,MAAM,CAAC;IAEpB,WAAA,+BAAG,EAAE,CAAA;IACL,WAAA,cAAI,EAAE,CAAA;;qCADK,gCAAc;;4DAS7B;AAKD;IAHC,mCAAW,EAAE;IACb,kBAAQ,EAAE;IACV,uBAAK,CAAC,iCAAU,CAAC,MAAM,CAAC;IAEpB,WAAA,+BAAG,EAAE,CAAA;IACL,WAAA,cAAI,EAAE,CAAA;IACN,WAAA,iBAAO,CAAC,KAAK,CAAC,CAAA;IACd,WAAA,iBAAO,CAAC,KAAK,CAAC,CAAA;;qCAHH,gCAAc;;qDAoC7B;AAKD;IAHC,mCAAW,EAAE;IACb,kBAAQ,EAAE;IACV,uBAAK,CAAC,iCAAU,CAAC,KAAK,CAAC;IAEnB,WAAA,+BAAG,EAAE,CAAA;IACL,WAAA,cAAI,EAAE,CAAA;;qCADK,gCAAc;;8DAuB7B;AAKD;IAHC,mCAAW,EAAE;IACb,kBAAQ,EAAE;IACV,uBAAK,CAAC,iCAAU,CAAC,KAAK,CAAC;IAEnB,WAAA,+BAAG,EAAE,CAAA;IACL,WAAA,cAAI,EAAE,CAAA;;qCADK,gCAAc;;yEAyB7B;AAKD;IAHC,mCAAW,EAAE;IACb,kBAAQ,EAAE;IACV,uBAAK,CAAC,iCAAU,CAAC,KAAK,CAAC;IAEnB,WAAA,+BAAG,EAAE,CAAA;IACL,WAAA,cAAI,EAAE,CAAA;;qCADK,gCAAc;;kEAY7B;AApRQ,gBAAgB;IAD5B,kBAAQ,EAAE;qCAGU,0BAAW;QACX,0BAAW;QACF,4CAAoB;QAC3B,8BAAa;QACD,kCAAe;QAChB,gCAAc;GAPnC,gBAAgB,CAyR5B;AAzRY,4CAAgB"}
|
|
@@ -19,9 +19,9 @@ import { VendureEntity } from '../../entity/base/base.entity';
|
|
|
19
19
|
*
|
|
20
20
|
* @docsCategory Common
|
|
21
21
|
*/
|
|
22
|
-
export declare type EntityRelationPaths<T extends VendureEntity> = PathsToStringProps1<T> | Join<PathsToStringProps2<T>, '.'> | TripleDotPath;
|
|
22
|
+
export declare type EntityRelationPaths<T extends VendureEntity> = `customFields.${string}` | PathsToStringProps1<T> | Join<PathsToStringProps2<T>, '.'> | TripleDotPath;
|
|
23
23
|
export declare type EntityRelationKeys<T extends VendureEntity> = {
|
|
24
|
-
[K in Extract<keyof T, string>]: Required<T>[K] extends VendureEntity ? K : Required<T>[K] extends VendureEntity[] ? K : never;
|
|
24
|
+
[K in Extract<keyof T, string>]: Required<T>[K] extends VendureEntity | null ? K : Required<T>[K] extends VendureEntity[] ? K : never;
|
|
25
25
|
}[Extract<keyof T, string>];
|
|
26
26
|
export declare type EntityRelations<T extends VendureEntity> = {
|
|
27
27
|
[K in EntityRelationKeys<T>]: T[K];
|
|
@@ -3,15 +3,18 @@ import { EntityIdStrategy } from './entity-id-strategy';
|
|
|
3
3
|
* @description
|
|
4
4
|
* An id strategy which uses string uuids as primary keys
|
|
5
5
|
* for all entities. This strategy can be configured with the
|
|
6
|
-
* `entityIdStrategy` property of the
|
|
6
|
+
* `entityIdStrategy` property of the `entityOptions` property
|
|
7
|
+
* of {@link VendureConfig}.
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```TypeScript
|
|
10
11
|
* import { UuidIdStrategy, VendureConfig } from '\@vendure/core';
|
|
11
12
|
*
|
|
12
13
|
* export const config: VendureConfig = {
|
|
13
|
-
*
|
|
14
|
-
*
|
|
14
|
+
* entityOptions: {
|
|
15
|
+
* entityIdStrategy: new UuidIdStrategy(),
|
|
16
|
+
* // ...
|
|
17
|
+
* }
|
|
15
18
|
* }
|
|
16
19
|
* ```
|
|
17
20
|
*
|
|
@@ -5,15 +5,18 @@ exports.UuidIdStrategy = void 0;
|
|
|
5
5
|
* @description
|
|
6
6
|
* An id strategy which uses string uuids as primary keys
|
|
7
7
|
* for all entities. This strategy can be configured with the
|
|
8
|
-
* `entityIdStrategy` property of the
|
|
8
|
+
* `entityIdStrategy` property of the `entityOptions` property
|
|
9
|
+
* of {@link VendureConfig}.
|
|
9
10
|
*
|
|
10
11
|
* @example
|
|
11
12
|
* ```TypeScript
|
|
12
13
|
* import { UuidIdStrategy, VendureConfig } from '\@vendure/core';
|
|
13
14
|
*
|
|
14
15
|
* export const config: VendureConfig = {
|
|
15
|
-
*
|
|
16
|
-
*
|
|
16
|
+
* entityOptions: {
|
|
17
|
+
* entityIdStrategy: new UuidIdStrategy(),
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
17
20
|
* }
|
|
18
21
|
* ```
|
|
19
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid-id-strategy.js","sourceRoot":"","sources":["../../../src/config/entity-id-strategy/uuid-id-strategy.ts"],"names":[],"mappings":";;;AAEA
|
|
1
|
+
{"version":3,"file":"uuid-id-strategy.js","sourceRoot":"","sources":["../../../src/config/entity-id-strategy/uuid-id-strategy.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,cAAc;IAA3B;QACa,mBAAc,GAAG,MAAM,CAAC;IAOrC,CAAC;IANG,QAAQ,CAAC,EAAU;QACf,OAAO,EAAE,CAAC;IACd,CAAC;IACD,QAAQ,CAAC,UAAkB;QACvB,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ;AARD,wCAQC"}
|
|
@@ -8,12 +8,31 @@ import { LoggerService } from '@nestjs/common';
|
|
|
8
8
|
export declare enum LogLevel {
|
|
9
9
|
/**
|
|
10
10
|
* @description
|
|
11
|
-
* Log Errors only.
|
|
11
|
+
* Log Errors only. These are usually indicative of some potentially
|
|
12
|
+
* serious issue, so should be acted upon.
|
|
12
13
|
*/
|
|
13
14
|
Error = 0,
|
|
15
|
+
/**
|
|
16
|
+
* @description
|
|
17
|
+
* Warnings indicate that some situation may require investigation
|
|
18
|
+
* and handling. But not as serious as an Error.
|
|
19
|
+
*/
|
|
14
20
|
Warn = 1,
|
|
21
|
+
/**
|
|
22
|
+
* @description
|
|
23
|
+
* Logs general information such as startup messages.
|
|
24
|
+
*/
|
|
15
25
|
Info = 2,
|
|
26
|
+
/**
|
|
27
|
+
* @description
|
|
28
|
+
* Logs additional information
|
|
29
|
+
*/
|
|
16
30
|
Verbose = 3,
|
|
31
|
+
/**
|
|
32
|
+
* @description
|
|
33
|
+
* Logs detailed info useful in debug scenarios, including stack traces for
|
|
34
|
+
* all errors. In production this would probably generate too much noise.
|
|
35
|
+
*/
|
|
17
36
|
Debug = 4
|
|
18
37
|
}
|
|
19
38
|
/**
|
|
@@ -11,20 +11,49 @@ var LogLevel;
|
|
|
11
11
|
(function (LogLevel) {
|
|
12
12
|
/**
|
|
13
13
|
* @description
|
|
14
|
-
* Log Errors only.
|
|
14
|
+
* Log Errors only. These are usually indicative of some potentially
|
|
15
|
+
* serious issue, so should be acted upon.
|
|
15
16
|
*/
|
|
16
17
|
LogLevel[LogLevel["Error"] = 0] = "Error";
|
|
18
|
+
/**
|
|
19
|
+
* @description
|
|
20
|
+
* Warnings indicate that some situation may require investigation
|
|
21
|
+
* and handling. But not as serious as an Error.
|
|
22
|
+
*/
|
|
17
23
|
LogLevel[LogLevel["Warn"] = 1] = "Warn";
|
|
24
|
+
/**
|
|
25
|
+
* @description
|
|
26
|
+
* Logs general information such as startup messages.
|
|
27
|
+
*/
|
|
18
28
|
LogLevel[LogLevel["Info"] = 2] = "Info";
|
|
29
|
+
/**
|
|
30
|
+
* @description
|
|
31
|
+
* Logs additional information
|
|
32
|
+
*/
|
|
19
33
|
LogLevel[LogLevel["Verbose"] = 3] = "Verbose";
|
|
34
|
+
/**
|
|
35
|
+
* @description
|
|
36
|
+
* Logs detailed info useful in debug scenarios, including stack traces for
|
|
37
|
+
* all errors. In production this would probably generate too much noise.
|
|
38
|
+
*/
|
|
20
39
|
LogLevel[LogLevel["Debug"] = 4] = "Debug";
|
|
21
40
|
})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
|
|
22
41
|
const noopLogger = {
|
|
23
|
-
error() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
error() {
|
|
43
|
+
/* */
|
|
44
|
+
},
|
|
45
|
+
warn() {
|
|
46
|
+
/* */
|
|
47
|
+
},
|
|
48
|
+
info() {
|
|
49
|
+
/* */
|
|
50
|
+
},
|
|
51
|
+
verbose() {
|
|
52
|
+
/* */
|
|
53
|
+
},
|
|
54
|
+
debug() {
|
|
55
|
+
/* */
|
|
56
|
+
},
|
|
28
57
|
};
|
|
29
58
|
/**
|
|
30
59
|
* @description
|