notes/_plug/git.plug.json

1 line
7.6 KiB
JSON
Raw Normal View History

2023-04-19 12:51:03 +02:00
{"name":"git","imports":["https://get.silverbullet.md/global.plug.json"],"requiredPermissions":["shell"],"functions":{"snapshotCommand":{"env":"client","command":{"name":"Git: Snapshot"},"code":"(() => { var mod=(()=>{var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var m=(e,r)=>{for(var o in r)l(e,o,{get:r[o],enumerable:!0})},x=(e,r,o,n)=>{if(r&&typeof r==\"object\"||typeof r==\"function\")for(let s of f(r))!d.call(e,s)&&s!==o&&l(e,s,{get:()=>r[s],enumerable:!(n=p(r,s))||n.enumerable});return e};var P=e=>x(l({},\"__esModule\",{value:!0}),e);var re={};m(re,{default:()=>te});var i=self.syscall;typeof self>\"u\"&&(self={syscall:()=>{throw new Error(\"Not implemented here\")}});var t=self.syscall;var a={};m(a,{dispatch:()=>$,enableReadOnlyMode:()=>H,filterBox:()=>U,flashNotification:()=>R,getCurrentPage:()=>M,getCursor:()=>k,getSelection:()=>T,getText:()=>C,hidePanel:()=>I,insertAtCursor:()=>Q,insertAtPos:()=>O,matchBefore:()=>G,moveCursor:()=>V,navigate:()=>E,openUrl:()=>N,prompt:()=>z,reloadPage:()=>q,replaceRange:()=>K,save:()=>L,setPage:()=>S,setSelection:()=>D,showPanel:()=>B});function M(){return t(\"editor.getCurrentPage\")}function S(e){return t(\"editor.setPage\",e)}function C(){return t(\"editor.getText\")}function k(){return t(\"editor.getCursor\")}function T(){return t(\"editor.getSelection\")}function D(e,r){return t(\"editor.setSelection\",e,r)}function L(){return t(\"editor.save\")}function E(e,r,o=!1){return t(\"editor.navigate\",e,r,o)}function q(){return t(\"editor.reloadPage\")}function N(e){return t(\"editor.openUrl\",e)}function R(e,r=\"info\"){return t(\"editor.flashNotification\",e,r)}function U(e,r,o=\"\",n=\"\"){return t(\"editor.filterBox\",e,r,o,n)}function B(e,r,o,n=\"\"){return t(\"editor.showPanel\",e,r,o,n)}function I(e){return t(\"editor.hidePanel\",e)}function O(e,r){return t(\"editor.insertAtPos\",e,r)}function K(e,r,o){return t(\"editor.replaceRange\",e,r,o)}function V(e){return t(\"editor.moveCursor\",e)}function Q(e){return t(\"editor.insertAtCursor\",e)}function G(e){return t(\"editor.matchBefore\",e)}function $(e){return t(\"editor.dispatch\",e)}function z(e,r=\"\"){return t(\"editor.prompt\",e,r)}function H(e){return t(\"editor.enableReadOnlyMode\",e)}var u={};m(u,{invokeCommand:()=>_,invokeFunction:()=>Z,listCommands:()=>j,reloadPlugs:()=>ee});function Z(e,r,...o){return t(\"system.invokeFunction\",e,r,...o)}function _(e){return t(\"system.invokeCommand\",e)}function j(){return t(\"system.listCommands\")}function ee(){t(\"system.reloadPlugs\")}async function g(){let e=await a.prompt(\"Revision name:\");e||(e=\"Snapshot\"),console.log(\"Revision name\",e),await u.invokeFunction(\"server\",\"commit\",e)}var te=g;return P(re);})();\n return mod;})()"},"syncCommand":{"env":"client","command":{"name":"Git: Sync"},"code":"(() => { var mod=(()=>{var l=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var m=(e,r)=>{for(var o in r)l(e,o,{get:r[o],enumerable:!0})},x=(e,r,o,n)=>{if(r&&typeof r==\"object\"||typeof r==\"function\")for(let s of p(r))!d.call(e,s)&&s!==o&&l(e,s,{get:()=>r[s],enumerable:!(n=f(r,s))||n.enumerable});return e};var P=e=>x(l({},\"__esModule\",{value:!0}),e);var re={};m(re,{default:()=>te});var i=self.syscall;typeof self>\"u\"&&(self={syscall:()=>{throw new Error(\"Not implemented here\")}});var t=self.syscall;var a={};m(a,{dispatch:()=>$,enableReadOnlyMode:()=>H,filterBox:()=>U,flashNotification:()=>R,getCurrentPage:()=>M,getCursor:()=>k,getSelection:()=>T,getText:()=>C,hidePanel:()=>I,insertAtCursor:()=>Q,insertAtPos:()=>O,matchBefore:()=>G,moveCursor:()=>V,navigate:()=>E,openUrl:()=>N,prompt:()=>z,reloadPage:()=>q,replaceRange:()=>K,save:()=>L,setPage:()=>S,setSelection:()=>D,showPanel:()=>B});function M(){return t(\"editor.getCurrentPage\")}function S(e){return t(\"editor.setPage\",e)}function C(){return t(\"editor.getText\")}function k(){return t(\"editor.getCursor\")}function T(){return t(\"editor.ge