@dropthis/cli 0.15.0 → 0.17.0
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/README.md +4 -5
- package/dist/cli.cjs +47 -6
- package/dist/cli.cjs.map +1 -1
- package/node_modules/@dropthis/node/README.md +38 -6
- package/node_modules/@dropthis/node/dist/{drops-C59ZhFES.d.cts → drops-BxDQRrvu.d.cts} +29 -0
- package/node_modules/@dropthis/node/dist/{drops-C59ZhFES.d.ts → drops-BxDQRrvu.d.ts} +29 -0
- package/node_modules/@dropthis/node/dist/edge.cjs +7 -1
- package/node_modules/@dropthis/node/dist/edge.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/edge.d.cts +1 -1
- package/node_modules/@dropthis/node/dist/edge.d.ts +1 -1
- package/node_modules/@dropthis/node/dist/edge.mjs +7 -1
- package/node_modules/@dropthis/node/dist/edge.mjs.map +1 -1
- package/node_modules/@dropthis/node/dist/index.cjs +7 -1
- package/node_modules/@dropthis/node/dist/index.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/index.d.cts +2 -2
- package/node_modules/@dropthis/node/dist/index.d.ts +2 -2
- package/node_modules/@dropthis/node/dist/index.mjs +7 -1
- package/node_modules/@dropthis/node/dist/index.mjs.map +1 -1
- package/node_modules/@dropthis/node/package.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -269,13 +269,12 @@ Reports CLI version, auth source (`env`, `flag`, `storage`, or `missing`), and c
|
|
|
269
269
|
|
|
270
270
|
## Pricing tiers
|
|
271
271
|
|
|
272
|
-
- **Free
|
|
273
|
-
- **
|
|
274
|
-
- **Pro ($19/mo)** — everything in Personal plus password protection and analytics.
|
|
272
|
+
- **Free** — drops expire after 7 days, 5 MB per drop, 500 MB active storage, dropthis badge.
|
|
273
|
+
- **Pro** — drops never expire, 100 MB per drop, 10 GB storage, no badge, 1 custom domain, password-protected drops. Pro is currently invite-only. Learn more at https://dropthis.app/pricing.
|
|
275
274
|
|
|
276
|
-
|
|
275
|
+
Connecting a custom domain (`dropthis domains connect`) requires the Pro plan (1 hostname). Domains already connected keep working regardless of plan.
|
|
277
276
|
|
|
278
|
-
`dropthis account` shows your active tier and its limits.
|
|
277
|
+
`dropthis account` shows your active tier and its limits.
|
|
279
278
|
|
|
280
279
|
## Agent skills
|
|
281
280
|
|
package/dist/cli.cjs
CHANGED
|
@@ -322,6 +322,11 @@ function writeResult(deps, link, verb, data) {
|
|
|
322
322
|
const details = formatDropDetails(data);
|
|
323
323
|
if (details) deps.stdout(`${details}
|
|
324
324
|
`);
|
|
325
|
+
const rawUrl = data.rawUrl;
|
|
326
|
+
if (typeof rawUrl === "string" && rawUrl.length > 0) {
|
|
327
|
+
deps.stdout(`${hint(`Raw: ${url(rawUrl)}`)}
|
|
328
|
+
`);
|
|
329
|
+
}
|
|
325
330
|
const warnings = data.warnings;
|
|
326
331
|
if (Array.isArray(warnings)) {
|
|
327
332
|
for (const w of warnings) {
|
|
@@ -365,7 +370,9 @@ function formatDateTime(iso) {
|
|
|
365
370
|
function formatBytes(bytes) {
|
|
366
371
|
if (bytes < 1024) return `${bytes} B`;
|
|
367
372
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
368
|
-
|
|
373
|
+
if (bytes < 1024 * 1024 * 1024)
|
|
374
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
375
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
369
376
|
}
|
|
370
377
|
function writeJson(deps, envelope) {
|
|
371
378
|
deps.stdout(`${JSON.stringify(envelope)}
|
|
@@ -481,7 +488,29 @@ async function runAccountGet(_input, deps) {
|
|
|
481
488
|
if (data?.status) pairs.push(["Status", String(data.status)]);
|
|
482
489
|
if (data?.createdAt)
|
|
483
490
|
pairs.push(["Created", String(data.createdAt).split("T")[0]]);
|
|
491
|
+
const usage = data?.usage;
|
|
492
|
+
const limits = data?.limits;
|
|
493
|
+
if (typeof usage?.storageUsedBytes === "number") {
|
|
494
|
+
if (typeof limits?.maxStorageBytes === "number") {
|
|
495
|
+
pairs.push([
|
|
496
|
+
"Storage",
|
|
497
|
+
`${formatBytes(usage.storageUsedBytes)} of ${formatBytes(limits.maxStorageBytes)}`
|
|
498
|
+
]);
|
|
499
|
+
} else {
|
|
500
|
+
pairs.push(["Storage", formatBytes(usage.storageUsedBytes)]);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
if (typeof usage?.customDomainsUsed === "number" && typeof limits?.maxCustomHostnames === "number") {
|
|
504
|
+
pairs.push([
|
|
505
|
+
"Domains",
|
|
506
|
+
`${usage.customDomainsUsed} of ${limits.maxCustomHostnames}`
|
|
507
|
+
]);
|
|
508
|
+
}
|
|
484
509
|
writeKv(deps, pairs, { ok: true, account: result.data });
|
|
510
|
+
if (typeof data?.upgradeUrl === "string") {
|
|
511
|
+
deps.stderr(`${hint(`Upgrade: ${data.upgradeUrl}`)}
|
|
512
|
+
`);
|
|
513
|
+
}
|
|
485
514
|
return { exitCode: 0 };
|
|
486
515
|
}
|
|
487
516
|
async function runAccountUpdate(input, deps) {
|
|
@@ -880,13 +909,13 @@ async function runDoctor(_input, deps) {
|
|
|
880
909
|
const authSource = credential?.source ?? "missing";
|
|
881
910
|
const storageBackend = stored?.storage ?? "none";
|
|
882
911
|
const pairs = [
|
|
883
|
-
["Version", "0.
|
|
912
|
+
["Version", "0.17.0"],
|
|
884
913
|
["Auth", authSource],
|
|
885
914
|
["Storage", storageBackend]
|
|
886
915
|
];
|
|
887
916
|
writeKv(deps, pairs, {
|
|
888
917
|
ok: true,
|
|
889
|
-
version: "0.
|
|
918
|
+
version: "0.17.0",
|
|
890
919
|
auth: { source: authSource },
|
|
891
920
|
storage: { backend: storageBackend }
|
|
892
921
|
});
|
|
@@ -2567,7 +2596,7 @@ function buildProgram(options = {}) {
|
|
|
2567
2596
|
` ${import_picocolors6.default.cyan("dropthis login")}`,
|
|
2568
2597
|
` ${import_picocolors6.default.cyan("dropthis publish ./dist")}`
|
|
2569
2598
|
].join("\n")
|
|
2570
|
-
).version("0.
|
|
2599
|
+
).version("0.17.0").configureHelp({
|
|
2571
2600
|
subcommandTerm(cmd) {
|
|
2572
2601
|
const args = cmd.registeredArguments.map((a) => {
|
|
2573
2602
|
const name = a.name();
|
|
@@ -2631,6 +2660,18 @@ ${lines.map((l) => ` ${l}`).join("\n")}
|
|
|
2631
2660
|
"dropthis publish ./report.html --domain shared # bypass the account default domain",
|
|
2632
2661
|
"URL=$(dropthis publish ./dist --url)"
|
|
2633
2662
|
])
|
|
2663
|
+
).addHelpText(
|
|
2664
|
+
"after",
|
|
2665
|
+
[
|
|
2666
|
+
`
|
|
2667
|
+
${import_picocolors6.default.bold("Canonical vs raw URLs:")}`,
|
|
2668
|
+
" The canonical URL (the one printed) is always a branded human view, so the",
|
|
2669
|
+
" badge is guaranteed \u2014 hand it to people. For a single non-HTML file (e.g. a",
|
|
2670
|
+
" .md or .json), publish also prints a 'Raw:' line: the raw bytes at their",
|
|
2671
|
+
" natural path, with no wrapper \u2014 hand this to other agents. HTML drops and",
|
|
2672
|
+
" multi-file collections have no raw URL (the page IS the artifact / per-file",
|
|
2673
|
+
" paths come from the manifest)."
|
|
2674
|
+
].join("\n")
|
|
2634
2675
|
).action(async (inputs, commandOptions) => {
|
|
2635
2676
|
const stdinIsTTY = options.stdinIsTTY ?? process.stdin.isTTY ?? false;
|
|
2636
2677
|
if (inputs.length === 0 && stdinIsTTY) {
|
|
@@ -3112,7 +3153,7 @@ ${lines.map((l) => ` ${l}`).join("\n")}
|
|
|
3112
3153
|
);
|
|
3113
3154
|
const result = await runUpgrade(commandOptions, {
|
|
3114
3155
|
...deps,
|
|
3115
|
-
currentVersion: "0.
|
|
3156
|
+
currentVersion: "0.17.0"
|
|
3116
3157
|
});
|
|
3117
3158
|
process.exitCode = result.exitCode;
|
|
3118
3159
|
});
|
|
@@ -3355,7 +3396,7 @@ var showNotice = shouldShowNotice({
|
|
|
3355
3396
|
if (showNotice) {
|
|
3356
3397
|
const notice = noticeFromCache({
|
|
3357
3398
|
cache: updateCache,
|
|
3358
|
-
currentVersion: "0.
|
|
3399
|
+
currentVersion: "0.17.0"
|
|
3359
3400
|
});
|
|
3360
3401
|
if (notice) {
|
|
3361
3402
|
process.stderr.write(`
|