mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-25 07:52:59 +03:00
02545a7309
Before this change, `term/lib` was importing the Poke type from the `http-api` package. This was causing the rollup build output to place the `term` exported types in a separate path (`dist/api/term`). By switching to the relative import, it is now exported at the expected path (`dist/term`). This fixes imports in consuming projects (e.g., `import { Belt, pokeTask, pokeBelt } from '@urbit/api/term';`). Also, remove the extraneous `Scry` import.
22 lines
564 B
TypeScript
22 lines
564 B
TypeScript
import { Poke } from '../lib'
|
|
import { Belt, Task, SessionTask } from './types';
|
|
|
|
export const pokeTask = (session: string, task: Task): Poke<SessionTask> => ({
|
|
app: 'herm',
|
|
mark: 'herm-task',
|
|
json: { session, ...task }
|
|
});
|
|
|
|
export const pokeBelt = (
|
|
session: string,
|
|
belt: Belt
|
|
): Poke<SessionTask> => pokeTask(session, { belt });
|
|
|
|
//NOTE scry will return string[]
|
|
// export const scrySessions = (): Scry => ({
|
|
// app: 'herm',
|
|
// path: `/sessions`
|
|
// });
|
|
//TODO remove stub once new backend lands
|
|
export const scrySessions = (): string[] => [''];
|