diff --git a/.gas-snapshot b/.gas-snapshot index 02903eb7..588c1c80 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,149 +1,151 @@ -IntegrationTestCaveats:testOriginateUnapprovedFulfiller() (gas: 327624) -IntegrationTestCaveats:testOriginateWBorrowerApproval() (gas: 280970) -IntegrationTestCaveats:testOriginateWCaveatsAsBorrower() (gas: 303325) -IntegrationTestCaveats:testOriginateWCaveatsExpired() (gas: 157308) -IntegrationTestCaveats:testOriginateWCaveatsIncrementedNonce() (gas: 166084) -IntegrationTestCaveats:testOriginateWCaveatsInvalidSalt() (gas: 281247) -IntegrationTestCaveats:testOriginateWCaveatsInvalidSaltManual() (gas: 140102) -IntegrationTestCaveats:testOriginateWLenderApproval() (gas: 281090) -IntegrationTestCaveats:testRefinanceAsLender() (gas: 1043242) -IntegrationTestCaveats:testRefinanceCaveatFailure() (gas: 395401) -IntegrationTestCaveats:testRefinanceLoanStartAtBlockTimestampInvalidLoan() (gas: 342994) -IntegrationTestCaveats:testRefinanceUnapprovedFulfiller() (gas: 443655) -IntegrationTestCaveats:testRefinanceWCaveatsInvalidSalt() (gas: 364806) -IntegrationTestCaveats:testRefinanceWLenderApproval() (gas: 392379) -ModuleTesting:testFixedTermDutchAuctionSettlement() (gas: 433650) -ModuleTesting:testFixedTermDutchAuctionSettlementGetSettlementAuctionExpired() (gas: 436428) -ModuleTesting:testFixedTermDutchAuctionSettlementNotValid() (gas: 432662) -ModuleTesting:testFixedTermDutchAuctionSettlementValid() (gas: 433461) -ModuleTesting:testModuleValidation() (gas: 1269849) +IntegrationTestCaveats:testInvalidCaveatLength() (gas: 129810) +IntegrationTestCaveats:testInvalidCaveats() (gas: 160219) +IntegrationTestCaveats:testOriginateUnapprovedFulfiller() (gas: 328514) +IntegrationTestCaveats:testOriginateWBorrowerApproval() (gas: 281461) +IntegrationTestCaveats:testOriginateWCaveatsAsBorrower() (gas: 303825) +IntegrationTestCaveats:testOriginateWCaveatsExpired() (gas: 157462) +IntegrationTestCaveats:testOriginateWCaveatsIncrementedNonce() (gas: 166238) +IntegrationTestCaveats:testOriginateWCaveatsInvalidSalt() (gas: 281796) +IntegrationTestCaveats:testOriginateWCaveatsInvalidSaltManual() (gas: 140103) +IntegrationTestCaveats:testOriginateWLenderApproval() (gas: 281581) +IntegrationTestCaveats:testRefinanceAsLender() (gas: 1050901) +IntegrationTestCaveats:testRefinanceCaveatFailure() (gas: 403207) +IntegrationTestCaveats:testRefinanceLoanStartAtBlockTimestampInvalidLoan() (gas: 343993) +IntegrationTestCaveats:testRefinanceUnapprovedFulfiller() (gas: 451821) +IntegrationTestCaveats:testRefinanceWCaveatsInvalidSalt() (gas: 372503) +IntegrationTestCaveats:testRefinanceWLenderApproval() (gas: 400060) +ModuleTesting:testFixedTermDutchAuctionSettlement() (gas: 434400) +ModuleTesting:testFixedTermDutchAuctionSettlementGetSettlementAuctionExpired() (gas: 437289) +ModuleTesting:testFixedTermDutchAuctionSettlementNotValid() (gas: 433412) +ModuleTesting:testFixedTermDutchAuctionSettlementValid() (gas: 434211) +ModuleTesting:testModuleValidation() (gas: 1270599) PausableNonReentrantImpl:test() (gas: 2442) PausableNonReentrantImpl:testReentrancy() (gas: 2735) -TestBorrowerEnforcer:testBERevertAdditionalTransfersFromBorrower() (gas: 76406) -TestBorrowerEnforcer:testBERevertInvalidLoanTerms() (gas: 81104) -TestBorrowerEnforcer:testBEValidLoanTerms() (gas: 72121) -TestBorrowerEnforcer:testBEValidLoanTermsAnyIssuer() (gas: 72185) -TestCustodian:testCannotLazyMintTwice() (gas: 78759) -TestCustodian:testCannotMintInvalidLoanInvalidCustodian() (gas: 69177) -TestCustodian:testCannotMintInvalidLoanValidCustodian() (gas: 74540) -TestCustodian:testCustodySelector() (gas: 2861691) -TestCustodian:testDefaultCustodySelectorRevert() (gas: 72370) -TestCustodian:testGenerateOrderInvalidPostRepayment() (gas: 172963) -TestCustodian:testGenerateOrderInvalidPostSettlement() (gas: 163108) -TestCustodian:testGenerateOrderRepay() (gas: 177118) -TestCustodian:testGenerateOrderRepayAsRepayApprovedBorrower() (gas: 193587) -TestCustodian:testGenerateOrderRepayERC1155AndERC20() (gas: 868811) -TestCustodian:testGenerateOrderRepayERC1155AndERC20HandlerAuthorized() (gas: 798450) -TestCustodian:testGenerateOrderRepayInvalidHookAddress() (gas: 97618) -TestCustodian:testGenerateOrderRepayInvalidHookReturnType() (gas: 91957) -TestCustodian:testGenerateOrderRepayNotBorrower() (gas: 106834) -TestCustodian:testGenerateOrderSettlement() (gas: 154819) -TestCustodian:testGenerateOrderSettlementHandlerAuthorized() (gas: 160216) -TestCustodian:testGenerateOrderSettlementNoActiveLoan() (gas: 163303) -TestCustodian:testGenerateOrderSettlementUnauthorized() (gas: 101786) -TestCustodian:testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() (gas: 458567) +TestBorrowerEnforcer:testBERevertAdditionalTransfersFromBorrower() (gas: 76462) +TestBorrowerEnforcer:testBERevertInvalidLoanTerms() (gas: 81160) +TestBorrowerEnforcer:testBEValidLoanTerms() (gas: 72257) +TestBorrowerEnforcer:testBEValidLoanTermsAnyIssuer() (gas: 72321) +TestCustodian:testCannotLazyMintTwice() (gas: 78694) +TestCustodian:testCannotMintInvalidLoanInvalidCustodian() (gas: 69119) +TestCustodian:testCannotMintInvalidLoanValidCustodian() (gas: 74475) +TestCustodian:testCustodySelector() (gas: 2860833) +TestCustodian:testDefaultCustodySelectorRevert() (gas: 72312) +TestCustodian:testGenerateOrderInvalidPostRepayment() (gas: 173056) +TestCustodian:testGenerateOrderInvalidPostSettlement() (gas: 163179) +TestCustodian:testGenerateOrderRepay() (gas: 177211) +TestCustodian:testGenerateOrderRepayAsRepayApprovedBorrower() (gas: 193680) +TestCustodian:testGenerateOrderRepayERC1155AndERC20() (gas: 869753) +TestCustodian:testGenerateOrderRepayERC1155AndERC20HandlerAuthorized() (gas: 799392) +TestCustodian:testGenerateOrderRepayInvalidHookAddress() (gas: 97601) +TestCustodian:testGenerateOrderRepayInvalidHookReturnType() (gas: 91962) +TestCustodian:testGenerateOrderRepayNotBorrower() (gas: 106839) +TestCustodian:testGenerateOrderSettlement() (gas: 154912) +TestCustodian:testGenerateOrderSettlementHandlerAuthorized() (gas: 160309) +TestCustodian:testGenerateOrderSettlementNoActiveLoan() (gas: 163396) +TestCustodian:testGenerateOrderSettlementUnauthorized() (gas: 101791) +TestCustodian:testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() (gas: 458950) TestCustodian:testGetBorrower() (gas: 78619) -TestCustodian:testInvalidAction() (gas: 173408) -TestCustodian:testInvalidActionRepayInActiveLoan() (gas: 130072) -TestCustodian:testInvalidActionSettleActiveLoan() (gas: 130010) -TestCustodian:testInvalidEncodedData() (gas: 26160) -TestCustodian:testMintWithApprovalSetAsBorrower() (gas: 360249) +TestCustodian:testInvalidAction() (gas: 173156) +TestCustodian:testInvalidActionRepayInActiveLoan() (gas: 130040) +TestCustodian:testInvalidActionSettleActiveLoan() (gas: 130000) +TestCustodian:testInvalidEncodedData() (gas: 26170) +TestCustodian:testMintWithApprovalSetAsBorrower() (gas: 360620) TestCustodian:testMintWithApprovalSetAsBorrowerInvalidLoan() (gas: 60792) -TestCustodian:testMintWithApprovalSetNotAuthorized() (gas: 76655) +TestCustodian:testMintWithApprovalSetNotAuthorized() (gas: 76679) TestCustodian:testName() (gas: 7099) -TestCustodian:testNonPayableFunctions() (gas: 215289) +TestCustodian:testNonPayableFunctions() (gas: 215173) TestCustodian:testOnlySeaport() (gas: 17918) -TestCustodian:testPreviewOrderNoActiveLoan() (gas: 105734) -TestCustodian:testPreviewOrderRepay() (gas: 230014) -TestCustodian:testPreviewOrderSettlement() (gas: 191706) -TestCustodian:testPreviewOrderSettlementInvalidFufliller() (gas: 108185) -TestCustodian:testPreviewOrderSettlementInvalidRepayer() (gas: 116912) -TestCustodian:testRatifyOrder() (gas: 183939) +TestCustodian:testPreviewOrderNoActiveLoan() (gas: 105719) +TestCustodian:testPreviewOrderRepay() (gas: 230092) +TestCustodian:testPreviewOrderSettlement() (gas: 191784) +TestCustodian:testPreviewOrderSettlementInvalidFufliller() (gas: 108170) +TestCustodian:testPreviewOrderSettlementInvalidRepayer() (gas: 116897) +TestCustodian:testRatifyOrder() (gas: 184032) TestCustodian:testSeaportMetadata() (gas: 8610) TestCustodian:testSupportsInterface() (gas: 9428) TestCustodian:testSymbol() (gas: 7105) -TestCustodian:testTokenURI() (gas: 67060) -TestCustodian:testTokenURIInvalidLoan() (gas: 13173) -TestLenderEnforcer:testLERevertAdditionalTransfersFromLender() (gas: 76310) -TestLenderEnforcer:testLERevertInvalidLoanTerms() (gas: 81062) -TestLenderEnforcer:testLEValidLoanTerms() (gas: 72055) -TestLenderEnforcer:testLEValidLoanTermsAnyBorrower() (gas: 72098) -TestLenderEnforcer:testLEValidLoanTermsWithAdditionalTransfers() (gas: 73410) -TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 587455) -TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 594668) -TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 585698) -TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 575581) -TestNewLoan:testBuyNowPayLater() (gas: 2869462) +TestCustodian:testTokenURI() (gas: 67002) +TestCustodian:testTokenURIInvalidLoan() (gas: 13151) +TestLenderEnforcer:testLERevertAdditionalTransfersFromLender() (gas: 76455) +TestLenderEnforcer:testLERevertInvalidLoanTerms() (gas: 81096) +TestLenderEnforcer:testLEValidLoanTerms() (gas: 72169) +TestLenderEnforcer:testLEValidLoanTermsAnyBorrower() (gas: 72323) +TestLenderEnforcer:testLEValidLoanTermsWithAdditionalTransfers() (gas: 73525) +TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 588317) +TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 595508) +TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 586515) +TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 576421) +TestNewLoan:testBuyNowPayLater() (gas: 2870260) TestNewLoan:testInvalidSenderBNPL() (gas: 1613098) TestNewLoan:testInvalidUserDataHashBNPL() (gas: 1615699) -TestNewLoan:testNewLoanAs1271ProxyAccountSender() (gas: 861629) -TestNewLoan:testNewLoanAs1271ProxyAccountThirdPartyFiller() (gas: 871336) -TestNewLoan:testNewLoanERC721CollateralDefaultTerms2() (gas: 425140) -TestNewLoan:testNewLoanRefinance() (gas: 577637) -TestNewLoan:testNewLoanViaOriginatorBorrowerApprovalAndLenderApproval() (gas: 325524) -TestNewLoan:testNewLoanViaOriginatorLenderApproval() (gas: 382131) -TestNewLoan:testSettleLoan() (gas: 636767) -TestPausableNonReentrant:testNotOwner() (gas: 21276) -TestPausableNonReentrant:testPauseAndUnpause() (gas: 22577) +TestNewLoan:testNewLoanAs1271ProxyAccountSender() (gas: 862007) +TestNewLoan:testNewLoanAs1271ProxyAccountThirdPartyFiller() (gas: 872108) +TestNewLoan:testNewLoanERC721CollateralDefaultTerms2() (gas: 425912) +TestNewLoan:testNewLoanRefinance() (gas: 585543) +TestNewLoan:testNewLoanViaOriginatorBorrowerApprovalAndLenderApproval() (gas: 325568) +TestNewLoan:testNewLoanViaOriginatorLenderApproval() (gas: 382537) +TestNewLoan:testSettleLoan() (gas: 637627) +TestPausableNonReentrant:testNotOwner() (gas: 21254) +TestPausableNonReentrant:testPauseAndUnpause() (gas: 22555) TestPausableNonReentrant:testReentrancy() (gas: 15360) -TestPausableNonReentrant:testUnpauseWhenNotPaused() (gas: 12604) -TestRepayLoan:testRepayLoanApprovedRepayer() (gas: 659008) -TestRepayLoan:testRepayLoanBase() (gas: 595240) -TestRepayLoan:testRepayLoanGenerateOrderNotSeaport() (gas: 434282) -TestRepayLoan:testRepayLoanInSettlement() (gas: 580825) -TestRepayLoan:testRepayLoanInvalidRepayer() (gas: 599254) -TestRepayLoan:testRepayLoanThatDoesNotExist() (gas: 853653) +TestPausableNonReentrant:testUnpauseWhenNotPaused() (gas: 12582) +TestRepayLoan:testRepayLoanApprovedRepayer() (gas: 659819) +TestRepayLoan:testRepayLoanBase() (gas: 596080) +TestRepayLoan:testRepayLoanGenerateOrderNotSeaport() (gas: 435054) +TestRepayLoan:testRepayLoanInSettlement() (gas: 581577) +TestRepayLoan:testRepayLoanInvalidRepayer() (gas: 600006) +TestRepayLoan:testRepayLoanThatDoesNotExist() (gas: 854649) TestSimpleInterestPricing:test_calculateInterest() (gas: 899536) TestSimpleInterestPricing:test_getPaymentConsideration() (gas: 946746) TestSimpleInterestPricing:test_getRefinanceConsideration() (gas: 937602) -TestStarport:testAcquireTokensFail() (gas: 60473) -TestStarport:testAcquireTokensSuccess() (gas: 162931) -TestStarport:testActive() (gas: 69225) -TestStarport:testAdditionalTransfers() (gas: 298472) -TestStarport:testAdditionalTransfersOriginate() (gas: 273190) -TestStarport:testAdditionalTransfersRefinance() (gas: 211115) -TestStarport:testApplyRefinanceConsiderationToLoanMalformed() (gas: 129424) -TestStarport:testCannotIssueSameLoanTwice() (gas: 359605) -TestStarport:testCannotOriginateWhilePaused() (gas: 73545) -TestStarport:testCannotSettleInvalidLoan() (gas: 74881) -TestStarport:testCannotSettleUnlessValidCustodian() (gas: 70963) -TestStarport:testCaveatEnforcerRevert() (gas: 99278) -TestStarport:testDefaultFeeRake() (gas: 358180) -TestStarport:testDefaultFeeRakeExoticDebt() (gas: 368313) -TestStarport:testExoticDebtWithCustomPricingAndRepayment() (gas: 1235539) -TestStarport:testExoticDebtWithCustomPricingAndSettlement() (gas: 1690498) -TestStarport:testExoticDebtWithNoCaveatsNotAsBorrower() (gas: 374593) -TestStarport:testIncrementCaveatNonce() (gas: 35230) -TestStarport:testInitializedFlagSetProperly() (gas: 67436) -TestStarport:testInvalidAdditionalTransfersOriginate() (gas: 228143) -TestStarport:testInvalidAdditionalTransfersRefinance() (gas: 163768) -TestStarport:testInvalidAmountCollateral() (gas: 163708) -TestStarport:testInvalidAmountCollateral721() (gas: 163708) -TestStarport:testInvalidItemType() (gas: 149656) -TestStarport:testInvalidTransferLengthCollateral() (gas: 151947) -TestStarport:testInvalidTransferLengthDebt() (gas: 173636) -TestStarport:testInvalidateCaveatSalt() (gas: 33538) -TestStarport:testNonDefaultCustodianCustodyCallFails() (gas: 261919) -TestStarport:testNonDefaultCustodianCustodyCallSuccess() (gas: 288154) -TestStarport:testNonPayableFunctions() (gas: 112084) -TestStarport:testOverrideFeeRake() (gas: 354564) -TestStarport:testPause() (gas: 18204) -TestStarport:testRefinancePostRepaymentFails() (gas: 120853) -TestStarport:testStargateGetOwner() (gas: 8851) -TestStarport:testTokenNoCodeCollateral() (gas: 148469) -TestStarport:testTokenNoCodeDebt() (gas: 178742) -TestStarport:testUnpause() (gas: 17264) +TestStarport:testAcquireTokensFail() (gas: 60430) +TestStarport:testAcquireTokensSuccess() (gas: 162888) +TestStarport:testActive() (gas: 69202) +TestStarport:testAdditionalTransfers() (gas: 298857) +TestStarport:testAdditionalTransfersOriginate() (gas: 273575) +TestStarport:testAdditionalTransfersRefinance() (gas: 218232) +TestStarport:testApplyRefinanceConsiderationToLoanMalformed() (gas: 129578) +TestStarport:testCannotIssueSameLoanTwice() (gas: 360373) +TestStarport:testCannotOriginateWhilePaused() (gas: 73567) +TestStarport:testCannotSettleInvalidLoan() (gas: 74969) +TestStarport:testCannotSettleUnlessValidCustodian() (gas: 71051) +TestStarport:testCaveatEnforcerRevert() (gas: 99260) +TestStarport:testDefaultFeeRake() (gas: 358649) +TestStarport:testDefaultFeeRakeExoticDebt() (gas: 368783) +TestStarport:testExoticDebtWithCustomPricingAndRepayment() (gas: 1235991) +TestStarport:testExoticDebtWithCustomPricingAndSettlement() (gas: 1690950) +TestStarport:testExoticDebtWithNoCaveatsNotAsBorrower() (gas: 374977) +TestStarport:testIncrementCaveatNonce() (gas: 35208) +TestStarport:testInitializedFlagSetProperly() (gas: 67329) +TestStarport:testInvalidAdditionalTransfersOriginate() (gas: 228528) +TestStarport:testInvalidAdditionalTransfersRefinance() (gas: 170903) +TestStarport:testInvalidAmountCollateral() (gas: 164092) +TestStarport:testInvalidAmountCollateral721() (gas: 164092) +TestStarport:testInvalidItemType() (gas: 150040) +TestStarport:testInvalidTransferLengthCollateral() (gas: 152331) +TestStarport:testInvalidTransferLengthDebt() (gas: 174020) +TestStarport:testInvalidateCaveatSalt() (gas: 33472) +TestStarport:testNonDefaultCustodianCustodyCallFails() (gas: 262303) +TestStarport:testNonDefaultCustodianCustodyCallSuccess() (gas: 288560) +TestStarport:testNonPayableFunctions() (gas: 112072) +TestStarport:testOverrideFeeRake() (gas: 354943) +TestStarport:testPause() (gas: 18237) +TestStarport:testRefinancePostRepaymentFails() (gas: 127971) +TestStarport:testStargateGetOwner() (gas: 8808) +TestStarport:testTokenNoCodeCollateral() (gas: 148853) +TestStarport:testTokenNoCodeDebt() (gas: 179126) +TestStarport:testUnpause() (gas: 17297) TestStrategistOriginator:testEncodeWithAccountCounter() (gas: 12307) TestStrategistOriginator:testGetStrategistData() (gas: 1489933) TestStrategistOriginator:testIncrementCounterAsStrategist() (gas: 18676) -TestStrategistOriginator:testIncrementCounterNotAuthorized() (gas: 13423) -TestStrategistOriginator:testInvalidCollateral() (gas: 209667) -TestStrategistOriginator:testInvalidDeadline() (gas: 215279) -TestStrategistOriginator:testInvalidDebt() (gas: 211327) -TestStrategistOriginator:testInvalidDebtAmountAskingMoreThanOffered() (gas: 211689) +TestStrategistOriginator:testIncrementCounterNotAuthorized() (gas: 13401) +TestStrategistOriginator:testInvalidCollateral() (gas: 209645) +TestStrategistOriginator:testInvalidDeadline() (gas: 215324) +TestStrategistOriginator:testInvalidDebt() (gas: 211305) +TestStrategistOriginator:testInvalidDebtAmountAskingMoreThanOffered() (gas: 211644) TestStrategistOriginator:testInvalidDebtAmountOfferingZero() (gas: 211965) -TestStrategistOriginator:testInvalidDebtAmountRequestingZero() (gas: 211942) -TestStrategistOriginator:testInvalidDebtLength() (gas: 210484) -TestStrategistOriginator:testInvalidOffer() (gas: 424535) +TestStrategistOriginator:testInvalidDebtAmountRequestingZero() (gas: 211897) +TestStrategistOriginator:testInvalidDebtLength() (gas: 210572) +TestStrategistOriginator:testInvalidOffer() (gas: 424895) TestStrategistOriginator:testInvalidSigner() (gas: 213796) TestStrategistOriginator:testSetStrategist() (gas: 17774) \ No newline at end of file diff --git a/lib/forge-std b/lib/forge-std index f73c73d2..e8a047e3 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit f73c73d2018eb6a111f35e4dae7b4f27401e9421 +Subproject commit e8a047e3f40f13fa37af6fe14e6e06283d9a060e diff --git a/package.json b/package.json index f41330bb..361436be 100644 --- a/package.json +++ b/package.json @@ -19,5 +19,8 @@ "husky": "^8.0.0", "ts-node": "^10.9.1", "typescript": "^5.1.3" + }, + "dependencies": { + "mmdc": "^0.0.1" } } diff --git a/src/Custodian.sol b/src/Custodian.sol index e9cbb718..6b31f993 100644 --- a/src/Custodian.sol +++ b/src/Custodian.sol @@ -161,7 +161,7 @@ contract Custodian is ERC721, ContractOffererInterface { function mint(Starport.Loan calldata loan) external { bytes memory encodedLoan = abi.encode(loan); uint256 loanId = uint256(keccak256(encodedLoan)); - if (loan.custodian != address(this) || !SP.active(loanId)) { + if (loan.custodian != address(this) || SP.closed(loanId)) { revert InvalidLoan(); } _safeMint(loan.borrower, loanId, encodedLoan); @@ -175,7 +175,7 @@ contract Custodian is ERC721, ContractOffererInterface { function mintWithApprovalSet(Starport.Loan calldata loan, address approvedTo) external { bytes memory encodedLoan = abi.encode(loan); uint256 loanId = uint256(keccak256(encodedLoan)); - if (loan.custodian != address(this) || !SP.active(loanId)) { + if (loan.custodian != address(this) || SP.closed(loanId)) { revert InvalidLoan(); } if (msg.sender != loan.borrower) { @@ -314,7 +314,7 @@ contract Custodian is ERC721, ContractOffererInterface { ) public view returns (SpentItem[] memory offer, ReceivedItem[] memory consideration) { (Command memory close) = abi.decode(context, (Command)); Starport.Loan memory loan = close.loan; - if (loan.start == block.timestamp || SP.inactive(loan.getId())) { + if (loan.start == block.timestamp || SP.closed(loan.getId())) { revert InvalidLoan(); } bool loanActive = Status(loan.terms.status).isActive(loan, close.extraData); diff --git a/src/Starport.sol b/src/Starport.sol index 22a81af8..91860a7e 100644 --- a/src/Starport.sol +++ b/src/Starport.sol @@ -31,6 +31,7 @@ import {CaveatEnforcer} from "./enforcers/CaveatEnforcer.sol"; import {Custodian} from "./Custodian.sol"; import {PausableNonReentrant} from "./lib/PausableNonReentrant.sol"; import {Pricing} from "./pricing/Pricing.sol"; +import {Status} from "./status/Status.sol"; import {Settlement} from "./settlement/Settlement.sol"; import {StarportLib, AdditionalTransfer} from "./lib/StarportLib.sol"; @@ -56,9 +57,12 @@ contract Starport is PausableNonReentrant { error AdditionalTransferError(); error CannotTransferLoans(); error CaveatDeadlineExpired(); + error InvalidCaveat(); + error InvalidCaveatLength(); error InvalidCaveatSigner(); error InvalidCustodian(); error InvalidLoan(); + error InvalidLoanState(); error InvalidPostRepayment(); error InvalidRefinance(); error LoanExists(); @@ -83,8 +87,8 @@ contract Starport is PausableNonReentrant { /* CONSTANTS AND IMMUTABLES */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ - uint256 public constant LOAN_INACTIVE_FLAG = 0x0; - uint256 public constant LOAN_ACTIVE_FLAG = 0x1; + uint256 public constant LOAN_CLOSED_FLAG = 0x0; + uint256 public constant LOAN_OPEN_FLAG = 0x1; bytes32 private constant _INVALID_LOAN = 0x045f33d100000000000000000000000000000000000000000000000000000000; bytes32 private constant _LOAN_EXISTS = 0x14ec57fc00000000000000000000000000000000000000000000000000000000; @@ -246,11 +250,15 @@ contract Starport is PausableNonReentrant { address lender, CaveatEnforcer.SignedCaveats calldata lenderCaveat, Starport.Loan memory loan, - bytes calldata pricingData + bytes calldata pricingData, + bytes calldata extraData ) external pausableNonReentrant { if (loan.start == block.timestamp) { revert InvalidLoan(); } + if (!Status(loan.terms.status).isActive(loan, extraData)) { + revert InvalidLoanState(); + } ( SpentItem[] memory considerationPayment, SpentItem[] memory carryPayment, @@ -426,8 +434,8 @@ contract Starport is PausableNonReentrant { * @param loanId The id of the loan * @return bool True if the loan is active */ - function active(uint256 loanId) public view returns (bool) { - return loanState[loanId] == LOAN_ACTIVE_FLAG; + function open(uint256 loanId) public view returns (bool) { + return loanState[loanId] == LOAN_OPEN_FLAG; } /** @@ -435,8 +443,8 @@ contract Starport is PausableNonReentrant { * @param loanId The id of the loan * @return bool True if the loan is inactive */ - function inactive(uint256 loanId) public view returns (bool) { - return loanState[loanId] == LOAN_INACTIVE_FLAG; + function closed(uint256 loanId) public view returns (bool) { + return loanState[loanId] == LOAN_CLOSED_FLAG; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ @@ -550,10 +558,18 @@ contract Starport is PausableNonReentrant { revert InvalidCaveatSigner(); } + if (signedCaveats.caveats.length == 0) { + revert InvalidCaveatLength(); + } + for (uint256 i = 0; i < signedCaveats.caveats.length;) { - CaveatEnforcer(signedCaveats.caveats[i].enforcer).validate( - additionalTransfers, loan, signedCaveats.caveats[i].data - ); + if ( + CaveatEnforcer(signedCaveats.caveats[i].enforcer).validate( + additionalTransfers, loan, signedCaveats.caveats[i].data + ) != CaveatEnforcer.validate.selector + ) { + revert InvalidCaveat(); + } unchecked { ++i; } @@ -580,7 +596,7 @@ contract Starport is PausableNonReentrant { revert(0x0, 0x04) } - sstore(loc, LOAN_INACTIVE_FLAG) + sstore(loc, LOAN_CLOSED_FLAG) } emit Close(loanId); @@ -661,7 +677,7 @@ contract Starport is PausableNonReentrant { revert(0x0, 0x04) } - sstore(loc, LOAN_ACTIVE_FLAG) + sstore(loc, LOAN_OPEN_FLAG) } emit Open(loanId, loan); } diff --git a/src/enforcers/BorrowerEnforcer.sol b/src/enforcers/BorrowerEnforcer.sol index c54ad301..939ddbca 100644 --- a/src/enforcers/BorrowerEnforcer.sol +++ b/src/enforcers/BorrowerEnforcer.sol @@ -66,8 +66,9 @@ contract BorrowerEnforcer is CaveatEnforcer { AdditionalTransfer[] calldata additionalTransfers, Starport.Loan calldata loan, bytes calldata caveatData - ) public view virtual override { + ) public view virtual override returns (bytes4 selector) { _validate(additionalTransfers, loan, abi.decode(caveatData, (Details))); + selector = CaveatEnforcer.validate.selector; } function _validate( diff --git a/src/enforcers/BorrowerEnforcerBNPL.sol b/src/enforcers/BorrowerEnforcerBNPL.sol index c30af53b..23c90186 100644 --- a/src/enforcers/BorrowerEnforcerBNPL.sol +++ b/src/enforcers/BorrowerEnforcerBNPL.sol @@ -69,7 +69,7 @@ contract BorrowerEnforcerBNPL is CaveatEnforcer { AdditionalTransfer[] calldata additionalTransfers, Starport.Loan calldata loan, bytes calldata caveatData - ) public view virtual override { + ) public view virtual override returns (bytes4 selector) { bytes32 loanHash = keccak256(abi.encode(loan)); Details memory details = abi.decode(caveatData, (Details)); @@ -106,5 +106,7 @@ contract BorrowerEnforcerBNPL is CaveatEnforcer { revert InvalidAdditionalTransfer(); } } + + selector = CaveatEnforcer.validate.selector; } } diff --git a/src/enforcers/CaveatEnforcer.sol b/src/enforcers/CaveatEnforcer.sol index ec1d6978..d829e610 100644 --- a/src/enforcers/CaveatEnforcer.sol +++ b/src/enforcers/CaveatEnforcer.sol @@ -61,5 +61,6 @@ abstract contract CaveatEnforcer { function validate(AdditionalTransfer[] calldata solution, Starport.Loan calldata loan, bytes calldata caveatData) public view - virtual; + virtual + returns (bytes4); } diff --git a/src/enforcers/LenderEnforcer.sol b/src/enforcers/LenderEnforcer.sol index f74b95c4..82243d40 100644 --- a/src/enforcers/LenderEnforcer.sol +++ b/src/enforcers/LenderEnforcer.sol @@ -56,8 +56,9 @@ contract LenderEnforcer is CaveatEnforcer { AdditionalTransfer[] calldata additionalTransfers, Starport.Loan calldata loan, bytes calldata caveatData - ) public view virtual override { + ) public view virtual override returns (bytes4 selector) { _validate(additionalTransfers, loan, abi.decode(caveatData, (Details))); + selector = CaveatEnforcer.validate.selector; } function _validate( diff --git a/test/StarportTest.sol b/test/StarportTest.sol index bd351fc0..c766db83 100644 --- a/test/StarportTest.sol +++ b/test/StarportTest.sol @@ -501,7 +501,7 @@ contract StarportTest is BaseOrderTest, Stargate { if (revertMessage.length > 0) { vm.expectRevert(revertMessage); //reverts InvalidContractOfferer with an address an a contract nonce so expect general revert } - SP.refinance(lender, lenderCaveat, loan, pricingData); + SP.refinance(lender, lenderCaveat, loan, pricingData, ""); vm.stopPrank(); diff --git a/test/fuzz-testing/TestFuzzStarport.sol b/test/fuzz-testing/TestFuzzStarport.sol index bd25afac..28a21616 100644 --- a/test/fuzz-testing/TestFuzzStarport.sol +++ b/test/fuzz-testing/TestFuzzStarport.sol @@ -386,10 +386,10 @@ contract TestFuzzStarport is StarportTest, Bound, DeepEq { badLoan.originator = goodLoan.originator; assert(goodLoan.originator != address(0)); - assert(SP.active(goodLoan.getId())); - assert(!SP.inactive(goodLoan.getId())); - assert(SP.inactive(badLoan.getId())); - assert(!SP.active(badLoan.getId())); + assert(SP.open(goodLoan.getId())); + assert(!SP.closed(goodLoan.getId())); + assert(SP.closed(badLoan.getId())); + assert(!SP.open(badLoan.getId())); } function testFuzzRepaymentFails(FuzzRepaymentLoan memory params) public { @@ -599,8 +599,11 @@ contract TestFuzzStarport is StarportTest, Bound, DeepEq { Account memory account = makeAndAllocateAccount(params.refiKey); address refiFulfiller; - skip(1); - skip(_boundMax(params.skipTime, abi.decode(goodLoan.terms.statusData, (FixedTermStatus.Details)).loanDuration)); + skip( + _bound( + params.skipTime, 1, abi.decode(goodLoan.terms.statusData, (FixedTermStatus.Details)).loanDuration - 1 + ) + ); ( SpentItem[] memory considerationPayment, SpentItem[] memory carryPayment, @@ -641,7 +644,8 @@ contract TestFuzzStarport is StarportTest, Bound, DeepEq { account.addr, refiFulfiller != account.addr ? lenderCaveat : _emptyCaveat(), goodLoan2, - abi.encode(newPricingDetails) + abi.encode(newPricingDetails), + "" ); } } diff --git a/test/integration-testing/TestCaveats.sol b/test/integration-testing/TestCaveats.sol index 3602b03a..feb00f81 100644 --- a/test/integration-testing/TestCaveats.sol +++ b/test/integration-testing/TestCaveats.sol @@ -121,6 +121,56 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall { SP.originate(new AdditionalTransfer[](0), borrowerCaveat, _emptyCaveat(), loan); } + function testInvalidCaveats() public { + Starport.Loan memory loan = generateDefaultLoanTerms(); + + CaveatEnforcer.SignedCaveats memory borrowerCaveat = getBorrowerSignedCaveat({ + details: BorrowerEnforcer.Details({loan: loan}), + signer: borrower, + salt: bytes32(0), + enforcer: address(borrowerEnforcer) + }); + _setApprovalsForSpentItems(borrower.addr, loan.collateral); + + _setApprovalsForSpentItems(lender.addr, loan.debt); + + vm.roll(5); + vm.mockCall( + address(borrowerEnforcer), + abi.encodeWithSelector( + CaveatEnforcer.validate.selector, new AdditionalTransfer[](0), loan, borrowerCaveat.caveats[0].data + ), + abi.encode(bytes4(0)) + ); + + vm.expectRevert(Starport.InvalidCaveat.selector); + vm.prank(lender.addr); + SP.originate(new AdditionalTransfer[](0), borrowerCaveat, _emptyCaveat(), loan); + } + + function testInvalidCaveatLength() public { + Starport.Loan memory loan = generateDefaultLoanTerms(); + + CaveatEnforcer.SignedCaveats memory signedCaveats; + signedCaveats.caveats = new CaveatEnforcer.Caveat[](0); + signedCaveats.salt = bytes32(0); + signedCaveats.singleUse = true; + signedCaveats.deadline = block.timestamp + 1 days; + bytes32 hash = SP.hashCaveatWithSaltAndNonce( + borrower.addr, signedCaveats.singleUse, signedCaveats.salt, signedCaveats.deadline, signedCaveats.caveats + ); + + (uint8 v, bytes32 r, bytes32 s) = vm.sign(borrower.key, hash); + signedCaveats.signature = abi.encodePacked(r, s, v); + _setApprovalsForSpentItems(borrower.addr, loan.collateral); + + _setApprovalsForSpentItems(lender.addr, loan.debt); + + vm.expectRevert(Starport.InvalidCaveatLength.selector); + vm.prank(lender.addr); + SP.originate(new AdditionalTransfer[](0), signedCaveats, _emptyCaveat(), loan); + } + function testOriginateWBorrowerApproval() public { Starport.Loan memory loan = generateDefaultLoanTerms(); @@ -205,7 +255,7 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall { vm.warp(block.timestamp + 1); mockIsValidRefinanceCall(loan.terms.pricing, loan.debt, new SpentItem[](0), new AdditionalTransfer[](0)); vm.expectRevert(StarportLib.InvalidSalt.selector); - SP.refinance(lender.addr, lenderCaveat, loan, ""); + SP.refinance(lender.addr, lenderCaveat, loan, "", ""); } function testRefinanceAsLender() public { @@ -218,7 +268,7 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall { vm.warp(block.timestamp + 1); vm.prank(newLender); mockIsValidRefinanceCall(loan.terms.pricing, loan.debt, new SpentItem[](0), new AdditionalTransfer[](0)); - SP.refinance(newLender, _emptyCaveat(), loan, defaultPricingData); + SP.refinance(newLender, _emptyCaveat(), loan, defaultPricingData, ""); } function testRefinanceWLenderApproval() public { @@ -232,7 +282,7 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall { vm.warp(block.timestamp + 1); vm.prank(borrower.addr); mockIsValidRefinanceCall(loan.terms.pricing, loan.debt, new SpentItem[](0), new AdditionalTransfer[](0)); - SP.refinance(lender.addr, _emptyCaveat(), loan, defaultPricingData); + SP.refinance(lender.addr, _emptyCaveat(), loan, defaultPricingData, ""); } function testRefinanceUnapprovedFulfiller() public { @@ -261,7 +311,7 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall { mockIsValidRefinanceCall(loan.terms.pricing, loan.debt, new SpentItem[](0), new AdditionalTransfer[](0)); - SP.refinance(lender.addr, lenderCaveat, loan, defaultPricingData); + SP.refinance(lender.addr, lenderCaveat, loan, defaultPricingData, ""); } function testRefinanceCaveatFailure() public { @@ -280,7 +330,7 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall { vm.prank(loan.borrower); mockIsValidRefinanceCall(loan.terms.pricing, loan.debt, new SpentItem[](0), new AdditionalTransfer[](0)); vm.expectRevert(LenderEnforcer.InvalidLoanTerms.selector); - SP.refinance(lender.addr, lenderCaveat, loan, defaultPricingData); + SP.refinance(lender.addr, lenderCaveat, loan, defaultPricingData, ""); } function testRefinanceLoanStartAtBlockTimestampInvalidLoan() public { @@ -297,6 +347,6 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall { vm.prank(loan.borrower); vm.expectRevert(Starport.InvalidLoan.selector); - SP.refinance(lender.addr, lenderCaveat, loan, defaultPricingData); + SP.refinance(lender.addr, lenderCaveat, loan, defaultPricingData, ""); } } diff --git a/test/integration-testing/TestLoanCombinations.t.sol b/test/integration-testing/TestLoanCombinations.t.sol index 27434ebc..de19ec20 100644 --- a/test/integration-testing/TestLoanCombinations.t.sol +++ b/test/integration-testing/TestLoanCombinations.t.sol @@ -33,7 +33,7 @@ contract TestLoanCombinations is StarportTest { assertTrue(erc20s[0].balanceOf(borrower.addr) > initial20Balance, "Borrower did not receive ERC20"); uint256 loanId = loan.getId(); - assertTrue(SP.active(loanId), "LoanId not in active state after a new loan"); + assertTrue(SP.open(loanId), "LoanId not in active state after a new loan"); skip(10 days); _repayLoan({borrower: borrower.addr, amount: 375, loan: loan}); diff --git a/test/unit-testing/TestStarport.sol b/test/unit-testing/TestStarport.sol index ffc971c6..ea79a9fc 100644 --- a/test/unit-testing/TestStarport.sol +++ b/test/unit-testing/TestStarport.sol @@ -401,11 +401,11 @@ contract TestStarport is StarportTest, DeepEq { function testInitializedFlagSetProperly() public { activeLoan.borrower = address(0); - assert(SP.inactive(activeLoan.getId())); + assert(SP.closed(activeLoan.getId())); } function testActive() public { - assert(SP.active(activeLoan.getId())); + assert(SP.open(activeLoan.getId())); } function testNonDefaultCustodianCustodyCallFails() public { @@ -962,7 +962,7 @@ contract TestStarport is StarportTest, DeepEq { skip(1); uint256 borrowerBalanceBefore = erc20s[0].balanceOf(address(activeLoan.borrower)); vm.startPrank(lender.addr); - SP.refinance(lender.addr, _emptyCaveat(), activeLoan, newPricingData); + SP.refinance(lender.addr, _emptyCaveat(), activeLoan, newPricingData, ""); assert(erc20s[0].balanceOf(address(activeLoan.borrower)) == borrowerBalanceBefore + 20); } @@ -981,7 +981,7 @@ contract TestStarport is StarportTest, DeepEq { skip(1); vm.expectRevert(abi.encodeWithSelector(Starport.InvalidPostRepayment.selector)); vm.startPrank(lender.addr); - SP.refinance(lender.addr, _emptyCaveat(), activeLoan, newPricingData); + SP.refinance(lender.addr, _emptyCaveat(), activeLoan, newPricingData, ""); } function testInvalidAdditionalTransfersRefinance() public { @@ -1009,6 +1009,6 @@ contract TestStarport is StarportTest, DeepEq { skip(1); vm.startPrank(lender.addr); vm.expectRevert(abi.encodeWithSelector(Starport.UnauthorizedAdditionalTransferIncluded.selector)); - SP.refinance(lender.addr, _emptyCaveat(), activeLoan, newPricingData); + SP.refinance(lender.addr, _emptyCaveat(), activeLoan, newPricingData, ""); } } diff --git a/yarn.lock b/yarn.lock index 1883a5aa..e112bd08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,89 +2,626 @@ # yarn lockfile v1 +"@babel/code-frame@^7.0.0": + version "7.23.4" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.4.tgz" + integrity sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA== + dependencies: + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" + +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== dependencies: "@jridgewell/trace-mapping" "0.3.9" "@jridgewell/resolve-uri@^3.0.3": version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@mermaid-js/mermaid-cli@*": + version "10.6.1" + resolved "https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-10.6.1.tgz" + integrity sha512-OH2uOXW3/GBaMGagVF7Fzu/9TJrGge+Bu/+Tm8OyIaRBaKa2NN+3SggJOmr5s51oTPaGKu/X1XBDoauvtlXAPg== + dependencies: + chalk "^5.0.1" + commander "^10.0.0" + puppeteer "^19.0.0" + +"@puppeteer/browsers@0.5.0": + version "0.5.0" + resolved "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-0.5.0.tgz" + integrity sha512-Uw6oB7VvmPRLE4iKsjuOh8zgDabhNX67dzo8U/BB0f9527qx+4eeUs+korU98OhG5C4ubg7ufBgVi63XYwS6TQ== + dependencies: + debug "4.3.4" + extract-zip "2.0.1" + https-proxy-agent "5.0.1" + progress "2.0.3" + proxy-from-env "1.1.0" + tar-fs "2.1.1" + unbzip2-stream "1.4.3" + yargs "17.7.1" + "@tsconfig/node10@^1.0.7": version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz" integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== "@tsconfig/node12@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz" integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz" integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== +"@types/node@*": + version "20.9.3" + resolved "https://registry.npmjs.org/@types/node/-/node-20.9.3.tgz" + integrity sha512-nk5wXLAXGBKfrhLB0cyHGbSqopS+nz0BUgZkUQqSHSSgdee0kssp1IAqlQOu333bW+gMNs2QREx7iynm19Abxw== + dependencies: + undici-types "~5.26.4" + +"@types/yauzl@^2.9.1": + version "2.10.3" + resolved "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz" + integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== + dependencies: + "@types/node" "*" + acorn-walk@^8.1.1: version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== acorn@^8.4.1: version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +agent-base@6: + version "6.0.2" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + arg@^4.1.0: version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bl@^4.0.3: + version "4.1.0" + resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +buffer@^5.2.1, buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^5.0.1: + version "5.3.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chromium-bidi@0.4.7: + version "0.4.7" + resolved "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.7.tgz" + integrity sha512-6+mJuFXwTMU6I3vYLs6IL8A1DyQTPjCfIL971X0aMPVGRbGnNfl6i6Cl0NMbxi2bRYLGESt9T2ZIMRM5PAEcIQ== + dependencies: + mitt "3.0.0" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +commander@^10.0.0: + version "10.0.1" + resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + +cosmiconfig@8.1.3: + version "8.1.3" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz" + integrity sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw== + dependencies: + import-fresh "^3.2.1" + js-yaml "^4.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + create-require@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +cross-fetch@3.1.5: + version "3.1.5" + resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + +debug@^4.1.1, debug@4, debug@4.3.4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +devtools-protocol@*, devtools-protocol@0.0.1107588: + version "0.0.1107588" + resolved "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1107588.tgz" + integrity sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg== + diff@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +end-of-stream@^1.1.0, end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +extract-zip@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== + dependencies: + debug "^4.1.1" + get-stream "^5.1.0" + yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz" + integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== + dependencies: + pend "~1.2.0" + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +https-proxy-agent@5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + husky@^8.0.0: version "8.0.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + resolved "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz" integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + make-error@^1.1.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +mitt@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz" + integrity sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ== + +mkdirp-classic@^0.5.2: + version "0.5.3" + resolved "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + +mmdc@^0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/mmdc/-/mmdc-0.0.1.tgz" + integrity sha512-dzjX/UTVI/WCm1dEqQ7PwuWIfkqlbn6KePYa1frYVJhp6ABFJx4J9Bacr2o8eIPlcm64Mt2f2RkwvlDJlLyy9g== + dependencies: + "@mermaid-js/mermaid-cli" "*" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + +progress@2.0.3: + version "2.0.3" + resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +proxy-from-env@1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +puppeteer-core@19.11.1: + version "19.11.1" + resolved "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.11.1.tgz" + integrity sha512-qcuC2Uf0Fwdj9wNtaTZ2OvYRraXpAK+puwwVW8ofOhOgLPZyz1c68tsorfIZyCUOpyBisjr+xByu7BMbEYMepA== + dependencies: + "@puppeteer/browsers" "0.5.0" + chromium-bidi "0.4.7" + cross-fetch "3.1.5" + debug "4.3.4" + devtools-protocol "0.0.1107588" + extract-zip "2.0.1" + https-proxy-agent "5.0.1" + proxy-from-env "1.1.0" + tar-fs "2.1.1" + unbzip2-stream "1.4.3" + ws "8.13.0" + +puppeteer@^19.0.0: + version "19.11.1" + resolved "https://registry.npmjs.org/puppeteer/-/puppeteer-19.11.1.tgz" + integrity sha512-39olGaX2djYUdhaQQHDZ0T0GwEp+5f9UB9HmEP0qHfdQHIq0xGQZuAZ5TLnJIc/88SrPLpEflPC+xUqOTv3c5g== + dependencies: + "@puppeteer/browsers" "0.5.0" + cosmiconfig "8.1.3" + https-proxy-agent "5.0.1" + progress "2.0.3" + proxy-from-env "1.1.0" + puppeteer-core "19.11.1" + +readable-stream@^3.1.1, readable-stream@^3.4.0: + version "3.6.2" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +tar-fs@2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-stream@^2.1.4: + version "2.2.0" + resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + ts-node@^10.9.1: version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz" integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== dependencies: "@cspotcode/source-map-support" "^0.8.0" @@ -101,17 +638,98 @@ ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -typescript@^5.1.3: +typescript@^5.1.3, "typescript@>= 4.7.4", typescript@>=2.7: version "5.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.3.tgz#8d84219244a6b40b6fb2b33cc1c062f715b9e826" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz" integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw== +unbzip2-stream@1.4.3: + version "1.4.3" + resolved "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz" + integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + v8-compile-cache-lib@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@8.13.0: + version "8.13.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@17.7.1: + version "17.7.1" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz" + integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yauzl@^2.10.0: + version "2.10.0" + resolved "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz" + integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + yn@3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==