@actual-app/api 25.12.0 → 26.1.0-nightly.20251205

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.
@@ -1,2 +1,2 @@
1
1
  export declare const captureException: (exc: Error) => void;
2
- export declare const captureBreadcrumb: (crumb: unknown) => void;
2
+ export declare const captureBreadcrumb: (_crumb: unknown) => void;
@@ -1,2 +1,2 @@
1
- import * as locales from 'date-fns/locale';
2
- export declare function getLocale(language: string): locales.Locale;
1
+ import * as localesNamespace from 'date-fns/locale';
2
+ export declare function getLocale(language: string): localesNamespace.Locale;
@@ -29,7 +29,7 @@ export declare function deserializeField(field: any): {
29
29
  export declare function getFieldError(type: any): "Invalid date format" | "Value cannot be empty" | "Value must be a string" | "Value must be a boolean" | "Value must be a number" | "Please choose a valid field for this type of rule" | "Invalid handlebars template" | "Internal error, sorry! Please get in touch https://actualbudget.org/contact/ for support";
30
30
  export declare function sortNumbers(num1: any, num2: any): any[];
31
31
  export declare function parse(item: any): any;
32
- export declare function unparse({ error, inputKey, ...item }: {
32
+ export declare function unparse({ error: _error, inputKey: _inputKey, ...item }: {
33
33
  [x: string]: any;
34
34
  error: any;
35
35
  inputKey: any;
@@ -3,7 +3,7 @@ import { type RuleConditionEntity } from './rule';
3
3
  export type TimeFrame = {
4
4
  start: string;
5
5
  end: string;
6
- mode: 'sliding-window' | 'static' | 'full' | 'lastYear' | 'yearToDate' | 'priorYearToDate';
6
+ mode: 'sliding-window' | 'static' | 'full' | 'lastMonth' | 'lastYear' | 'yearToDate' | 'priorYearToDate';
7
7
  };
8
8
  type AbstractWidget<T extends string, Meta extends Record<string, unknown> | null = null> = {
9
9
  id: string;
@@ -45,7 +45,7 @@ type BaseConditionEntity<Field extends keyof FieldValueTypes, Op extends RuleCon
45
45
  $oneof: string[];
46
46
  }>;
47
47
  };
48
- export type RuleConditionEntity = BaseConditionEntity<'account', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches' | 'onBudget' | 'offBudget'> | BaseConditionEntity<'category', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'amount', 'is' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte'> | BaseConditionEntity<'date', 'is' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte'> | BaseConditionEntity<'notes', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches' | 'hasTags'> | BaseConditionEntity<'payee', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'imported_payee', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'saved', 'is'> | BaseConditionEntity<'cleared', 'is'> | BaseConditionEntity<'reconciled', 'is'>;
48
+ export type RuleConditionEntity = BaseConditionEntity<'account', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches' | 'onBudget' | 'offBudget'> | BaseConditionEntity<'category', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'amount', 'is' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte'> | BaseConditionEntity<'date', 'is' | 'isapprox' | 'isbetween' | 'gt' | 'gte' | 'lt' | 'lte'> | BaseConditionEntity<'notes', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches' | 'hasTags'> | BaseConditionEntity<'payee', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'imported_payee', 'is' | 'isNot' | 'oneOf' | 'notOneOf' | 'contains' | 'doesNotContain' | 'matches'> | BaseConditionEntity<'saved', 'is'> | BaseConditionEntity<'cleared', 'is'> | BaseConditionEntity<'reconciled', 'is'> | BaseConditionEntity<'transfer', 'is'>;
49
49
  export type RuleActionEntity = SetRuleActionEntity | SetSplitAmountRuleActionEntity | LinkScheduleRuleActionEntity | PrependNoteRuleActionEntity | AppendNoteRuleActionEntity | DeleteTransactionRuleActionEntity;
50
50
  export interface SetRuleActionEntity {
51
51
  field: string;
@@ -30,6 +30,7 @@ export type LocalPrefs = Partial<{
30
30
  'budget.showHiddenCategories': boolean;
31
31
  'budget.startMonth': string;
32
32
  'flags.updateNotificationShownForVersion': string;
33
+ 'schedules.showCompleted': boolean;
33
34
  reportsViewLegend: boolean;
34
35
  reportsViewSummary: boolean;
35
36
  reportsViewLabel: boolean;
@@ -4045,7 +4045,7 @@ const init$3 = function ({ persist = true } = {}) {
4045
4045
  try {
4046
4046
  store = JSON.parse(fs__namespace.readFileSync(getStorePath(), "utf8"));
4047
4047
  }
4048
- catch (e) {
4048
+ catch {
4049
4049
  store = {};
4050
4050
  }
4051
4051
  }
@@ -5569,13 +5569,8 @@ function runQuery$1(db2, sql, params = [], fetchAll2 = false) {
5569
5569
  }
5570
5570
  }
5571
5571
  else {
5572
- try {
5573
- const info = stmt.run(...params);
5574
- return { changes: info.changes, insertId: info.lastInsertRowid };
5575
- }
5576
- catch (e) {
5577
- throw e;
5578
- }
5572
+ const info = stmt.run(...params);
5573
+ return { changes: info.changes, insertId: info.lastInsertRowid };
5579
5574
  }
5580
5575
  }
5581
5576
  function execQuery$2(db2, sql) {
@@ -9373,7 +9368,7 @@ function integerToCurrency(integerAmount, formatter = getNumberFormat().formatte
9373
9368
  return formatter.format(amount);
9374
9369
  }
9375
9370
  function stringToInteger(str) {
9376
- const amount = parseInt(str.replace(/[^-0-9.,]/g, ""));
9371
+ const amount = parseInt(str.replace(/\u2212/g, "-").replace(/[^-0-9.,]/g, ""));
9377
9372
  if (!isNaN(amount)) {
9378
9373
  return amount;
9379
9374
  }
@@ -9402,8 +9397,12 @@ function looselyParseAmount(amount) {
9402
9397
  return v.replace(/[^0-9-]/g, "");
9403
9398
  }
9404
9399
  if (amount.startsWith("(") && amount.endsWith(")")) {
9400
+ amount = amount.replace(/\u2212/g, "");
9405
9401
  amount = amount.replace("(", "-").replace(")", "");
9406
9402
  }
9403
+ else {
9404
+ amount = amount.replace(/\u2212/g, "-");
9405
+ }
9407
9406
  const m = amount.match(/[.,]([^.,]{4,9}|[^.,]{1,2})$/);
9408
9407
  if (!m || m.index === void 0) {
9409
9408
  return safeNumber2(parseFloat(extractNumbers(amount)));
@@ -11812,7 +11811,7 @@ instance.loadLanguages;
11812
11811
  const captureException = function (exc) {
11813
11812
  console.error("[Exception]", exc);
11814
11813
  };
11815
- const captureBreadcrumb = function (crumb) {
11814
+ const captureBreadcrumb = function (_crumb) {
11816
11815
  };
11817
11816
  function isPreviewEnvironment() {
11818
11817
  return String(process.env.REACT_APP_NETLIFY) === "true";
@@ -12834,7 +12833,7 @@ function deserializeClock(clock2) {
12834
12833
  try {
12835
12834
  data = JSON.parse(clock2);
12836
12835
  }
12837
- catch (e) {
12836
+ catch {
12838
12837
  data = {
12839
12838
  timestamp: "1970-01-01T00:00:00.000Z-0000-" + makeClientId(),
12840
12839
  merkle: {}
@@ -13980,7 +13979,7 @@ const accountModel$1 = {
13980
13979
  const categoryModel$1 = {
13981
13980
  validate(category, { update: update2 } = {}) {
13982
13981
  requiredFields("category", category, update2 ? ["name", "is_income", "cat_group"] : ["name", "cat_group"], update2);
13983
- const { sort_order, ...rest } = category;
13982
+ const { sort_order: _sort_order, ...rest } = category;
13984
13983
  return { ...rest };
13985
13984
  },
13986
13985
  toDb(category, { update: update2 } = {}) {
@@ -13993,7 +13992,7 @@ const categoryModel$1 = {
13993
13992
  const categoryGroupModel$1 = {
13994
13993
  validate(categoryGroup, { update: update2 } = {}) {
13995
13994
  requiredFields("categoryGroup", categoryGroup, update2 ? ["name", "is_income"] : ["name"], update2);
13996
- const { sort_order, ...rest } = categoryGroup;
13995
+ const { sort_order: _sort_order, ...rest } = categoryGroup;
13997
13996
  return { ...rest };
13998
13997
  },
13999
13998
  toDb(categoryGroup, { update: update2 } = {}) {
@@ -14086,7 +14085,7 @@ function convertOutputType(value, type2) {
14086
14085
  try {
14087
14086
  return JSON.parse(value);
14088
14087
  }
14089
- catch (e) {
14088
+ catch {
14090
14089
  return type2 === "json/fallback" ? value : null;
14091
14090
  }
14092
14091
  }
@@ -54655,7 +54654,7 @@ const zhTW = {
54655
54654
  firstWeekContainsDate: 4
54656
54655
  }
54657
54656
  };
54658
- const locales = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
54657
+ const localesNamespace = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
54659
54658
  __proto__: null,
54660
54659
  af,
54661
54660
  ar,
@@ -54753,9 +54752,12 @@ const locales = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
54753
54752
  zhHK,
54754
54753
  zhTW
54755
54754
  }, Symbol.toStringTag, { value: "Module" }));
54755
+ const locales = {
54756
+ ...localesNamespace
54757
+ };
54756
54758
  function getLocale(language) {
54757
54759
  if (!language || typeof language !== "string") {
54758
- return enUS;
54760
+ return locales.enUS;
54759
54761
  }
54760
54762
  let localeKey = language.replace("-", "");
54761
54763
  if (localeKey in locales) {
@@ -54765,7 +54767,7 @@ function getLocale(language) {
54765
54767
  if (localeKey in locales) {
54766
54768
  return locales[localeKey];
54767
54769
  }
54768
- return enUS;
54770
+ return locales.enUS;
54769
54771
  }
54770
54772
  async function getSheetValue(sheetName, cell) {
54771
54773
  const node2 = await getCell$1(sheetName, cell);
@@ -55961,7 +55963,7 @@ async function post(url, data, headers2 = {}, timeout = null) {
55961
55963
  clearTimeout(timeoutId);
55962
55964
  text = await res.text();
55963
55965
  }
55964
- catch (err) {
55966
+ catch {
55965
55967
  throw new PostError("network-failure");
55966
55968
  }
55967
55969
  throwIfNot200(res, text);
@@ -55969,7 +55971,7 @@ async function post(url, data, headers2 = {}, timeout = null) {
55969
55971
  try {
55970
55972
  responseData = JSON.parse(text);
55971
55973
  }
55972
- catch (err) {
55974
+ catch {
55973
55975
  throw new PostError("parse-json", { meta: text });
55974
55976
  }
55975
55977
  if (responseData.status !== "ok") {
@@ -55997,14 +55999,14 @@ async function del(url, data, headers2 = {}, timeout = null) {
55997
55999
  clearTimeout(timeoutId);
55998
56000
  text = await res.text();
55999
56001
  }
56000
- catch (err) {
56002
+ catch {
56001
56003
  throw new PostError("network-failure");
56002
56004
  }
56003
56005
  throwIfNot200(res, text);
56004
56006
  try {
56005
56007
  res = JSON.parse(text);
56006
56008
  }
56007
- catch (err) {
56009
+ catch {
56008
56010
  throw new PostError("parse-json", { meta: text });
56009
56011
  }
56010
56012
  if (res.status !== "ok") {
@@ -56032,14 +56034,14 @@ async function patch(url, data, headers2 = {}, timeout = null) {
56032
56034
  clearTimeout(timeoutId);
56033
56035
  text = await res.text();
56034
56036
  }
56035
- catch (err) {
56037
+ catch {
56036
56038
  throw new PostError("network-failure");
56037
56039
  }
56038
56040
  throwIfNot200(res, text);
56039
56041
  try {
56040
56042
  res = JSON.parse(text);
56041
56043
  }
56042
- catch (err) {
56044
+ catch {
56043
56045
  throw new PostError("parse-json", { meta: text });
56044
56046
  }
56045
56047
  if (res.status !== "ok") {
@@ -56061,7 +56063,7 @@ async function postBinary(url, data, headers2) {
56061
56063
  }
56062
56064
  });
56063
56065
  }
56064
- catch (err) {
56066
+ catch {
56065
56067
  throw new PostError("network-failure");
56066
56068
  }
56067
56069
  let buffer;
@@ -56087,7 +56089,7 @@ async function loadPrefs(id2) {
56087
56089
  try {
56088
56090
  prefs = JSON.parse(await readFile(fullpath));
56089
56091
  }
56090
- catch (e) {
56092
+ catch {
56091
56093
  prefs = { id: id2, budgetName: id2 };
56092
56094
  }
56093
56095
  prefs.id = id2;
@@ -56136,7 +56138,7 @@ function isValidBaseURL(base) {
56136
56138
  try {
56137
56139
  return Boolean(new URL(base));
56138
56140
  }
56139
- catch (error) {
56141
+ catch {
56140
56142
  return false;
56141
56143
  }
56142
56144
  }
@@ -59477,7 +59479,7 @@ async function importBuffer(fileData, buffer) {
59477
59479
  zipped = new AdmZip(buffer);
59478
59480
  entries = zipped.getEntries();
59479
59481
  }
59480
- catch (err) {
59482
+ catch {
59481
59483
  throw FileDownloadError("not-zip-file");
59482
59484
  }
59483
59485
  const dbEntry = entries.find((e) => e.entryName.includes("db.sqlite"));
@@ -59491,7 +59493,7 @@ async function importBuffer(fileData, buffer) {
59491
59493
  try {
59492
59494
  meta = JSON.parse(metaContent.toString("utf8"));
59493
59495
  }
59494
- catch (err) {
59496
+ catch {
59495
59497
  throw FileDownloadError("invalid-meta-file");
59496
59498
  }
59497
59499
  meta = {
@@ -59922,7 +59924,7 @@ function applyMessagesForImport(messages) {
59922
59924
  try {
59923
59925
  apply(msg);
59924
59926
  }
59925
- catch (e) {
59927
+ catch {
59926
59928
  apply(msg, true);
59927
59929
  }
59928
59930
  if (dataset === "prefs") {
@@ -60842,7 +60844,7 @@ function makeChild(parent, data = {}) {
60842
60844
  }
60843
60845
  function recalculateSplit(trans) {
60844
60846
  const total = (trans.subtransactions || []).reduce((acc, t2) => acc + num(t2.amount), 0);
60845
- const { error, ...rest } = trans;
60847
+ const { error: _error, ...rest } = trans;
60846
60848
  return {
60847
60849
  ...rest,
60848
60850
  error: total === num(trans.amount) ? null : SplitTransactionError(total, trans)
@@ -60989,7 +60991,7 @@ function deleteTransaction$1(transactions, id2) {
60989
60991
  return null;
60990
60992
  }
60991
60993
  else if (trans.subtransactions?.length === 1) {
60992
- const { subtransactions, ...rest } = trans;
60994
+ const { subtransactions: _subtransactions, ...rest } = trans;
60993
60995
  return {
60994
60996
  ...rest,
60995
60997
  is_parent: false,
@@ -61017,7 +61019,7 @@ function splitTransaction(transactions, id2, createSubtransactions) {
61017
61019
  const subtransactions = [
61018
61020
  makeChild(trans)
61019
61021
  ];
61020
- const { error, ...rest } = trans;
61022
+ const { error: _error, ...rest } = trans;
61021
61023
  return {
61022
61024
  ...rest,
61023
61025
  is_parent: true,
@@ -106718,7 +106720,7 @@ function parseArray(str) {
106718
106720
  try {
106719
106721
  value = typeof str === "string" ? JSON.parse(str) : str;
106720
106722
  }
106721
- catch (e) {
106723
+ catch {
106722
106724
  throw new RuleError("internal", "Cannot parse rule json");
106723
106725
  }
106724
106726
  if (!Array.isArray(value)) {
@@ -107535,7 +107537,7 @@ async function batchUpdateTransactions({ added, deleted, updated, learnCategorie
107535
107537
  if (added) {
107536
107538
  addedIds = await Promise.all(added.map(async (t2) => {
107537
107539
  const account = accounts.find((acct) => acct.id === t2.account);
107538
- if (t2.is_parent || account.offbudget === 1) {
107540
+ if (t2.is_parent || account?.offbudget === 1) {
107539
107541
  t2.category = null;
107540
107542
  }
107541
107543
  return insertTransaction(t2);
@@ -107555,7 +107557,7 @@ async function batchUpdateTransactions({ added, deleted, updated, learnCategorie
107555
107557
  await Promise.all(updated.map(async (t2) => {
107556
107558
  if (t2.account) {
107557
107559
  const account = accounts.find((acct) => acct.id === t2.account);
107558
- if (t2.is_parent || account.offbudget === 1) {
107560
+ if (t2.is_parent || account?.offbudget === 1) {
107559
107561
  t2.category = null;
107560
107562
  }
107561
107563
  }
@@ -108109,7 +108111,7 @@ async function reconcileTransactions(acctId, transactions, isBankSyncAccount = f
108109
108111
  }
108110
108112
  }
108111
108113
  else {
108112
- const { forceAddTransaction, ...newTrans } = trans;
108114
+ const { forceAddTransaction: _forceAddTransaction, ...newTrans } = trans;
108113
108115
  const finalTransaction = {
108114
108116
  ...newTrans,
108115
108117
  id: v4(),
@@ -108741,7 +108743,7 @@ async function simpleFinAccounts() {
108741
108743
  "X-ACTUAL-TOKEN": userToken
108742
108744
  }, 6e4);
108743
108745
  }
108744
- catch (error) {
108746
+ catch {
108745
108747
  return { error_code: "TIMED_OUT" };
108746
108748
  }
108747
108749
  }
@@ -108759,7 +108761,7 @@ async function pluggyAiAccounts() {
108759
108761
  "X-ACTUAL-TOKEN": userToken
108760
108762
  }, 6e4);
108761
108763
  }
108762
- catch (error) {
108764
+ catch {
108763
108765
  return { error_code: "TIMED_OUT" };
108764
108766
  }
108765
108767
  }
@@ -110099,21 +110101,21 @@ async function needsBootstrap({ url } = {}) {
110099
110101
  return { bootstrapped: true, hasServer: false };
110100
110102
  }
110101
110103
  }
110102
- catch (err) {
110104
+ catch {
110103
110105
  return { error: "get-server-failure" };
110104
110106
  }
110105
110107
  let resText;
110106
110108
  try {
110107
110109
  resText = await get$2(serverConfig.SIGNUP_SERVER + "/needs-bootstrap");
110108
110110
  }
110109
- catch (err) {
110111
+ catch {
110110
110112
  return { error: "network-failure" };
110111
110113
  }
110112
110114
  let res;
110113
110115
  try {
110114
110116
  res = JSON.parse(resText);
110115
110117
  }
110116
- catch (err) {
110118
+ catch {
110117
110119
  return { error: "parse-failure" };
110118
110120
  }
110119
110121
  return {
@@ -115611,7 +115613,7 @@ async function updateSchedule({ schedule, conditions, resetNextDate }) {
115611
115613
  const oldConditions = rule.serialize().conditions;
115612
115614
  const newConditions = updateConditions(oldConditions, conditions);
115613
115615
  await updateRule$1({ id: rule.id, conditions: newConditions });
115614
- const stripType = ({ type: type2, ...fields }) => fields;
115616
+ const stripType = ({ type: _type, ...fields }) => fields;
115615
115617
  if (resetNextDate || !deepEqual(oldConditions.find((c) => c.field === "account"), oldConditions.find((c) => c.field === "account")) || !deepEqual(stripType(oldConditions.find((c) => c.field === "date") || {}), stripType(newConditions.find((c) => c.field === "date") || {}))) {
115616
115618
  await setNextDate({
115617
115619
  id: schedule.id,
@@ -115724,7 +115726,7 @@ async function advanceSchedulesService(syncSuccess) {
115724
115726
  try {
115725
115727
  await setNextDate({ id: schedule.id });
115726
115728
  }
115727
- catch (err) {
115729
+ catch {
115728
115730
  }
115729
115731
  }
115730
115732
  else {
@@ -120684,7 +120686,7 @@ function findLatestDevice(zipped, entries) {
120684
120686
  try {
120685
120687
  data = JSON.parse(contents);
120686
120688
  }
120687
- catch (e) {
120689
+ catch {
120688
120690
  return null;
120689
120691
  }
120690
120692
  if (data.hasFullKnowledge) {
@@ -120765,7 +120767,7 @@ function parseFile$2(buffer) {
120765
120767
  try {
120766
120768
  return JSON.parse(contents);
120767
120769
  }
120768
- catch (e) {
120770
+ catch {
120769
120771
  throw new Error("Error parsing Budget.yfull file");
120770
120772
  }
120771
120773
  }
@@ -121531,7 +121533,7 @@ CREATE TABLE kvcache_key (id INTEGER PRIMARY KEY, key REAL);
121531
121533
  const value = JSON.parse(str);
121532
121534
  return value && value !== "" ? value : null;
121533
121535
  }
121534
- catch (e) {
121536
+ catch {
121535
121537
  return null;
121536
121538
  }
121537
121539
  };
@@ -121608,6 +121610,11 @@ const DEFAULT_DASHBOARD_STATE = [
121608
121610
  field: "account",
121609
121611
  op: "onBudget",
121610
121612
  value: ""
121613
+ },
121614
+ {
121615
+ field: "transfer",
121616
+ op: "is",
121617
+ value: false
121611
121618
  }
121612
121619
  ],
121613
121620
  conditionsOp: "and"
@@ -121640,6 +121647,11 @@ const DEFAULT_DASHBOARD_STATE = [
121640
121647
  field: "account",
121641
121648
  op: "onBudget",
121642
121649
  value: ""
121650
+ },
121651
+ {
121652
+ field: "transfer",
121653
+ op: "is",
121654
+ value: false
121643
121655
  }
121644
121656
  ],
121645
121657
  conditionsOp: "and"
@@ -121672,6 +121684,11 @@ const DEFAULT_DASHBOARD_STATE = [
121672
121684
  field: "account",
121673
121685
  op: "onBudget",
121674
121686
  value: ""
121687
+ },
121688
+ {
121689
+ field: "transfer",
121690
+ op: "is",
121691
+ value: false
121675
121692
  }
121676
121693
  ],
121677
121694
  conditionsOp: "and"
@@ -121704,6 +121721,11 @@ const DEFAULT_DASHBOARD_STATE = [
121704
121721
  field: "account",
121705
121722
  op: "onBudget",
121706
121723
  value: ""
121724
+ },
121725
+ {
121726
+ field: "transfer",
121727
+ op: "is",
121728
+ value: false
121707
121729
  }
121708
121730
  ],
121709
121731
  conditionsOp: "and"
@@ -121896,7 +121918,7 @@ async function runMigration(db2, { fs: fs2, fileId }) {
121896
121918
  ]);
121897
121919
  }));
121898
121920
  }
121899
- catch (e) {
121921
+ catch {
121900
121922
  }
121901
121923
  }
121902
121924
  let MIGRATIONS_DIR = migrationsPath;
@@ -122166,7 +122188,7 @@ async function loadBackup$1(id2, backupId) {
122166
122188
  try {
122167
122189
  await upload();
122168
122190
  }
122169
- catch (e) {
122191
+ catch {
122170
122192
  }
122171
122193
  unloadPrefs();
122172
122194
  }
@@ -122181,7 +122203,7 @@ async function loadBackup$1(id2, backupId) {
122181
122203
  try {
122182
122204
  await upload();
122183
122205
  }
122184
- catch (e) {
122206
+ catch {
122185
122207
  }
122186
122208
  unloadPrefs();
122187
122209
  await copyFile(join$1(budgetDir, "backups", backupId), join$1(budgetDir, "db.sqlite"));
@@ -122359,7 +122381,7 @@ async function closeBudget() {
122359
122381
  try {
122360
122382
  await setItem("lastBudget", "");
122361
122383
  }
122362
- catch (e) {
122384
+ catch {
122363
122385
  }
122364
122386
  unloadPrefs();
122365
122387
  await stopBackupService();
@@ -122377,7 +122399,7 @@ async function deleteBudget({ id: id2, cloudFileId }) {
122377
122399
  const budgetDir = getBudgetDir(id2);
122378
122400
  await removeDirRecursively(budgetDir);
122379
122401
  }
122380
- catch (e) {
122402
+ catch {
122381
122403
  return "fail";
122382
122404
  }
122383
122405
  }
@@ -122468,7 +122490,7 @@ async function createBudget({ budgetName, avoidUpload, testMode, testBudgetId }
122468
122490
  try {
122469
122491
  await upload();
122470
122492
  }
122471
- catch (e) {
122493
+ catch {
122472
122494
  }
122473
122495
  }
122474
122496
  if (testMode) {
@@ -133526,7 +133548,7 @@ async function ofx2json(ofx) {
133526
133548
  try {
133527
133549
  dataParsed = await parseXml(content);
133528
133550
  }
133529
- catch (e) {
133551
+ catch {
133530
133552
  const sanitized = sgml2Xml(content);
133531
133553
  dataParsed = await parseXml(sanitized);
133532
133554
  }
@@ -134008,7 +134030,7 @@ exports.handlers["get-server-version"] = async function () {
134008
134030
  const info = JSON.parse(res);
134009
134031
  version = info.build.version;
134010
134032
  }
134011
- catch (err) {
134033
+ catch {
134012
134034
  return { error: "network-failure" };
134013
134035
  }
134014
134036
  return { version };
@@ -134059,7 +134081,7 @@ async function setupDocumentsDir() {
134059
134081
  try {
134060
134082
  await ensureExists(documentDir2);
134061
134083
  }
134062
- catch (e) {
134084
+ catch {
134063
134085
  documentDir2 = null;
134064
134086
  }
134065
134087
  }
package/dist/index.js CHANGED
@@ -68,7 +68,7 @@ async function shutdown() {
68
68
  try {
69
69
  await actualApp.send('sync');
70
70
  }
71
- catch (e) {
71
+ catch {
72
72
  // most likely that no budget is loaded, so the sync failed
73
73
  }
74
74
  await actualApp.send('close-budget');
@@ -82,7 +82,7 @@ CREATE TABLE kvcache_key (id INTEGER PRIMARY KEY, key REAL);
82
82
  const value = JSON.parse(str);
83
83
  return value && value !== '' ? value : null;
84
84
  }
85
- catch (e) {
85
+ catch {
86
86
  return null;
87
87
  }
88
88
  };
@@ -45,7 +45,7 @@ async function runMigration(db, { fs, fileId }) {
45
45
  ]);
46
46
  }));
47
47
  }
48
- catch (e) {
48
+ catch {
49
49
  // Do nothing
50
50
  }
51
51
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "25.12.0",
3
+ "version": "26.1.0-nightly.20251205",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "25.12.0",
3
+ "version": "26.1.0-nightly.20251205",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {