2021-08-17 03:15:14 +03:00
|
|
|
import { Poke, Scry } from '../lib';
|
2022-11-04 10:19:38 +03:00
|
|
|
import { Pike } from './types';
|
2021-08-17 03:15:14 +03:00
|
|
|
|
2022-11-04 08:18:58 +03:00
|
|
|
export const getPikes: Scry = {
|
|
|
|
app: 'hood',
|
|
|
|
path: '/kiln/pikes'
|
|
|
|
};
|
|
|
|
|
2021-08-17 03:15:14 +03:00
|
|
|
/**
|
|
|
|
* Install a foreign desk
|
|
|
|
*/
|
|
|
|
export function kilnInstall(
|
|
|
|
ship: string,
|
|
|
|
desk: string,
|
|
|
|
local?: string
|
|
|
|
): Poke<any> {
|
|
|
|
return {
|
|
|
|
app: 'hood',
|
|
|
|
mark: 'kiln-install',
|
|
|
|
json: {
|
|
|
|
ship,
|
|
|
|
desk,
|
|
|
|
local: local || desk
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Uninstall a desk
|
|
|
|
*/
|
|
|
|
export function kilnUninstall(
|
|
|
|
desk: string
|
|
|
|
): Poke<any> {
|
|
|
|
return {
|
|
|
|
app: 'hood',
|
|
|
|
mark: 'kiln-uninstall',
|
|
|
|
json: desk
|
|
|
|
};
|
|
|
|
}
|
2021-08-23 07:37:36 +03:00
|
|
|
|
|
|
|
export function kilnSuspend(
|
|
|
|
desk: string
|
|
|
|
): Poke<any> {
|
|
|
|
return {
|
|
|
|
app: 'hood',
|
|
|
|
mark: 'kiln-suspend',
|
|
|
|
json: desk
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export function kilnRevive(
|
|
|
|
desk: string
|
|
|
|
): Poke<any> {
|
|
|
|
return {
|
|
|
|
app: 'hood',
|
|
|
|
mark: 'kiln-revive',
|
|
|
|
json: desk
|
|
|
|
};
|
|
|
|
}
|
2021-08-25 02:17:12 +03:00
|
|
|
|
2022-11-04 08:34:39 +03:00
|
|
|
export function kilnBump() {
|
2021-09-07 07:46:44 +03:00
|
|
|
return {
|
|
|
|
app: 'hood',
|
|
|
|
mark: 'kiln-bump',
|
2022-11-04 08:34:39 +03:00
|
|
|
json: {}
|
2021-09-07 07:46:44 +03:00
|
|
|
};
|
|
|
|
}
|
2021-08-25 10:36:38 +03:00
|
|
|
|
2021-09-14 02:47:51 +03:00
|
|
|
export function kilnPause(desk: string) {
|
|
|
|
return {
|
|
|
|
app: 'hood',
|
|
|
|
mark: 'kiln-pause',
|
|
|
|
json: desk
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export function kilnResume(desk: string) {
|
|
|
|
return {
|
|
|
|
app: 'hood',
|
|
|
|
mark: 'kiln-resume',
|
|
|
|
json: desk
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-08-25 02:17:12 +03:00
|
|
|
export const scryLag: Scry = ({ app: 'hood', path: '/kiln/lag' });
|
|
|
|
|
2022-11-04 09:46:55 +03:00
|
|
|
export function getPikePublisher(pike: Pike) {
|
|
|
|
return pike.sync?.ship;
|
|
|
|
}
|