@hisaabo/cli 0.6.1 → 0.7.5
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.
- package/.turbo/turbo-typecheck.log +1 -1
- package/dist/bin/{audit-trail-4AMEFQGB.js → audit-trail-DLSSSM4T.js} +3 -3
- package/dist/bin/{categories-CLCBRNWC.js → categories-63QR6WCV.js} +2 -2
- package/dist/bin/{check-slug-OKW7KDYG.js → check-slug-NXO55WKH.js} +2 -2
- package/dist/bin/{chunk-FIMJZAS4.js → chunk-7MJDOL6B.js} +18 -1
- package/dist/bin/{chunk-GXRLFDZW.js → chunk-M42SETRZ.js} +9 -0
- package/dist/bin/{chunk-T63VQXNM.js → chunk-ZPYC767N.js} +1 -0
- package/dist/bin/{client-2ZKMLWI6.js → client-T32CIZA3.js} +1 -1
- package/dist/bin/{collection-efficiency-TECE6PVQ.js → collection-efficiency-T6PWNTZO.js} +3 -3
- package/dist/bin/{config-335MN4I7.js → config-V4QFCONN.js} +3 -1
- package/dist/bin/{create-AS2YVGRA.js → create-NUKHDWLK.js} +2 -2
- package/dist/bin/{default-account-3RVSU7RF.js → default-account-JWFPHMRF.js} +2 -2
- package/dist/bin/{expenses-KXFQJKD6.js → expenses-2UWUZVLI.js} +3 -3
- package/dist/bin/{export-UHZISG7H.js → export-XSX7WQH7.js} +2 -2
- package/dist/bin/{factory-OBESY2LG.js → factory-BWOKRIP4.js} +3 -3
- package/dist/bin/{get-WUSYEMG4.js → get-CHNTG3IM.js} +2 -2
- package/dist/bin/{get-GTL556HL.js → get-ZSZ6SL3N.js} +3 -3
- package/dist/bin/hisaabo.js +64 -59
- package/dist/bin/{invitations-U4ZNYWY7.js → invitations-H2SL3XAD.js} +2 -2
- package/dist/bin/{invite-5S4GJKRF.js → invite-EW73UIBE.js} +2 -2
- package/dist/bin/{invoice-breakdown-PP3BZQLG.js → invoice-breakdown-XP4QATCF.js} +3 -3
- package/dist/bin/{items-CHEFLI7C.js → items-DPD6EFTP.js} +3 -3
- package/dist/bin/{items-toggle-ETVCDCU6.js → items-toggle-R4OPSE4W.js} +2 -2
- package/dist/bin/{list-RJ34MFPR.js → list-KLEHBMQ2.js} +2 -2
- package/dist/bin/{list-3FO4UJKC.js → list-PKHBE475.js} +3 -3
- package/dist/bin/{list-LQJGTZB4.js → list-UR7OOJVF.js} +2 -2
- package/dist/bin/{members-TE5K5NQC.js → members-XA3TF4IQ.js} +3 -3
- package/dist/bin/{monthly-comparison-Q6KPMTPS.js → monthly-comparison-OLVS5HEY.js} +3 -3
- package/dist/bin/{order-cancel-NOQDBL2N.js → order-cancel-MXMJFFRR.js} +2 -2
- package/dist/bin/{order-confirm-6WMKTGPV.js → order-confirm-IXU45Q4L.js} +2 -2
- package/dist/bin/{order-get-ONWR4GTW.js → order-get-RDXMHLJ7.js} +3 -3
- package/dist/bin/{order-update-IVO4AFGV.js → order-update-KGIPBEJX.js} +3 -3
- package/dist/bin/{payment-modes-FXB2G6WP.js → payment-modes-CZL35SVS.js} +3 -3
- package/dist/bin/{profit-loss-XPYELDTH.js → profit-loss-M332OSC5.js} +3 -3
- package/dist/bin/{receivables-aging-MU6Q3DZ4.js → receivables-aging-OXRHGMBF.js} +3 -3
- package/dist/bin/{remove-DJBOOOR4.js → remove-I5HD2Y4K.js} +2 -2
- package/dist/bin/{revoke-5L5GZ4ZZ.js → revoke-MFLWGCMP.js} +2 -2
- package/dist/bin/{revoke-WRIK7HLY.js → revoke-OC6AOMIZ.js} +2 -2
- package/dist/bin/{revoke-all-QARW2G6R.js → revoke-all-FSAPBB3P.js} +2 -2
- package/dist/bin/{revoke-invitation-ZGLJHYNB.js → revoke-invitation-JXDPXTOW.js} +2 -2
- package/dist/bin/{sales-trend-P5HOZJSX.js → sales-trend-KK63WNDL.js} +3 -3
- package/dist/bin/{sequence-LK6QLSI5.js → sequence-IQ4HUJ3W.js} +2 -2
- package/dist/bin/{store-FU7CEILC.js → store-6QT6HKG2.js} +3 -3
- package/dist/bin/{summary-XONLN72I.js → summary-3FTF5B4A.js} +3 -3
- package/dist/bin/{top-customers-U6HQW2GH.js → top-customers-HNYGXBQZ.js} +3 -3
- package/dist/bin/{top-items-EAOIVZ4P.js → top-items-JUDG3BVW.js} +3 -3
- package/dist/bin/{top-outstanding-4546FJDH.js → top-outstanding-WK26ZNE5.js} +3 -3
- package/dist/bin/{unpaid-invoices-AED55PLC.js → unpaid-invoices-RYFIIIK7.js} +3 -3
- package/dist/bin/{untracked-ZEM2CDHC.js → untracked-FAFS3KCK.js} +3 -3
- package/dist/bin/{update-FO7AAXF5.js → update-5YSPXIWO.js} +3 -3
- package/dist/bin/{update-OZPBIBME.js → update-I46XLU77.js} +2 -2
- package/dist/bin/{update-QCK32XAG.js → update-NAW2JWZS.js} +3 -3
- package/dist/bin/{update-role-RB35QIA5.js → update-role-5GV42MSN.js} +2 -2
- package/dist/bin/{update-settings-EUC2FJQJ.js → update-settings-KYSQDIEO.js} +2 -2
- package/package.json +1 -1
- package/src/client.ts +21 -1
- package/src/commands/invoice/get.ts +9 -1
- package/src/config.ts +24 -0
- package/src/format.ts +1 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
formatDate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZPYC767N.js";
|
|
5
5
|
import {
|
|
6
6
|
HisaaboApiError,
|
|
7
7
|
HisaaboClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-M42SETRZ.js";
|
|
9
9
|
import {
|
|
10
10
|
requireAuth
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7MJDOL6B.js";
|
|
12
12
|
import {
|
|
13
13
|
EXIT,
|
|
14
14
|
fatalError,
|
|
@@ -73,6 +73,22 @@ function requireAuth() {
|
|
|
73
73
|
function getConfigPath() {
|
|
74
74
|
return conf.path;
|
|
75
75
|
}
|
|
76
|
+
async function checkMaintenance(client) {
|
|
77
|
+
try {
|
|
78
|
+
const status = await client.system.maintenanceStatus();
|
|
79
|
+
if (status.enabled) {
|
|
80
|
+
warn(`System is under maintenance: ${status.message || "Please try again later."}`);
|
|
81
|
+
if (status.endsAt) {
|
|
82
|
+
const end = new Date(status.endsAt).toLocaleString();
|
|
83
|
+
warn(`Estimated end: ${end}`);
|
|
84
|
+
}
|
|
85
|
+
} else if (status.startsAt && new Date(status.startsAt) > /* @__PURE__ */ new Date()) {
|
|
86
|
+
const start = new Date(status.startsAt).toLocaleString();
|
|
87
|
+
warn(`Scheduled maintenance: ${start}${status.message ? ` \u2014 ${status.message}` : ""}`);
|
|
88
|
+
}
|
|
89
|
+
} catch {
|
|
90
|
+
}
|
|
91
|
+
}
|
|
76
92
|
|
|
77
93
|
export {
|
|
78
94
|
getConfig,
|
|
@@ -80,5 +96,6 @@ export {
|
|
|
80
96
|
clearConfig,
|
|
81
97
|
isAuthenticated,
|
|
82
98
|
requireAuth,
|
|
83
|
-
getConfigPath
|
|
99
|
+
getConfigPath,
|
|
100
|
+
checkMaintenance
|
|
84
101
|
};
|
|
@@ -1073,6 +1073,15 @@ var HisaaboClient = class {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
+
// ── System ──────────────────────────────────────────────────────
|
|
1077
|
+
get system() {
|
|
1078
|
+
const c = this;
|
|
1079
|
+
return {
|
|
1080
|
+
maintenanceStatus() {
|
|
1081
|
+
return c.query("system.maintenanceStatus");
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1076
1085
|
};
|
|
1077
1086
|
|
|
1078
1087
|
export {
|
|
@@ -74,6 +74,7 @@ var STATUS_CONFIG = {
|
|
|
74
74
|
partial: { label: "PARTIAL", color: (s) => chalk.yellow(s) },
|
|
75
75
|
overdue: { label: "OVERDUE", color: (s) => chalk.red(s) },
|
|
76
76
|
cancelled: { label: "CANCEL", color: (s) => chalk.dim(chalk.strikethrough(s)) },
|
|
77
|
+
adjusted: { label: "ADJUST", color: (s) => chalk.magenta(s) },
|
|
77
78
|
unfulfilled: { label: "UNFUL", color: (s) => chalk.blue(s) },
|
|
78
79
|
pending: { label: "PEND", color: (s) => chalk.yellow(s) },
|
|
79
80
|
confirmed: { label: "CONF", color: (s) => chalk.blue(s) },
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
monthEnd,
|
|
6
6
|
monthStart,
|
|
7
7
|
todayISO
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZPYC767N.js";
|
|
9
9
|
import {
|
|
10
10
|
HisaaboApiError,
|
|
11
11
|
HisaaboClient
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-M42SETRZ.js";
|
|
13
13
|
import {
|
|
14
14
|
requireAuth
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7MJDOL6B.js";
|
|
16
16
|
import {
|
|
17
17
|
EXIT,
|
|
18
18
|
fatalError,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
checkMaintenance,
|
|
3
4
|
clearConfig,
|
|
4
5
|
getConfig,
|
|
5
6
|
getConfigPath,
|
|
6
7
|
isAuthenticated,
|
|
7
8
|
requireAuth,
|
|
8
9
|
setConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7MJDOL6B.js";
|
|
10
11
|
import "./chunk-NO4FIFMS.js";
|
|
11
12
|
export {
|
|
13
|
+
checkMaintenance,
|
|
12
14
|
clearConfig,
|
|
13
15
|
getConfig,
|
|
14
16
|
getConfigPath,
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
monthEnd,
|
|
6
6
|
monthStart,
|
|
7
7
|
todayISO
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZPYC767N.js";
|
|
9
9
|
import {
|
|
10
10
|
HisaaboApiError,
|
|
11
11
|
HisaaboClient
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-M42SETRZ.js";
|
|
13
13
|
import {
|
|
14
14
|
requireAuth
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7MJDOL6B.js";
|
|
16
16
|
import {
|
|
17
17
|
EXIT,
|
|
18
18
|
fatalError,
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
monthEnd,
|
|
10
10
|
monthStart,
|
|
11
11
|
todayISO
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZPYC767N.js";
|
|
13
13
|
import {
|
|
14
14
|
HisaaboApiError,
|
|
15
15
|
HisaaboClient
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-M42SETRZ.js";
|
|
17
17
|
import {
|
|
18
18
|
requireAuth
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7MJDOL6B.js";
|
|
20
20
|
import {
|
|
21
21
|
EXIT,
|
|
22
22
|
fatalError,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDate,
|
|
4
4
|
formatINR
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZPYC767N.js";
|
|
6
6
|
import {
|
|
7
7
|
HisaaboApiError,
|
|
8
8
|
HisaaboClient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M42SETRZ.js";
|
|
10
10
|
import {
|
|
11
11
|
requireAuth
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7MJDOL6B.js";
|
|
13
13
|
import {
|
|
14
14
|
EXIT,
|
|
15
15
|
fatalError,
|