@fuzzle/opencode-accountant 0.8.0 → 0.8.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/README.md +1 -1
- package/agent/accountant.md +1 -1
- package/dist/index.js +3 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -261,7 +261,7 @@ See the hledger documentation for details on rules file format and syntax.
|
|
|
261
261
|
The pipeline automatically manages account declarations:
|
|
262
262
|
|
|
263
263
|
- Scans rules files matched to the CSVs being imported
|
|
264
|
-
- Extracts all accounts (account1
|
|
264
|
+
- Extracts all accounts (account1, account2, account3, etc. directives)
|
|
265
265
|
- Creates or updates year journal files with sorted account declarations
|
|
266
266
|
- Ensures `hledger check --strict` validation passes
|
|
267
267
|
|
package/agent/accountant.md
CHANGED
|
@@ -148,7 +148,7 @@ The `import-pipeline` tool operates directly on the working directory:
|
|
|
148
148
|
|
|
149
149
|
The import pipeline automatically:
|
|
150
150
|
|
|
151
|
-
- Scans matched rules files for all account references (account1, account2 directives)
|
|
151
|
+
- Scans matched rules files for all account references (account1, account2, account3, etc. directives)
|
|
152
152
|
- Creates/updates year journal files (e.g., ledger/2026.journal) with sorted account declarations
|
|
153
153
|
- Prevents `hledger check --strict` failures due to missing account declarations
|
|
154
154
|
- No manual account setup required
|
package/dist/index.js
CHANGED
|
@@ -24098,15 +24098,11 @@ function extractAccountsFromRulesFile(rulesPath) {
|
|
|
24098
24098
|
if (trimmed.startsWith("#") || trimmed.startsWith(";") || trimmed === "") {
|
|
24099
24099
|
continue;
|
|
24100
24100
|
}
|
|
24101
|
-
const
|
|
24102
|
-
if (
|
|
24103
|
-
accounts.add(
|
|
24101
|
+
const accountMatch = trimmed.match(/^account\d+\s+(.+?)(?:\s+|$)/);
|
|
24102
|
+
if (accountMatch) {
|
|
24103
|
+
accounts.add(accountMatch[1].trim());
|
|
24104
24104
|
continue;
|
|
24105
24105
|
}
|
|
24106
|
-
const account2Match = trimmed.match(/account2\s+(.+?)(?:\s+|$)/);
|
|
24107
|
-
if (account2Match) {
|
|
24108
|
-
accounts.add(account2Match[1].trim());
|
|
24109
|
-
}
|
|
24110
24106
|
}
|
|
24111
24107
|
return accounts;
|
|
24112
24108
|
}
|