@arbidocs/cli 0.4.58 → 0.4.60
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/CHANGELOG.md +28 -0
- package/dist/index.js +36 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.4.60
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.4.59...HEAD)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **documents:** Sign a document electronically ([4f8638ac8](https://github.com/arbicity/ARBI-frontend/commit/4f8638ac8))
|
|
10
|
+
|
|
11
|
+
### ✅ Tests
|
|
12
|
+
|
|
13
|
+
- Native Android Chrome long-press selection test for the annotation layer ([#1473](https://github.com/arbicity/ARBI-frontend/pull/1473))
|
|
14
|
+
|
|
15
|
+
## v0.4.59
|
|
16
|
+
|
|
17
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.4.58...HEAD)
|
|
18
|
+
|
|
19
|
+
### 🚀 Enhancements
|
|
20
|
+
|
|
21
|
+
- ⚠️ Read document versions, derivations and email families separately ([8695a8ffc](https://github.com/arbicity/ARBI-frontend/commit/8695a8ffc))
|
|
22
|
+
|
|
23
|
+
### 🏡 Chore
|
|
24
|
+
|
|
25
|
+
- Regenerate OpenAPI types from the canonical backend spec ([8d5d2cd76](https://github.com/arbicity/ARBI-frontend/commit/8d5d2cd76))
|
|
26
|
+
|
|
27
|
+
#### ⚠️ Breaking Changes
|
|
28
|
+
|
|
29
|
+
- ⚠️ Read document versions, derivations and email families separately ([8695a8ffc](https://github.com/arbicity/ARBI-frontend/commit/8695a8ffc))
|
|
30
|
+
|
|
3
31
|
## v0.4.58
|
|
4
32
|
|
|
5
33
|
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.4.57...HEAD)
|
package/dist/index.js
CHANGED
|
@@ -3694,7 +3694,7 @@ function getLatestVersion(skipCache = false) {
|
|
|
3694
3694
|
}
|
|
3695
3695
|
}
|
|
3696
3696
|
function getCurrentVersion() {
|
|
3697
|
-
return "0.4.
|
|
3697
|
+
return "0.4.60";
|
|
3698
3698
|
}
|
|
3699
3699
|
function readChangelog(fromVersion, toVersion) {
|
|
3700
3700
|
try {
|
|
@@ -3747,17 +3747,17 @@ function showChangelog(fromVersion, toVersion) {
|
|
|
3747
3747
|
async function checkForUpdates(autoUpdate) {
|
|
3748
3748
|
try {
|
|
3749
3749
|
const latest = getLatestVersion();
|
|
3750
|
-
if (!latest || latest === "0.4.
|
|
3750
|
+
if (!latest || latest === "0.4.60") return;
|
|
3751
3751
|
if (autoUpdate) {
|
|
3752
3752
|
warn(`
|
|
3753
|
-
Your arbi version is out of date (${"0.4.
|
|
3753
|
+
Your arbi version is out of date (${"0.4.60"} \u2192 ${latest}). Updating...`);
|
|
3754
3754
|
child_process.execSync("npm install -g @arbidocs/cli@latest", { stdio: "inherit" });
|
|
3755
|
-
showChangelog("0.4.
|
|
3755
|
+
showChangelog("0.4.60", latest);
|
|
3756
3756
|
console.log(`Updated to ${latest}.`);
|
|
3757
3757
|
} else {
|
|
3758
3758
|
warn(
|
|
3759
3759
|
`
|
|
3760
|
-
Your arbi version is out of date (${"0.4.
|
|
3760
|
+
Your arbi version is out of date (${"0.4.60"} \u2192 ${latest}).
|
|
3761
3761
|
Run "arbi update" to upgrade, or "arbi update auto" to always stay up to date.`
|
|
3762
3762
|
);
|
|
3763
3763
|
}
|
|
@@ -3789,10 +3789,10 @@ function markNagShown(latest) {
|
|
|
3789
3789
|
function hintUpdateOnError() {
|
|
3790
3790
|
try {
|
|
3791
3791
|
const cached = readCache();
|
|
3792
|
-
if (!cached || cached.latest === "0.4.
|
|
3792
|
+
if (!cached || cached.latest === "0.4.60") return;
|
|
3793
3793
|
if (!shouldShowNag(cached.latest)) return;
|
|
3794
3794
|
warn(
|
|
3795
|
-
`Your arbi version is out of date (${"0.4.
|
|
3795
|
+
`Your arbi version is out of date (${"0.4.60"} \u2192 ${cached.latest}). Run "arbi update".`
|
|
3796
3796
|
);
|
|
3797
3797
|
markNagShown(cached.latest);
|
|
3798
3798
|
} catch {
|
|
@@ -6031,7 +6031,25 @@ function registerDocsCommand(program2) {
|
|
|
6031
6031
|
}
|
|
6032
6032
|
})()
|
|
6033
6033
|
);
|
|
6034
|
-
doc.command("
|
|
6034
|
+
doc.command("versions <id>").description("List every version of a document (any version id), oldest first").option("--json", "Output as JSON").action(
|
|
6035
|
+
(id, opts) => runAction(async () => {
|
|
6036
|
+
const { arbi } = await resolveWorkspace();
|
|
6037
|
+
const versions = await sdk.documents.listVersions(arbi, id);
|
|
6038
|
+
if (opts?.json) {
|
|
6039
|
+
console.log(JSON.stringify(versions, null, 2));
|
|
6040
|
+
return;
|
|
6041
|
+
}
|
|
6042
|
+
for (const v of versions) {
|
|
6043
|
+
const marker = v.is_current ? chalk2__default.default.green(" (current)") : "";
|
|
6044
|
+
console.log(
|
|
6045
|
+
`v${v.version_number} ${v.external_id} ${v.created_at} ${v.file_name ?? ""}${marker}`
|
|
6046
|
+
);
|
|
6047
|
+
}
|
|
6048
|
+
})()
|
|
6049
|
+
);
|
|
6050
|
+
doc.command("delete [ids...]").description(
|
|
6051
|
+
"Delete documents with all their versions and email attachments (interactive picker if no IDs given)"
|
|
6052
|
+
).option("--dry-run", "Preview which docs would be deleted (no SDK call)").action(
|
|
6035
6053
|
(ids, opts) => runAction(async () => {
|
|
6036
6054
|
const { arbi } = await resolveWorkspace();
|
|
6037
6055
|
let docIds = ids && ids.length > 0 ? ids : void 0;
|
|
@@ -6786,10 +6804,17 @@ function registerUploadCommand(program2) {
|
|
|
6786
6804
|
).option("--folder <name>", "Backend folder for plain-file uploads (direct upload only)").option(
|
|
6787
6805
|
"--wp-type <type>",
|
|
6788
6806
|
"Work product type: source (default), skill, memory, artifact, webpage. Use --wp-type skill with --folder skills/<slug> to upload a SKILL.md."
|
|
6807
|
+
).option(
|
|
6808
|
+
"--version-of <docId>",
|
|
6809
|
+
"Upload a single file as the next version of this document (it becomes the current version)"
|
|
6789
6810
|
).action(
|
|
6790
6811
|
(paths, opts) => runAction(async () => {
|
|
6791
6812
|
const isManifestMode = Boolean(opts.manifest || opts.log || opts.resume);
|
|
6792
6813
|
const inputPaths = paths ?? [];
|
|
6814
|
+
if (opts.versionOf && (isManifestMode || opts.s3 || inputPaths.length !== 1 || !fs7__default.default.existsSync(inputPaths[0]) || !fs7__default.default.statSync(inputPaths[0]).isFile())) {
|
|
6815
|
+
error("--version-of takes exactly one file (not a folder, archive, manifest or --s3).");
|
|
6816
|
+
process.exit(1);
|
|
6817
|
+
}
|
|
6793
6818
|
if (isManifestMode) {
|
|
6794
6819
|
if (opts.s3) {
|
|
6795
6820
|
error("--s3 is not supported with manifest mode yet.");
|
|
@@ -6945,7 +6970,8 @@ function registerUploadCommand(program2) {
|
|
|
6945
6970
|
}
|
|
6946
6971
|
const result = await sdk.documentsNode.uploadLocalFile(auth, filePath, {
|
|
6947
6972
|
folder: opts.folder,
|
|
6948
|
-
wpType: opts.wpType
|
|
6973
|
+
wpType: opts.wpType,
|
|
6974
|
+
versionOf: opts.versionOf
|
|
6949
6975
|
});
|
|
6950
6976
|
if (!opts.json) {
|
|
6951
6977
|
success(`Uploaded: ${result.fileName} (${(result.doc_ext_ids ?? []).join(", ")})`);
|
|
@@ -10972,7 +10998,7 @@ console.info = (...args) => {
|
|
|
10972
10998
|
_origInfo(...args);
|
|
10973
10999
|
};
|
|
10974
11000
|
var program = new commander.Command();
|
|
10975
|
-
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.4.
|
|
11001
|
+
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.4.60").showHelpAfterError(true).showSuggestionAfterError(true);
|
|
10976
11002
|
registerConfigCommand(program);
|
|
10977
11003
|
registerLoginCommand(program);
|
|
10978
11004
|
registerRegisterCommand(program);
|