@archetype-org/clack
Advanced tools
Comparing version
13
index.js
@@ -41,2 +41,15 @@ import fs from 'fs' | ||
}, | ||
commitDesk: async function (deskName) { | ||
return await sendKahn({ | ||
ship, | ||
noun: await Thread(` | ||
=/ m (strand ,vase) | ||
;< [=ship =desk =case] bind:m get-beak | ||
;< ~ bind:m | ||
(poke-our %hood %kiln-commit !>([${deskName} |])) | ||
(pure:m !>('success')) | ||
`), | ||
responseParser: parseThreadResponse | ||
}) | ||
}, | ||
runThread: async function (thread, responseParser=parseThreadResponse) { | ||
@@ -43,0 +56,0 @@ return await sendKahn({ |
@@ -13,4 +13,10 @@ import { Clack } from './index.js' | ||
expect(noun).toBe('success'); | ||
}); | ||
test('commitDesk', async function () { | ||
const clack = Clack({ ship: '../clack-scratchpad/zod' }) | ||
const noun = await clack.commitDesk('%js-created') | ||
expect(noun).toBe('success'); | ||
await clack.close() | ||
}); | ||
{ | ||
"name": "@archetype-org/clack", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "a nodejs library for sending IPC commands to an Urbit ship over Conn.c", |
16370
3.3%263
7.35%