@rigxyz/tapd 0.6.4 → 0.6.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/dist/bin.js +24 -2
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-F3HYZR2Y.js → chunk-7RKYNS5V.js} +0 -0
- package/dist/chunk-7RKYNS5V.js.map +1 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/dist/chunk-F3HYZR2Y.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ImportTokenScopeError,
|
|
6
6
|
ImportValidationFailed,
|
|
7
7
|
InvalidInviteUrlError,
|
|
8
|
+
MAX_FILE_BYTES,
|
|
8
9
|
NotInitializedError,
|
|
9
10
|
OrgForbiddenError,
|
|
10
11
|
RelayClient,
|
|
@@ -23,11 +24,12 @@ import {
|
|
|
23
24
|
mint,
|
|
24
25
|
openStateDb,
|
|
25
26
|
readBindingConfig,
|
|
27
|
+
readNotSynced,
|
|
26
28
|
removeImport,
|
|
27
29
|
revoke,
|
|
28
30
|
safeResolveRigPath,
|
|
29
31
|
start
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-7RKYNS5V.js";
|
|
31
33
|
|
|
32
34
|
// src/bin.ts
|
|
33
35
|
import { join as pathJoin, resolve } from "path";
|
|
@@ -281,7 +283,7 @@ import { existsSync as existsSync4 } from "fs";
|
|
|
281
283
|
import { join as join4 } from "path";
|
|
282
284
|
|
|
283
285
|
// src/version.ts
|
|
284
|
-
var TAPD_VERSION = "0.6.
|
|
286
|
+
var TAPD_VERSION = "0.6.5";
|
|
285
287
|
|
|
286
288
|
// src/status.ts
|
|
287
289
|
var STATE_KEY_LAST_APPLY_ERROR = "last_apply_error";
|
|
@@ -302,6 +304,7 @@ function statusToJson(report) {
|
|
|
302
304
|
trackedPaths: report.trackedPaths,
|
|
303
305
|
pendingApplies: report.pendingApplies,
|
|
304
306
|
pendingUploads: report.pendingUploads,
|
|
307
|
+
notSynced: report.notSynced,
|
|
305
308
|
conflicts: report.conflicts,
|
|
306
309
|
lastApplyError: report.lastApplyError,
|
|
307
310
|
offline: report.offline,
|
|
@@ -356,6 +359,7 @@ async function status(opts) {
|
|
|
356
359
|
pendingPeek: [],
|
|
357
360
|
pendingApplies: 0,
|
|
358
361
|
pendingUploads: 0,
|
|
362
|
+
notSynced: [],
|
|
359
363
|
conflicts: [],
|
|
360
364
|
conflictCount: 0,
|
|
361
365
|
lastApplyError: null,
|
|
@@ -416,6 +420,7 @@ async function status(opts) {
|
|
|
416
420
|
pendingPeek,
|
|
417
421
|
pendingApplies,
|
|
418
422
|
pendingUploads,
|
|
423
|
+
notSynced: readNotSynced(db),
|
|
419
424
|
conflicts,
|
|
420
425
|
conflictCount,
|
|
421
426
|
lastApplyError,
|
|
@@ -1136,6 +1141,23 @@ async function runStatus(flags2) {
|
|
|
1136
1141
|
` last err: ${C.red(e.reason)} ${C.dim(`(${e.op} ${e.path} @ ${e.eventId}${e.at ? `, ${e.at}` : ""})`)}`
|
|
1137
1142
|
);
|
|
1138
1143
|
}
|
|
1144
|
+
const overQuota = report.notSynced.filter((f) => f.reason === "quota_exceeded");
|
|
1145
|
+
const tooLarge = report.notSynced.filter((f) => f.reason === "file_too_large");
|
|
1146
|
+
const mb = (n) => `${Math.round(n / (1024 * 1024))} MB`;
|
|
1147
|
+
const plural = (n) => `${n} file${n === 1 ? "" : "s"}`;
|
|
1148
|
+
if (overQuota.length > 0) {
|
|
1149
|
+
const limit = overQuota.find((f) => f.limitBytes !== void 0)?.limitBytes;
|
|
1150
|
+
console.log(
|
|
1151
|
+
` ${C.yellow(`${plural(overQuota.length)} not synced`)}: over the space's ${limit ? `${mb(limit)} ` : ""}storage limit`
|
|
1152
|
+
);
|
|
1153
|
+
for (const f of overQuota) console.log(C.dim(` ${f.path}`));
|
|
1154
|
+
}
|
|
1155
|
+
if (tooLarge.length > 0) {
|
|
1156
|
+
console.log(
|
|
1157
|
+
` ${C.yellow(`${plural(tooLarge.length)} not synced`)}: over the ${mb(MAX_FILE_BYTES)} per-file limit`
|
|
1158
|
+
);
|
|
1159
|
+
for (const f of tooLarge) console.log(C.dim(` ${f.path}`));
|
|
1160
|
+
}
|
|
1139
1161
|
} else {
|
|
1140
1162
|
console.log(C.dim(" (import-only meta-rig \u2014 no primary binding)"));
|
|
1141
1163
|
}
|