@actual-app/api 25.12.0-nightly.20251105 → 25.12.0-nightly.20251106

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.
@@ -19,7 +19,8 @@ export type ParseFileOptions = {
19
19
  hasHeaderRow?: boolean;
20
20
  delimiter?: string;
21
21
  fallbackMissingPayeeToMemo?: boolean;
22
- skipLines?: number;
22
+ skipStartLines?: number;
23
+ skipEndLines?: number;
23
24
  importNotes?: boolean;
24
25
  };
25
26
  export declare function parseFile(filepath: string, options?: ParseFileOptions): Promise<ParseFileResult>;
@@ -2,7 +2,7 @@ export type FeatureFlag = 'goalTemplatesEnabled' | 'goalTemplatesUIEnabled' | 'a
2
2
  /**
3
3
  * Cross-device preferences. These sync across devices when they are changed.
4
4
  */
5
- export type SyncedPrefs = Partial<Record<'budgetType' | 'upcomingScheduledTransactionLength' | 'firstDayOfWeekIdx' | 'dateFormat' | 'numberFormat' | 'hideFraction' | 'isPrivacyEnabled' | 'currencySymbolPosition' | 'currencySpaceBetweenAmountAndSymbol' | 'defaultCurrencyCode' | 'plugins' | `show-account-${string}-net-worth-chart` | `side-nav.show-balance-history-${string}` | `show-balances-${string}` | `show-extra-balances-${string}` | `hide-cleared-${string}` | `hide-reconciled-${string}` | `parse-date-${string}-${'csv' | 'qif'}` | `csv-mappings-${string}` | `csv-delimiter-${string}` | `csv-skip-lines-${string}` | `csv-in-out-mode-${string}` | `csv-out-value-${string}` | `csv-has-header-${string}` | `custom-sync-mappings-${string}` | `sync-import-pending-${string}` | `sync-reimport-deleted-${string}` | `sync-import-notes-${string}` | `sync-import-transactions-${string}` | `ofx-fallback-missing-payee-${string}` | `flip-amount-${string}-${'csv' | 'qif'}` | `flags.${FeatureFlag}` | `learn-categories`, string>>;
5
+ export type SyncedPrefs = Partial<Record<'budgetType' | 'upcomingScheduledTransactionLength' | 'firstDayOfWeekIdx' | 'dateFormat' | 'numberFormat' | 'hideFraction' | 'isPrivacyEnabled' | 'currencySymbolPosition' | 'currencySpaceBetweenAmountAndSymbol' | 'defaultCurrencyCode' | 'plugins' | `show-account-${string}-net-worth-chart` | `side-nav.show-balance-history-${string}` | `show-balances-${string}` | `show-extra-balances-${string}` | `hide-cleared-${string}` | `hide-reconciled-${string}` | `parse-date-${string}-${'csv' | 'qif'}` | `csv-mappings-${string}` | `csv-delimiter-${string}` | `csv-skip-start-lines-${string}` | `csv-skip-end-lines-${string}` | `csv-in-out-mode-${string}` | `csv-out-value-${string}` | `csv-has-header-${string}` | `custom-sync-mappings-${string}` | `sync-import-pending-${string}` | `sync-reimport-deleted-${string}` | `sync-import-notes-${string}` | `sync-import-transactions-${string}` | `ofx-fallback-missing-payee-${string}` | `flip-amount-${string}-${'csv' | 'qif'}` | `flags.${FeatureFlag}` | `learn-categories`, string>>;
6
6
  /**
7
7
  * Preferences that are stored in the `metadata.json` file along with the
8
8
  * core database.
@@ -2,12 +2,7 @@ declare const _default: {
2
2
  test: {
3
3
  globals: boolean;
4
4
  onConsoleLog(log: string, type: "stdout" | "stderr"): boolean | void;
5
- poolOptions: {
6
- threads: {
7
- maxThreads: number;
8
- minThreads: number;
9
- };
10
- };
5
+ maxWorkers: number;
11
6
  };
12
7
  };
13
8
  export default _default;
@@ -108249,13 +108249,19 @@ async function addTransfer(transaction2, transferredAccount) {
108249
108249
  schedule: transaction2.schedule,
108250
108250
  cleared: false
108251
108251
  };
108252
- const { notes, cleared } = await runRules$1(transferTransaction);
108252
+ const { notes, cleared, schedule } = await runRules$1(transferTransaction);
108253
+ const matchedSchedule = schedule ?? transaction2.schedule;
108253
108254
  const id2 = await insertTransaction({
108254
108255
  ...transferTransaction,
108255
108256
  notes,
108256
- cleared
108257
+ cleared,
108258
+ schedule: matchedSchedule
108259
+ });
108260
+ await updateTransaction$2({
108261
+ id: transaction2.id,
108262
+ transfer_id: id2,
108263
+ ...matchedSchedule ? { schedule: matchedSchedule } : {}
108257
108264
  });
108258
- await updateTransaction$2({ id: transaction2.id, transfer_id: id2 });
108259
108265
  const categoryCleared = await clearCategory(transaction2, transferredAccount);
108260
108266
  return {
108261
108267
  id: transaction2.id,
@@ -134541,9 +134547,20 @@ async function parseFile(filepath, options = {}) {
134541
134547
  async function parseCSV(filepath, options) {
134542
134548
  const errors2 = Array();
134543
134549
  let contents = await readFile(filepath);
134544
- if (options.skipLines > 0) {
134550
+ const skipStart = Math.max(0, options.skipStartLines || 0);
134551
+ const skipEnd = Math.max(0, options.skipEndLines || 0);
134552
+ if (skipStart > 0 || skipEnd > 0) {
134545
134553
  const lines = contents.split(/\r?\n/);
134546
- contents = lines.slice(options.skipLines).join("\r\n");
134554
+ if (skipStart + skipEnd >= lines.length) {
134555
+ errors2.push({
134556
+ message: "Cannot skip more lines than exist in the file",
134557
+ internal: `Attempted to skip ${skipStart} start + ${skipEnd} end lines from ${lines.length} total lines`
134558
+ });
134559
+ return { errors: errors2, transactions: [] };
134560
+ }
134561
+ const startLine = skipStart;
134562
+ const endLine = skipEnd > 0 ? lines.length - skipEnd : lines.length;
134563
+ contents = lines.slice(startLine, endLine).join("\r\n");
134547
134564
  }
134548
134565
  let data;
134549
134566
  try {
@@ -0,0 +1,8 @@
1
+ BEGIN TRANSACTION;
2
+
3
+ -- Rename csv-skip-lines-* preferences to csv-skip-start-lines-*
4
+ UPDATE preferences
5
+ SET id = REPLACE(id, 'csv-skip-lines-', 'csv-skip-start-lines-')
6
+ WHERE id LIKE 'csv-skip-lines-%';
7
+
8
+ COMMIT;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "25.12.0-nightly.20251105",
3
+ "version": "25.12.0-nightly.20251106",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {
@@ -32,6 +32,6 @@
32
32
  "devDependencies": {
33
33
  "tsc-alias": "^1.8.16",
34
34
  "typescript": "^5.9.3",
35
- "vitest": "^3.2.4"
35
+ "vitest": "^4.0.6"
36
36
  }
37
37
  }
@@ -7,11 +7,6 @@ exports.default = {
7
7
  // print only console.error
8
8
  return type === 'stderr';
9
9
  },
10
- poolOptions: {
11
- threads: {
12
- maxThreads: 2,
13
- minThreads: 1,
14
- },
15
- },
10
+ maxWorkers: 2,
16
11
  },
17
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "25.12.0-nightly.20251105",
3
+ "version": "25.12.0-nightly.20251106",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {
@@ -32,6 +32,6 @@
32
32
  "devDependencies": {
33
33
  "tsc-alias": "^1.8.16",
34
34
  "typescript": "^5.9.3",
35
- "vitest": "^3.2.4"
35
+ "vitest": "^4.0.6"
36
36
  }
37
37
  }