@cubedelement.com/realty-investor-timeline 5.1.0 → 5.2.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [5.2.0](https://github.com/kvernon/realty-investor-timeline/compare/v5.1.0...v5.2.0) (2025-12-19)
2
+
3
+
4
+ ### Features
5
+
6
+ * added error reason for no money ([#69](https://github.com/kvernon/realty-investor-timeline/issues/69)) ([2d17a48](https://github.com/kvernon/realty-investor-timeline/commit/2d17a486541d3a349c70f8cb962b57bf439b10e3))
7
+
1
8
  # [5.1.0](https://github.com/kvernon/realty-investor-timeline/compare/v5.0.0...v5.1.0) (2025-11-14)
2
9
 
3
10
 
@@ -10,6 +10,7 @@ const update_historical_rentals_1 = require("./update-historical-rentals");
10
10
  const properties_1 = require("../properties");
11
11
  const property_sort_1 = __importDefault(require("../properties/property-sort"));
12
12
  const get_min_cost_down_by_rule_1 = require("../calculations/get-min-cost-down-by-rule");
13
+ const investments_1 = require("../investments");
13
14
  const looper = (options, timeline) => {
14
15
  const result = timeline.clone();
15
16
  result.endDate.setUTCMonth(result.endDate.getUTCMonth() + 1);
@@ -62,6 +63,13 @@ const looper = (options, timeline) => {
62
63
  result.user.ledgerCollection.add(equityFromSell);
63
64
  }
64
65
  if (!result.user.hasMoneyToInvest(timeline.endDate, result.rentals.map((x) => x.property).filter((x) => x.isOwned))) {
66
+ const issue = new investments_1.UserInvestResult(investments_1.InvestmentReasons.UserHasNoMoneyToInvest, `user balance: ${result.user.ledgerCollection.getBalance(result.endDate)}`);
67
+ result.rentals.forEach((r) => {
68
+ r.reasons.push({
69
+ reason: issue.message,
70
+ date: (0, data_clone_date_1.cloneDateUtc)(timeline.endDate),
71
+ });
72
+ });
65
73
  return result;
66
74
  }
67
75
  //step 4: buy new properties
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubedelement.com/realty-investor-timeline",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "A way to determine if and when your expenses would be covered",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",