sim 2.1.22-preview.142.1 → 2.1.22-preview.143.1
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/index.js +22 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17025,7 +17025,7 @@ var CLI_CONTRACT = {
|
|
|
17025
17025
|
{ header: "current", path: "isCurrent", format: "bool" },
|
|
17026
17026
|
{ header: "source" },
|
|
17027
17027
|
{ header: "size", format: "bytes" },
|
|
17028
|
-
{ header: "authors", format: "
|
|
17028
|
+
{ header: "authors", format: "people" },
|
|
17029
17029
|
{ header: "created", path: "createdAt", format: "timestamp" },
|
|
17030
17030
|
{ header: "superseded", path: "supersededAt", format: "timestamp" }
|
|
17031
17031
|
]
|
|
@@ -17041,7 +17041,7 @@ var CLI_CONTRACT = {
|
|
|
17041
17041
|
{ header: "restored from", path: "restoredFromVersion" },
|
|
17042
17042
|
{ header: "size", format: "bytes" },
|
|
17043
17043
|
{ header: "type", path: "contentType" },
|
|
17044
|
-
{ header: "authors", format: "
|
|
17044
|
+
{ header: "authors", format: "people" },
|
|
17045
17045
|
{ header: "created", path: "createdAt", format: "timestamp" },
|
|
17046
17046
|
{ header: "updated", path: "updatedAt", format: "timestamp" },
|
|
17047
17047
|
{ header: "superseded", path: "supersededAt", format: "timestamp" }
|
|
@@ -17053,7 +17053,18 @@ var CLI_CONTRACT = {
|
|
|
17053
17053
|
},
|
|
17054
17054
|
revertFileVersion: {
|
|
17055
17055
|
command: "files versions revert",
|
|
17056
|
-
describe: "Make a previous version of a file current again"
|
|
17056
|
+
describe: "Make a previous version of a file current again",
|
|
17057
|
+
fields: [
|
|
17058
|
+
{ header: "reverted", format: "bool" },
|
|
17059
|
+
{ header: "file", path: "file.id" },
|
|
17060
|
+
{ header: "name", path: "file.name" },
|
|
17061
|
+
{ header: "version", path: "version.version" },
|
|
17062
|
+
{ header: "source", path: "version.source" },
|
|
17063
|
+
{ header: "restored from", path: "version.restoredFromVersion" },
|
|
17064
|
+
{ header: "size", path: "version.size", format: "bytes" },
|
|
17065
|
+
{ header: "authors", path: "version.authors", format: "people" },
|
|
17066
|
+
{ header: "created", path: "version.createdAt", format: "timestamp" }
|
|
17067
|
+
]
|
|
17057
17068
|
},
|
|
17058
17069
|
deleteFileVersion: {
|
|
17059
17070
|
command: "files versions delete",
|
|
@@ -17679,6 +17690,12 @@ function decodeFolderPath(value) {
|
|
|
17679
17690
|
}
|
|
17680
17691
|
}).join("/");
|
|
17681
17692
|
}
|
|
17693
|
+
function personLabel(person) {
|
|
17694
|
+
const { id, email } = person ?? {};
|
|
17695
|
+
if (typeof email === "string" && email)
|
|
17696
|
+
return email;
|
|
17697
|
+
return typeof id === "string" && id ? id : JSON.stringify(person);
|
|
17698
|
+
}
|
|
17682
17699
|
function renderCell(value, format, options = {}) {
|
|
17683
17700
|
switch (format) {
|
|
17684
17701
|
case "timestamp":
|
|
@@ -17695,6 +17712,8 @@ function renderCell(value, format, options = {}) {
|
|
|
17695
17712
|
return typeof value === "number" ? value.toFixed(4) : text(null);
|
|
17696
17713
|
case "count":
|
|
17697
17714
|
return Array.isArray(value) ? String(value.length) : text(null);
|
|
17715
|
+
case "people":
|
|
17716
|
+
return Array.isArray(value) && value.length > 0 ? sanitize(value.map(personLabel).join(", ")) : text(null);
|
|
17698
17717
|
case "folder-path":
|
|
17699
17718
|
return typeof value === "string" ? text(decodeFolderPath(value)) : text(value);
|
|
17700
17719
|
case "trace-count": {
|