@actual-app/api 26.1.0-nightly.20251230 → 26.1.0-nightly.20260101

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.
@@ -3520,6 +3520,43 @@ let send$2;
3520
3520
  function override(sendImplementation) {
3521
3521
  send$2 = sendImplementation;
3522
3522
  }
3523
+ let verboseMode = true;
3524
+ function setVerboseMode(verbose) {
3525
+ verboseMode = verbose;
3526
+ }
3527
+ const logger = {
3528
+ info: (...args) => {
3529
+ if (verboseMode) {
3530
+ console.log(...args);
3531
+ }
3532
+ },
3533
+ warn: (...args) => {
3534
+ console.warn(...args);
3535
+ },
3536
+ log: (...args) => {
3537
+ if (verboseMode) {
3538
+ console.log(...args);
3539
+ }
3540
+ },
3541
+ error: (...args) => {
3542
+ console.error(...args);
3543
+ },
3544
+ debug: (...args) => {
3545
+ if (verboseMode) {
3546
+ console.debug(...args);
3547
+ }
3548
+ },
3549
+ group: (...args) => {
3550
+ if (verboseMode) {
3551
+ console.group(...args);
3552
+ }
3553
+ },
3554
+ groupEnd: () => {
3555
+ if (verboseMode) {
3556
+ console.groupEnd();
3557
+ }
3558
+ }
3559
+ };
3523
3560
  var errCode;
3524
3561
  var hasRequiredErrCode;
3525
3562
  function requireErrCode() {
@@ -3950,12 +3987,12 @@ const writeFile = async (filepath, contents) => {
3950
3987
  return new Promise((resolve, reject2) => {
3951
3988
  fs__namespace.writeFile(filepath, contents, "utf8", (err) => {
3952
3989
  if (err) {
3953
- console.error(`Failed to write to ${filepath}. Attempted ${attempt} times. Something is locking the file - potentially a virus scanner or backup software.`);
3990
+ logger.error(`Failed to write to ${filepath}. Attempted ${attempt} times. Something is locking the file - potentially a virus scanner or backup software.`);
3954
3991
  reject2(err);
3955
3992
  }
3956
3993
  else {
3957
3994
  if (attempt > 1) {
3958
- console.info(`Successfully recovered from file lock. It took ${attempt} retries`);
3995
+ logger.info(`Successfully recovered from file lock. It took ${attempt} retries`);
3959
3996
  }
3960
3997
  resolve(void 0);
3961
3998
  }
@@ -3970,7 +4007,7 @@ const writeFile = async (filepath, contents) => {
3970
4007
  return void 0;
3971
4008
  }
3972
4009
  catch (err) {
3973
- console.error(`Unable to recover from file lock on file ${filepath}`);
4010
+ logger.error(`Unable to recover from file lock on file ${filepath}`);
3974
4011
  throw err;
3975
4012
  }
3976
4013
  };
@@ -4094,43 +4131,6 @@ const init$2 = function () {
4094
4131
  };
4095
4132
  const send$1 = function () {
4096
4133
  };
4097
- let verboseMode = true;
4098
- function setVerboseMode(verbose) {
4099
- verboseMode = verbose;
4100
- }
4101
- const logger = {
4102
- info: (...args) => {
4103
- if (verboseMode) {
4104
- console.log(...args);
4105
- }
4106
- },
4107
- warn: (...args) => {
4108
- console.warn(...args);
4109
- },
4110
- log: (...args) => {
4111
- if (verboseMode) {
4112
- console.log(...args);
4113
- }
4114
- },
4115
- error: (...args) => {
4116
- console.error(...args);
4117
- },
4118
- debug: (...args) => {
4119
- if (verboseMode) {
4120
- console.debug(...args);
4121
- }
4122
- },
4123
- group: (...args) => {
4124
- if (verboseMode) {
4125
- console.group(...args);
4126
- }
4127
- },
4128
- groupEnd: () => {
4129
- if (verboseMode) {
4130
- console.groupEnd();
4131
- }
4132
- }
4133
- };
4134
4134
  const byteToHex = [];
4135
4135
  for (let i = 0; i < 256; ++i) {
4136
4136
  byteToHex.push((i + 256).toString(16).slice(1));
@@ -5537,7 +5537,7 @@ function unicodeLike(pattern, value) {
5537
5537
  function verifyParamTypes(sql, arr) {
5538
5538
  arr.forEach((val2) => {
5539
5539
  if (typeof val2 !== "string" && typeof val2 !== "number" && val2 !== null) {
5540
- console.log(sql, arr);
5540
+ logger.log(sql, arr);
5541
5541
  throw new Error("Invalid field type " + val2 + " for sql " + sql);
5542
5542
  }
5543
5543
  });
@@ -5556,7 +5556,7 @@ function runQuery$1(db2, sql, params = [], fetchAll2 = false) {
5556
5556
  stmt = typeof sql === "string" ? db2.prepare(sql) : sql;
5557
5557
  }
5558
5558
  catch (e) {
5559
- console.log("error", sql);
5559
+ logger.log("error", sql);
5560
5560
  throw e;
5561
5561
  }
5562
5562
  if (fetchAll2) {
@@ -5565,7 +5565,7 @@ function runQuery$1(db2, sql, params = [], fetchAll2 = false) {
5565
5565
  return result;
5566
5566
  }
5567
5567
  catch (e) {
5568
- console.log("error", sql);
5568
+ logger.log("error", sql);
5569
5569
  throw e;
5570
5570
  }
5571
5571
  }
@@ -11817,10 +11817,10 @@ instance.hasLoadedNamespace;
11817
11817
  instance.loadNamespaces;
11818
11818
  instance.loadLanguages;
11819
11819
  const captureException = function (exc) {
11820
- console.error("[Exception]", exc);
11820
+ logger.error("[Exception]", exc);
11821
11821
  };
11822
11822
  const captureBreadcrumb = function (crumb) {
11823
- console.info("[Breadcrumb]", crumb);
11823
+ logger.info("[Breadcrumb]", crumb);
11824
11824
  };
11825
11825
  function isPreviewEnvironment() {
11826
11826
  return String(process.env.REACT_APP_NETLIFY) === "true";
@@ -60963,7 +60963,7 @@ function replaceTransactions(transactions, id2, func) {
60963
60963
  if (trans.is_parent || trans.is_child) {
60964
60964
  const parentIndex = findParentIndex(transactions, idx);
60965
60965
  if (parentIndex == null) {
60966
- console.log("Cannot find parent index");
60966
+ logger.log("Cannot find parent index");
60967
60967
  return {
60968
60968
  data: [],
60969
60969
  diff: { added: [], deleted: [], updated: [] },
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "26.1.0-nightly.20251230",
3
+ "version": "26.1.0-nightly.20260101",
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": "26.1.0-nightly.20251230",
3
+ "version": "26.1.0-nightly.20260101",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {