@fuzzle/opencode-accountant 0.7.3-next.1 → 0.7.4-next.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25165,8 +25165,15 @@ async function importPipeline(directory, agent, options, configLoader = loadImpo
25165
25165
  }
25166
25166
  executePreprocessBtcStep(context, contextIds, logger);
25167
25167
  await executeBtcPurchaseStep(context, contextIds, logger);
25168
+ const orderedContextIds = [...contextIds].sort((a, b) => {
25169
+ const ctxA = loadContext(context.directory, a);
25170
+ const ctxB = loadContext(context.directory, b);
25171
+ const isBtcA = ctxA.provider === "revolut" && ctxA.currency === "btc" ? 1 : 0;
25172
+ const isBtcB = ctxB.provider === "revolut" && ctxB.currency === "btc" ? 1 : 0;
25173
+ return isBtcA - isBtcB;
25174
+ });
25168
25175
  let totalTransactions = 0;
25169
- for (const contextId of contextIds) {
25176
+ for (const contextId of orderedContextIds) {
25170
25177
  const importContext = loadContext(context.directory, contextId);
25171
25178
  logger.info(`Processing: ${importContext.filename} (${importContext.accountNumber || "unknown account"})`);
25172
25179
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzzle/opencode-accountant",
3
- "version": "0.7.3-next.1",
3
+ "version": "0.7.4-next.1",
4
4
  "description": "An OpenCode accounting agent, specialized in double-entry-bookkepping with hledger",
5
5
  "author": {
6
6
  "name": "ali bengali",