@chevre/domain 24.0.0-alpha.1 → 24.0.0-alpha.11

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.
Files changed (184) hide show
  1. package/lib/chevre/repo/acceptedPaymentMethod.js +1 -1
  2. package/lib/chevre/repo/additionalProperty.js +1 -1
  3. package/lib/chevre/repo/aggregateOffer.js +1 -1
  4. package/lib/chevre/repo/confirmationNumber.js +2 -4
  5. package/lib/chevre/repo/creativeWork.js +1 -1
  6. package/lib/chevre/repo/eventOffer.js +1 -1
  7. package/lib/chevre/repo/eventSeries.js +1 -1
  8. package/lib/chevre/repo/identity.js +1 -2
  9. package/lib/chevre/repo/issuer.js +2 -4
  10. package/lib/chevre/repo/message.js +1 -1
  11. package/lib/chevre/repo/mongoose/schemas/transaction.js +31 -0
  12. package/lib/chevre/repo/note.js +1 -1
  13. package/lib/chevre/repo/noteAboutOrder.js +1 -1
  14. package/lib/chevre/repo/offer/unitPriceInCatalog.js +1 -1
  15. package/lib/chevre/repo/offerItemCondition.js +1 -1
  16. package/lib/chevre/repo/order.js +1 -1
  17. package/lib/chevre/repo/orderInTransaction.d.ts +8 -0
  18. package/lib/chevre/repo/orderInTransaction.js +17 -4
  19. package/lib/chevre/repo/orderNumber.d.ts +3 -2
  20. package/lib/chevre/repo/orderNumber.js +25 -32
  21. package/lib/chevre/repo/place/movieTheater.js +1 -1
  22. package/lib/chevre/repo/place/seat.js +1 -1
  23. package/lib/chevre/repo/product.js +1 -1
  24. package/lib/chevre/repo/productOffer.js +1 -1
  25. package/lib/chevre/repo/project.js +1 -1
  26. package/lib/chevre/repo/reservation.js +1 -1
  27. package/lib/chevre/repo/role.js +1 -2
  28. package/lib/chevre/repo/seller.js +1 -1
  29. package/lib/chevre/repo/serviceOutputIdentifier.js +2 -4
  30. package/lib/chevre/repo/transaction/placeOrder.d.ts +140 -0
  31. package/lib/chevre/repo/transaction/placeOrder.js +528 -0
  32. package/lib/chevre/repo/transaction/returnOrder.d.ts +23 -0
  33. package/lib/chevre/repo/transaction/returnOrder.js +213 -0
  34. package/lib/chevre/repo/transaction.d.ts +11 -84
  35. package/lib/chevre/repo/transaction.js +331 -270
  36. package/lib/chevre/repo/transactionNumber.js +2 -4
  37. package/lib/chevre/repo/trip.js +1 -2
  38. package/lib/chevre/repository.d.ts +12 -0
  39. package/lib/chevre/repository.js +26 -1
  40. package/lib/chevre/service/account.js +14 -21
  41. package/lib/chevre/service/accountTransaction/deposit.js +2 -8
  42. package/lib/chevre/service/accountTransaction/transfer.js +2 -8
  43. package/lib/chevre/service/accountTransaction/withdraw.js +2 -8
  44. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +24 -32
  45. package/lib/chevre/service/assetTransaction/cancelReservationCOA.js +2 -4
  46. package/lib/chevre/service/assetTransaction/moneyTransfer.js +2 -23
  47. package/lib/chevre/service/assetTransaction/pay/check.js +6 -11
  48. package/lib/chevre/service/assetTransaction/pay/confirm.js +1 -2
  49. package/lib/chevre/service/assetTransaction/pay/searchGMOTrade.d.ts +1 -1
  50. package/lib/chevre/service/assetTransaction/pay/start/factory.d.ts +51 -3
  51. package/lib/chevre/service/assetTransaction/pay/start/factory.js +58 -21
  52. package/lib/chevre/service/assetTransaction/pay/start/preStart/fixPaymentService.d.ts +10 -0
  53. package/lib/chevre/service/assetTransaction/pay/start/preStart/fixPaymentService.js +88 -0
  54. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +53 -0
  55. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.js +56 -0
  56. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -1
  57. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.js +1 -11
  58. package/lib/chevre/service/assetTransaction/pay/start.js +8 -132
  59. package/lib/chevre/service/assetTransaction/refund.js +13 -20
  60. package/lib/chevre/service/assetTransaction/registerService.js +1 -7
  61. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateIssuedOfferIfExists.js +2 -4
  62. package/lib/chevre/service/assetTransaction/reserveCOA.js +2 -4
  63. package/lib/chevre/service/delivery/product/factory.js +1 -2
  64. package/lib/chevre/service/delivery/reservation/factory.js +1 -2
  65. package/lib/chevre/service/event/saveScreeningEvents.js +1 -0
  66. package/lib/chevre/service/event.js +0 -1
  67. package/lib/chevre/service/moneyTransfer.js +2 -2
  68. package/lib/chevre/service/notification/factory.js +1 -1
  69. package/lib/chevre/service/notification/notifyByEmail.js +50 -56
  70. package/lib/chevre/service/notification/sendEmailMessage.js +2 -3
  71. package/lib/chevre/service/notification/triggerWebhook.js +32 -37
  72. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.js +1 -2
  73. package/lib/chevre/service/offer/event/authorize.d.ts +2 -2
  74. package/lib/chevre/service/offer/event/authorize.js +4 -4
  75. package/lib/chevre/service/offer/event/issueEventOfferTicket.d.ts +2 -2
  76. package/lib/chevre/service/offer/event/issueEventOfferTicket.js +1 -1
  77. package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +0 -2
  78. package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.js +1 -0
  79. package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -2
  80. package/lib/chevre/service/offer/event/voidTransaction.js +2 -2
  81. package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +2 -2
  82. package/lib/chevre/service/offer/event/voidTransactionByActionId.js +2 -2
  83. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.js +1 -2
  84. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.d.ts +2 -2
  85. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +6 -6
  86. package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +2 -2
  87. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +3 -10
  88. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +2 -2
  89. package/lib/chevre/service/offer/moneyTransfer/authorize.d.ts +2 -2
  90. package/lib/chevre/service/offer/moneyTransfer/authorize.js +53 -57
  91. package/lib/chevre/service/offer/moneyTransfer/voidTransaction.d.ts +2 -2
  92. package/lib/chevre/service/offer/moneyTransfer/voidTransaction.js +4 -1
  93. package/lib/chevre/service/offer/product.d.ts +3 -3
  94. package/lib/chevre/service/offer/product.js +4 -4
  95. package/lib/chevre/service/order/confirmPayTransaction.d.ts +0 -2
  96. package/lib/chevre/service/order/confirmPayTransaction.js +1 -0
  97. package/lib/chevre/service/order/findPlaceOrderTransaction.d.ts +2 -2
  98. package/lib/chevre/service/order/findPlaceOrderTransaction.js +1 -1
  99. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +4 -4
  100. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +10 -19
  101. package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled.js +1 -1
  102. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +1 -1
  103. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +1 -1
  104. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.d.ts +2 -2
  105. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
  106. package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.js +1 -1
  107. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +1 -1
  108. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +1 -1
  109. package/lib/chevre/service/order/onOrderUpdated.js +1 -2
  110. package/lib/chevre/service/order/payOrder.d.ts +2 -2
  111. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +2 -2
  112. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +2 -3
  113. package/lib/chevre/service/order/placeOrder.d.ts +2 -2
  114. package/lib/chevre/service/order/returnOrder.d.ts +2 -2
  115. package/lib/chevre/service/order/returnOrder.js +2 -2
  116. package/lib/chevre/service/order/sendOrder.d.ts +2 -2
  117. package/lib/chevre/service/order/sendOrder.js +1 -1
  118. package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +3 -3
  119. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +3 -3
  120. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +1 -1
  121. package/lib/chevre/service/payment/any/fixOrderAsNeeded.d.ts +2 -2
  122. package/lib/chevre/service/payment/any/fixOrderAsNeeded.js +4 -8
  123. package/lib/chevre/service/payment/any/publishPaymentUrl/fixTransactionNumberOnPublishPaymentUrl.d.ts +2 -2
  124. package/lib/chevre/service/payment/any.d.ts +6 -6
  125. package/lib/chevre/service/payment/any.js +10 -11
  126. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +1 -2
  127. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard3ds.d.ts +1 -1
  128. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard3ds.js +1 -2
  129. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard3dsResult2recipe.d.ts +1 -1
  130. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCardResult2recipe.d.ts +1 -1
  131. package/lib/chevre/service/payment/creditCard/factory.d.ts +1 -1
  132. package/lib/chevre/service/payment/movieTicket/authorize.js +1 -1
  133. package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.js +2 -4
  134. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +4 -6
  135. package/lib/chevre/service/payment/movieTicket/voidTransaction.js +1 -2
  136. package/lib/chevre/service/payment/paymentCard.js +2 -4
  137. package/lib/chevre/service/report/telemetry.d.ts +4 -0
  138. package/lib/chevre/service/report/telemetry.js +7 -12
  139. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +2 -6
  140. package/lib/chevre/service/task/acceptCOAOffer.js +6 -4
  141. package/lib/chevre/service/task/authorizePayment.js +4 -2
  142. package/lib/chevre/service/task/confirmPayTransaction.js +2 -2
  143. package/lib/chevre/service/task/confirmReserveTransaction.js +1 -2
  144. package/lib/chevre/service/task/deleteTransaction.js +5 -1
  145. package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +4 -2
  146. package/lib/chevre/service/task/onOrderPaymentCompleted.js +2 -2
  147. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByProduct.js +3 -6
  148. package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +1 -1
  149. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +1 -1
  150. package/lib/chevre/service/task/pay.js +1 -2
  151. package/lib/chevre/service/task/placeOrder.js +6 -4
  152. package/lib/chevre/service/task/publishPaymentUrl.js +4 -2
  153. package/lib/chevre/service/task/returnOrder.js +4 -4
  154. package/lib/chevre/service/task/returnPayTransaction.js +4 -3
  155. package/lib/chevre/service/task/sendOrder.js +2 -2
  156. package/lib/chevre/service/task/voidMoneyTransferTransaction.js +6 -3
  157. package/lib/chevre/service/task/voidPayTransaction.js +4 -2
  158. package/lib/chevre/service/task/voidRegisterServiceTransaction.js +3 -3
  159. package/lib/chevre/service/task/voidReserveTransaction.js +5 -4
  160. package/lib/chevre/service/transaction/deleteTransaction.d.ts +4 -0
  161. package/lib/chevre/service/transaction/deleteTransaction.js +57 -15
  162. package/lib/chevre/service/transaction/moneyTransfer.js +15 -23
  163. package/lib/chevre/service/transaction/placeOrder/confirm/publishCode.js +1 -1
  164. package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +2 -2
  165. package/lib/chevre/service/transaction/placeOrder/confirm.js +12 -13
  166. package/lib/chevre/service/transaction/placeOrder/exportTasksById.d.ts +2 -2
  167. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +1 -1
  168. package/lib/chevre/service/transaction/placeOrder/{publishOrderNumberIfNotExist.d.ts → issueOrderNumberIfNotExist.d.ts} +4 -4
  169. package/lib/chevre/service/transaction/placeOrder/{publishOrderNumberIfNotExist.js → issueOrderNumberIfNotExist.js} +21 -13
  170. package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.d.ts +2 -2
  171. package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.js +3 -3
  172. package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.js +1 -2
  173. package/lib/chevre/service/transaction/placeOrder/start.d.ts +3 -3
  174. package/lib/chevre/service/transaction/placeOrder/start.js +2 -2
  175. package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +23 -0
  176. package/lib/chevre/service/transaction/placeOrder/updateAgent.js +126 -0
  177. package/lib/chevre/service/transaction/placeOrder.d.ts +2 -1
  178. package/lib/chevre/service/transaction/placeOrder.js +3 -1
  179. package/lib/chevre/service/transaction/returnOrder/potentialActions.js +1 -2
  180. package/lib/chevre/service/transaction/returnOrder/preStart/getReturnPolicyByProject.js +1 -1
  181. package/lib/chevre/service/transaction/returnOrder.js +4 -4
  182. package/lib/chevre/service/transaction.d.ts +5 -21
  183. package/lib/chevre/service/transaction.js +5 -111
  184. package/package.json +6 -18
@@ -1,4 +1,8 @@
1
1
  "use strict";
2
+ /**
3
+ * 取引サービス
4
+ */
5
+ // import { PhoneNumberFormat, PhoneNumberUtil } from 'google-libphonenumber';
2
6
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
7
  if (k2 === undefined) k2 = k;
4
8
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -24,127 +28,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
28
  };
25
29
  Object.defineProperty(exports, "__esModule", { value: true });
26
30
  exports.deleteTransaction = exports.returnOrder = exports.placeOrder = exports.moneyTransfer = void 0;
27
- exports.updateAgent = updateAgent;
28
31
  exports.exportOneTransactionTasksIfExists = exportOneTransactionTasksIfExists;
29
- /**
30
- * 取引サービス
31
- */
32
- const google_libphonenumber_1 = require("google-libphonenumber");
33
32
  const factory = __importStar(require("../factory"));
34
33
  const deleteTransaction_1 = require("./transaction/deleteTransaction");
35
34
  Object.defineProperty(exports, "deleteTransaction", { enumerable: true, get: function () { return deleteTransaction_1.deleteTransaction; } });
36
35
  const MoneyTransferTransactionService = __importStar(require("./transaction/moneyTransfer"));
37
36
  const PlaceOrderTransactionService = __importStar(require("./transaction/placeOrder"));
38
- const publishOrderNumberIfNotExist_1 = require("./transaction/placeOrder/publishOrderNumberIfNotExist");
37
+ // import { issueOrderNumberIfNotExist } from './transaction/placeOrder/issueOrderNumberIfNotExist';
39
38
  const ReturnOrderTransactionService = __importStar(require("./transaction/returnOrder"));
40
39
  exports.moneyTransfer = MoneyTransferTransactionService;
41
40
  exports.placeOrder = PlaceOrderTransactionService;
42
41
  exports.returnOrder = ReturnOrderTransactionService;
43
- function fixCustomer(params) {
44
- return async (repos) => {
45
- let formattedTelephone;
46
- try {
47
- const phoneUtil = google_libphonenumber_1.PhoneNumberUtil.getInstance();
48
- const phoneNumber = phoneUtil.parse(params.agent.telephone, params.agent.telephoneRegion);
49
- if (!phoneUtil.isValidNumber(phoneNumber)) {
50
- throw new factory.errors.Argument('telephone', 'Invalid phone number');
51
- }
52
- formattedTelephone = phoneUtil.format(phoneNumber, google_libphonenumber_1.PhoneNumberFormat.E164);
53
- }
54
- catch (error) {
55
- throw new factory.errors.Argument('telephone', error.message);
56
- }
57
- const transaction = await repos.transaction.projectFieldsInProgressById({
58
- typeOf: params.typeOf,
59
- id: params.id
60
- }, ['agent', 'object', 'typeOf', 'project']);
61
- if (transaction.agent.id !== params.agent.id) {
62
- throw new factory.errors.Forbidden('Transaction not yours');
63
- }
64
- // 注文取引の場合、object.customerにも適用
65
- let customer;
66
- if (transaction.typeOf === factory.transactionType.PlaceOrder) {
67
- // いったんtransaction.object.customer?.typeOfは取引開始時にセットされている前提
68
- const trasactionObject = transaction.object;
69
- if (typeof trasactionObject.customer?.typeOf === 'string') {
70
- customer = {
71
- typeOf: trasactionObject.customer.typeOf,
72
- id: trasactionObject.customer.id,
73
- ...(Array.isArray(trasactionObject.customer.identifier))
74
- ? { identifier: trasactionObject.customer.identifier }
75
- : /* istanbul ignore next */ undefined,
76
- // discontinue(2024-05-16~)
77
- // ...(transaction.object.customer.typeOf === factory.personType.Person
78
- // && typeof transaction.object.customer.memberOf?.typeOf === 'string')
79
- // ? { memberOf: transaction.object.customer.memberOf }
80
- // : undefined,
81
- ...(Array.isArray(params.agent.additionalProperty))
82
- ? { additionalProperty: params.agent.additionalProperty }
83
- : /* istanbul ignore next */ undefined,
84
- ...(typeof params.agent.age === 'string') ? { age: params.agent.age }
85
- : /* istanbul ignore next */ undefined,
86
- ...(typeof params.agent.address === 'string') ? { address: params.agent.address }
87
- : /* istanbul ignore next */ undefined,
88
- ...(typeof params.agent.email === 'string') ? { email: params.agent.email }
89
- : /* istanbul ignore next */ undefined,
90
- ...(typeof params.agent.familyName === 'string') ? { familyName: params.agent.familyName }
91
- : /* istanbul ignore next */ undefined,
92
- ...(typeof params.agent.gender === 'string') ? { gender: params.agent.gender }
93
- : /* istanbul ignore next */ undefined,
94
- ...(typeof params.agent.givenName === 'string') ? { givenName: params.agent.givenName }
95
- : /* istanbul ignore next */ undefined,
96
- ...(typeof params.agent.name === 'string') ? { name: params.agent.name } : /* istanbul ignore next */ undefined,
97
- ...(typeof formattedTelephone === 'string') ? { telephone: formattedTelephone } : /* istanbul ignore next */ undefined,
98
- ...(typeof params.agent.url === 'string') ? { url: params.agent.url } : /* istanbul ignore next */ undefined
99
- };
100
- }
101
- }
102
- return { customer, transaction };
103
- };
104
- }
105
- /**
106
- * 取引人プロフィール更新
107
- */
108
- function updateAgent(params) {
109
- return async (repos) => {
110
- const { customer, transaction } = await fixCustomer(params)(repos);
111
- // const newAgent: Pick<factory.transaction.placeOrder.IAgent, 'id'> = {
112
- // id: transaction.agent.id
113
- // };
114
- // discontinue saving in transaction(2024-06-24~)
115
- // await repos.transaction.updateAgent({
116
- // typeOf: params.typeOf,
117
- // id: params.id,
118
- // agent: newAgent,
119
- // ...(customer !== undefined) ? { object: { customer } } : undefined
120
- // });
121
- // also save in orderInTransaction(2024-06-20~)
122
- if (customer !== undefined) {
123
- const orderNumber = await (0, publishOrderNumberIfNotExist_1.publishOrderNumberIfNotExist)({
124
- project: { id: transaction.project.id },
125
- id: params.id,
126
- object: { orderDate: new Date() }
127
- })(repos);
128
- const customerName = (typeof customer.name === 'string' && customer.name !== '')
129
- ? customer.name
130
- : (typeof customer.givenName === 'string' && typeof customer.familyName === 'string'
131
- && customer.givenName !== '' && customer.familyName !== '')
132
- ? `${customer.givenName} ${customer.familyName}`
133
- : undefined;
134
- const customerInOrder = {
135
- ...customer,
136
- identifier: (Array.isArray(customer.identifier)) ? customer.identifier : [],
137
- ...(typeof customerName === 'string') ? { name: customerName } : undefined
138
- };
139
- await repos.orderInTransaction.setCustomer({
140
- orderNumber,
141
- project: transaction.project,
142
- customer: customerInOrder
143
- });
144
- }
145
- // return newAgent;
146
- };
147
- }
148
42
  function exportOneTransactionTasksIfExists(params) {
149
43
  return async (repos) => {
150
44
  const transaction = await repos.transaction.startExportTasks({
package/package.json CHANGED
@@ -41,33 +41,23 @@
41
41
  "@types/json2csv": "^4.5.1",
42
42
  "@types/jsonwebtoken": "9.0.1",
43
43
  "@types/lodash.difference": "^4.5.6",
44
- "@types/mocha": "10.0.7",
45
44
  "@types/moment-timezone": "^0.5.30",
46
45
  "@types/node": "22.19.7",
47
- "@types/power-assert": "^1.5.3",
48
46
  "@types/pug": "2.0.10",
49
- "@types/sinon": "^4.3.3",
50
- "@types/sinon-mongoose": "^1.3.11",
51
47
  "@types/uniqid": "^4.1.3",
52
48
  "@types/uuid": "^3.4.10",
53
49
  "@vitest/coverage-v8": "4.0.18",
54
- "coveralls": "^3.1.0",
50
+ "@vitest/ui": "4.0.18",
55
51
  "csvtojson": "^2.0.10",
56
52
  "dependency-cruiser": "17.3.8",
57
53
  "eslint": "9.39.2",
58
54
  "googleapis": "^85.0.0",
59
55
  "jose": "6.0.12",
60
56
  "json2csv": "4.5.4",
61
- "mocha": "10.6.0",
62
57
  "mongoose": "8.0.4",
63
- "nyc": "17.0.0",
64
- "power-assert": "^1.6.1",
65
58
  "redis": "4.6.5",
66
59
  "rimraf": "^2.7.1",
67
- "sinon": "4.5.0",
68
- "sinon-mongoose": "^2.3.0",
69
60
  "size-limit": "12.0.0",
70
- "ts-node": "^10.9.1",
71
61
  "typescript": "5.6.3",
72
62
  "typescript-eslint": "8.55.0",
73
63
  "vitest": "4.0.18"
@@ -95,21 +85,19 @@
95
85
  "scripts": {
96
86
  "build": "tsc",
97
87
  "build:example": "tsc --watch --project tsconfig.example.json --declaration false",
88
+ "check:all": "npm run clean && npm run build && npm run depcruise && npm run size && npm test",
98
89
  "clean": "rimraf ./lib \"npm-debug.log*\" ./doc ./coverage ./.nyc_output ./example/dst",
99
90
  "depcruise": "depcruise src",
100
91
  "doc": "echo \"implementing...\" && exit 0",
101
92
  "eslint": "eslint \"src/**/*.ts\"",
102
- "mocha": "mocha",
103
- "nyc": "nyc mocha \"src/**/*.spec.ts\"",
104
- "coverage:nyc": "npm run nyc && nyc report --reporter=text-lcov | coveralls",
105
93
  "coverage": "vitest run --coverage",
106
- "test": "npm run eslint && npm run coverage && npm run coverage:nyc",
107
- "preversion": "npm run clean && npm run build && npm run depcruise && npm run size && npm test",
94
+ "test": "npm run eslint && npm run coverage",
95
+ "preversion": "npm run check:all",
108
96
  "size": "size-limit",
109
97
  "version": "git add -A",
110
98
  "vitest": "vitest",
111
99
  "postversion": "git push origin --tags",
112
- "prepublishOnly": "npm run clean && npm run build && npm run depcruise && npm run size && npm test"
100
+ "prepublishOnly": "npm run clean && npm run build"
113
101
  },
114
- "version": "24.0.0-alpha.1"
102
+ "version": "24.0.0-alpha.11"
115
103
  }