israeli-banks-actual-budget-importer 1.7.0 → 1.7.1
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 +7 -0
- package/package.json +1 -1
- package/src/utils.ts +1 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.7.1](https://github.com/tomerh2001/israeli-banks-actual-budget-importer/compare/v1.7.0...v1.7.1) (2025-12-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* extend transaction scraping period to 12 months and remove debug logs ([bcfccd8](https://github.com/tomerh2001/israeli-banks-actual-budget-importer/commit/bcfccd8215af67ca1ca714b3677d55ad13c655d6))
|
|
7
|
+
|
|
1
8
|
# [1.7.0](https://github.com/tomerh2001/israeli-banks-actual-budget-importer/compare/v1.6.1...v1.7.0) (2025-12-04)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -20,7 +20,7 @@ export async function scrapeAndImportTransactions({companyId, bank}: ScrapeTrans
|
|
|
20
20
|
try {
|
|
21
21
|
const scraper = createScraper({
|
|
22
22
|
companyId,
|
|
23
|
-
startDate: moment().subtract(
|
|
23
|
+
startDate: moment().subtract(12, 'month').toDate(),
|
|
24
24
|
// ExecutablePath: '/opt/homebrew/bin/chromium',
|
|
25
25
|
args: ['--user-data-dir=./chrome-data'],
|
|
26
26
|
additionalTransactionInformation: true,
|
|
@@ -50,9 +50,6 @@ export async function scrapeAndImportTransactions({companyId, bank}: ScrapeTrans
|
|
|
50
50
|
const accountBalance = result.accounts![0].balance!;
|
|
51
51
|
const payees: PayeeEntity[] = await actual.getPayees();
|
|
52
52
|
|
|
53
|
-
// Print first 5 scraped transactions for debugging
|
|
54
|
-
log('SCRAPED_TRANSACTIONS_SAMPLE', {sample: transactions.slice(0, 5)});
|
|
55
|
-
|
|
56
53
|
const mappedTransactions = transactions.map(async x => ({
|
|
57
54
|
date: moment(x.date).format('YYYY-MM-DD'),
|
|
58
55
|
amount: actual.utils.amountToInteger(x.chargedAmount),
|
|
@@ -62,9 +59,6 @@ export async function scrapeAndImportTransactions({companyId, bank}: ScrapeTrans
|
|
|
62
59
|
imported_id: `${x.identifier}-${moment(x.date).format('YYYY-MM-DD HH:mm:ss')}`,
|
|
63
60
|
}));
|
|
64
61
|
|
|
65
|
-
// Print first 5 mapped transactions for debugging
|
|
66
|
-
log('MAPPED_TRANSACTIONS_SAMPLE', {sample: await Promise.all(mappedTransactions.slice(0, 5))});
|
|
67
|
-
|
|
68
62
|
stdout.mute();
|
|
69
63
|
const importResult = await actual.importTransactions(bank.actualAccountId, await Promise.all(mappedTransactions), {defaultCleared: true});
|
|
70
64
|
stdout.unmute();
|