@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/dist/adapters/root.d.ts +4 -0
- package/dist/adapters/root.d.ts.map +1 -1
- package/dist/adapters/root.js +12 -1
- package/dist/adapters/root.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -1
- package/dist/cli.js.map +1 -1
- package/dist/executable.d.ts.map +1 -1
- package/dist/executable.js +2 -1
- package/dist/executable.js.map +1 -1
- package/node_modules/provider-lattice/dist/browser.d.ts +4 -0
- package/node_modules/provider-lattice/dist/browser.d.ts.map +1 -0
- package/node_modules/provider-lattice/dist/browser.js +31 -0
- package/node_modules/provider-lattice/dist/browser.js.map +1 -0
- package/node_modules/provider-lattice/dist/draft.d.ts +5 -0
- package/node_modules/provider-lattice/dist/draft.d.ts.map +1 -0
- package/node_modules/provider-lattice/dist/draft.js +439 -0
- package/node_modules/provider-lattice/dist/draft.js.map +1 -0
- package/node_modules/provider-lattice/dist/index.d.ts +1 -0
- package/node_modules/provider-lattice/dist/index.d.ts.map +1 -1
- package/node_modules/provider-lattice/dist/index.js +4 -23
- package/node_modules/provider-lattice/dist/index.js.map +1 -1
- package/node_modules/provider-lattice/src/browser.ts +41 -0
- package/node_modules/provider-lattice/src/draft.ts +548 -0
- package/node_modules/provider-lattice/src/index.ts +4 -26
- package/package.json +1 -1
- package/src/adapters/root.ts +13 -2
- package/src/cli.ts +3 -1
- package/src/executable.ts +2 -1
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 () => {
|