ledgit-cli 0.5.1 → 0.5.2

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 +14 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49060,13 +49060,23 @@ async function loadConfig(cwd = process.cwd()) {
49060
49060
  const provider = process.env.PROVIDER;
49061
49061
  if (!provider) {
49062
49062
  if (process.env.BOKIO_TOKEN && process.env.BOKIO_COMPANY_ID) {
49063
- return {
49063
+ const result = {
49064
49064
  provider: "bokio",
49065
49065
  bokio: {
49066
49066
  token: process.env.BOKIO_TOKEN,
49067
49067
  companyId: process.env.BOKIO_COMPANY_ID
49068
49068
  }
49069
49069
  };
49070
+ const inboxProvider = process.env.INBOX_PROVIDER;
49071
+ if (inboxProvider === "bokio") {
49072
+ result.inboxProvider = "bokio";
49073
+ } else if (process.env.LEDGIT_API_TOKEN) {
49074
+ result.inboxProvider = "ledgit";
49075
+ result.ledgit = {
49076
+ getAccessToken: async () => process.env.LEDGIT_API_TOKEN
49077
+ };
49078
+ }
49079
+ return result;
49070
49080
  }
49071
49081
  throw new Error("No configuration found. Set BOKIO_TOKEN and BOKIO_COMPANY_ID environment variables, or run from a ledgit repository with .env file.");
49072
49082
  }
@@ -49090,7 +49100,9 @@ async function loadConfig(cwd = process.cwd()) {
49090
49100
  provider: "bokio",
49091
49101
  bokio: { token, companyId }
49092
49102
  };
49093
- if (inboxProvider === "ledgit") {
49103
+ if (inboxProvider === "bokio") {
49104
+ result.inboxProvider = "bokio";
49105
+ } else if (inboxProvider === "ledgit") {
49094
49106
  result.inboxProvider = "ledgit";
49095
49107
  result.ledgit = {
49096
49108
  getAccessToken: async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ledgit-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "CLI for ledgit bookkeeping repositories",
5
5
  "repository": {
6
6
  "type": "git",