@kamilio/wire 0.1.30 → 0.1.31

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/src/cli.ts CHANGED
@@ -514,6 +514,8 @@ export async function runWireCli(root: WireRoot | WireRootFactory, argv: readonl
514
514
  if (!version && renderExcessPositionals(normalized)) {
515
515
  return;
516
516
  }
517
+ const words = positionalWords(normalized);
518
+ const plain = words?.[0] === "lattice" && (words[1] === "template" || words[1] === "requests") && outputFormats(normalized).length === 0;
517
519
  const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")) as { version: string };
518
- await runCLI(typeof root === "function" ? root(currentDirectory) : root, { version: packageJson.version, rootUsageName: "wire", presets: false, approvals: false, controls: { output: true, debug: true }, argv: normalized });
520
+ await runCLI(typeof root === "function" ? root(currentDirectory) : root, { version: packageJson.version, rootUsageName: "wire", presets: false, approvals: false, controls: { output: true, debug: true }, argv: plain ? [...normalized.slice(0, 2), "--output", "markdown", ...normalized.slice(2)] : normalized });
519
521
  }
package/src/executable.ts CHANGED
@@ -5,6 +5,7 @@ import { dirname, isAbsolute, join, resolve } from "node:path";
5
5
  import { addAsanaComment, createAsanaTask, editAsanaComment, editAsanaTask, listAsanaProjects, listAsanaTasks, lookupAsanaUsers, moveAsanaTask, showAsanaProject, showAsanaTask } from "provider-asana";
6
6
  import { sendSlackMessage, editSlackMessage, lookupSlackUsers } from "provider-slack";
7
7
 
8
+ import { listLatticeReviewRequests, latticeReviewDraft, syncLatticeDrafts } from "provider-lattice";
8
9
  import { zoomProvider } from "provider-zoom";
9
10
  import { lookupNotionUsers } from "provider-notion";
10
11
 
@@ -137,7 +138,7 @@ export function createExecutableRoot(environment: NodeEnvironment, currentDirect
137
138
  switchBackend: baseWire.switchBackend,
138
139
  });
139
140
  const wire = withWireHooks(configuredWire, { currentDirectory, home, environment: configuredEnvironment() });
140
- return createRoot(wire, currentDirectory, auth, readStandardInput, { ...options, scrapeZoom: () => zoomProvider.scrape(runtime, currentDirectory) }, (destination, markdown) => sendSlackMessage(runtime, destination, markdown), (query) => lookupSlackUsers(runtime, query), (url, markdown) => editSlackMessage(runtime, url, markdown), (query) => lookupNotionUsers(runtime, query), {
141
+ return createRoot(wire, currentDirectory, auth, readStandardInput, { ...options, latticeSync: url => syncLatticeDrafts(runtime,url,currentDirectory), latticeRequests: url => listLatticeReviewRequests(runtime,url), latticeTemplate: url => latticeReviewDraft(runtime,url), latticeFill: async (url,file) => latticeReviewDraft(runtime,url,await runtime.filesystem.readText(resolve(currentDirectory,file))), scrapeZoom: () => zoomProvider.scrape(runtime, currentDirectory) }, (destination, markdown) => sendSlackMessage(runtime, destination, markdown), (query) => lookupSlackUsers(runtime, query), (url, markdown) => editSlackMessage(runtime, url, markdown), (query) => lookupNotionUsers(runtime, query), {
141
142
  lookup: (query) => lookupAsanaUsers(runtime, query), projects: () => listAsanaProjects(runtime), project: (project) => showAsanaProject(runtime, project), tasks: (project) => listAsanaTasks(runtime, project), show: (task) => showAsanaTask(runtime, task),
142
143
  writes: { move: (task, project, section) => moveAsanaTask(runtime, task, project, section), create: (project, title, section, body, assignee) => createAsanaTask(runtime, project, title, section, body, assignee), edit: (task, fields) => editAsanaTask(runtime, task, fields), comment: (task, body) => addAsanaComment(runtime, task, body), editComment: (comment, body) => editAsanaComment(runtime, comment, body) },
143
144
  }, async () => {