@grovehq/cli 0.39.0 → 0.40.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/cli.cjs +20 -7
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -4260,7 +4260,7 @@ async function fetchNpmLatest(signal) {
|
|
|
4260
4260
|
}
|
|
4261
4261
|
|
|
4262
4262
|
// src/lib/version.ts
|
|
4263
|
-
var CLI_VERSION = true ? "0.
|
|
4263
|
+
var CLI_VERSION = true ? "0.40.0" : "0.0.0-dev";
|
|
4264
4264
|
function compareSemver(a, b) {
|
|
4265
4265
|
const parse = (v) => (v.split("-")[0] ?? v).split(".").map((n) => Number.parseInt(n, 10) || 0);
|
|
4266
4266
|
const pa = parse(a);
|
|
@@ -5077,10 +5077,13 @@ var api = {
|
|
|
5077
5077
|
return {
|
|
5078
5078
|
...res,
|
|
5079
5079
|
data: {
|
|
5080
|
-
entries: res.data.entries.map(
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5080
|
+
entries: res.data.entries.map(
|
|
5081
|
+
(e) => e.kind === "state_change" ? e : {
|
|
5082
|
+
...e,
|
|
5083
|
+
kind: "handoff",
|
|
5084
|
+
documents: e.documents ?? (e.documentIds ?? []).map((documentId) => ({ documentId, path: null }))
|
|
5085
|
+
}
|
|
5086
|
+
)
|
|
5084
5087
|
}
|
|
5085
5088
|
};
|
|
5086
5089
|
},
|
|
@@ -5292,6 +5295,7 @@ var FRONT_DOOR = "project";
|
|
|
5292
5295
|
var NO_PROJECT = "no-project";
|
|
5293
5296
|
var BINDING_BRANCH = "binding-branch";
|
|
5294
5297
|
var PROJECTS_DIR = "Projects";
|
|
5298
|
+
var STRATEGY_DIR = "strategy";
|
|
5295
5299
|
var PROJECT_SUBDIRS = /* @__PURE__ */ new Set(["assets"]);
|
|
5296
5300
|
function stateDir() {
|
|
5297
5301
|
return (0, import_node_path3.join)(process.cwd(), STATE_DIR);
|
|
@@ -5325,6 +5329,7 @@ function resolveAddress(input, assignedFolder = frontDoorTarget()) {
|
|
|
5325
5329
|
if (assignedFolder === null) return { ok: false, reason: "needs-assignment" };
|
|
5326
5330
|
return { ok: true, path: `${initiativeOf(assignedFolder)}/${raw}`, form: "initiative-rooted" };
|
|
5327
5331
|
}
|
|
5332
|
+
if (first === STRATEGY_DIR) return { ok: true, path: raw, form: "mirror-rooted" };
|
|
5328
5333
|
const namesADirectory = trimmed !== raw;
|
|
5329
5334
|
if (PROJECT_SUBDIRS.has(first) || rest.length === 0 && !namesADirectory) {
|
|
5330
5335
|
if (assignedFolder === null) return { ok: false, reason: "needs-assignment" };
|
|
@@ -5819,6 +5824,10 @@ function refreshMirror(stableId, data) {
|
|
|
5819
5824
|
var UNNAMEABLE_DOCUMENT = "a document Grove can no longer name";
|
|
5820
5825
|
function composerOf(entry) {
|
|
5821
5826
|
const person3 = entry.authorDisplayName ?? "a workspace member";
|
|
5827
|
+
if (entry.kind === "state_change") {
|
|
5828
|
+
if (entry.authorId === null) return "Grove, on its own";
|
|
5829
|
+
return entry.how === "hand" ? `${person3}, by hand` : `Grove, for ${person3}`;
|
|
5830
|
+
}
|
|
5822
5831
|
switch (entry.postedBy) {
|
|
5823
5832
|
case "grove":
|
|
5824
5833
|
return `Grove, for ${person3}`;
|
|
@@ -5829,10 +5838,14 @@ function composerOf(entry) {
|
|
|
5829
5838
|
}
|
|
5830
5839
|
}
|
|
5831
5840
|
function renderEntry(entry, index, total) {
|
|
5832
|
-
const
|
|
5841
|
+
const head = [
|
|
5833
5842
|
`Entry ${index + 1} of ${total} \u2014 posted ${new Date(entry.createdAt).toISOString()}, by ${composerOf(entry)}`,
|
|
5834
5843
|
`Entry id: ${entry.entryId}`,
|
|
5835
|
-
entry.text
|
|
5844
|
+
entry.text
|
|
5845
|
+
];
|
|
5846
|
+
if (entry.kind === "state_change") return head.join("\n");
|
|
5847
|
+
const lines = [
|
|
5848
|
+
...head,
|
|
5836
5849
|
entry.documents.length === 0 ? "Names no documents." : `Documents changed: ${entry.documents.map((doc) => doc.path ?? UNNAMEABLE_DOCUMENT).join(", ")}`,
|
|
5837
5850
|
...entry.threadIds.length === 0 && entry.threadOrder.length === 0 ? ["Names no threads."] : [],
|
|
5838
5851
|
...entry.threadIds.length === 0 ? [] : [`Threads closed: ${entry.threadIds.join(", ")}`],
|