diff --git a/.last_version/install/bitrix/css/vasoft.git/git.css b/.last_version/install/bitrix/css/vasoft.git/git.css index 7354719..64ac468 100644 --- a/.last_version/install/bitrix/css/vasoft.git/git.css +++ b/.last_version/install/bitrix/css/vasoft.git/git.css @@ -1,4 +1,4 @@ .adm-submenu-item-link-icon.vasoft-git{ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAMFBMVEXwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDNcxhweAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhAhUMEBK8qgw3AAAAS0lEQVQY052PsQ0AIQwDs4FH+/23oKC/D0IBC1GRys5FlhPxOmpmwAkbYSj3G5GqkEhVKDUqNM3HOhOVwEjjFh10YW2szlG0PX//A4yeOUizYnq4AAAAAElFTkSuQmCC); + background-image: url("/bitrix/images/vasoft.git/vasoft_git.png"); background-position: 0 0; } \ No newline at end of file diff --git a/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.css b/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.css index d50be78..7a6a49a 100644 --- a/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.css +++ b/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.css @@ -1,7 +1,8 @@ -.adm-submenu-item-link-icon.vasoft-git{ +.adm-submenu-item-link-icon.vasoft-git { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAMFBMVEXwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDNcxhweAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhAhUMEBK8qgw3AAAAS0lEQVQY052PsQ0AIQwDs4FH+/23oKC/D0IBC1GRys5FlhPxOmpmwAkbYSj3G5GqkEhVKDUqNM3HOhOVwEjjFh10YW2szlG0PX//A4yeOUizYnq4AAAAAElFTkSuQmCC); background-position: 0 0; } + .vsg-console { --vsg-color-border: #cecece; --vsg-font-size-command: 15px/32px; @@ -15,6 +16,11 @@ border: 1px solid var(--vsg-color-border); } +.vsg-console__buttons { + border-bottom: 1px solid var(--vsg-color-border); + padding: 4px; +} + .vsg-terminal { border-bottom: 1px solid var(--vsg-color-border); padding: 5px; @@ -23,7 +29,9 @@ overflow: auto; font: var(--vsg-font-size-terminal) Arial, sans-serif; color: var(--vsg-font-color-primary); -}.vsg-error { +} + +.vsg-error { border-bottom: 1px solid var(--vsg-color-border); padding: 5px; margin: 0; diff --git a/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.js b/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.js index 6b9ea73..ccefa8e 100644 --- a/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.js +++ b/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.js @@ -1 +1,272 @@ -this.BX=this.BX||{},function(e,t){"use strict";var n,o,a,r=(o=[],a=0,(n=localStorage.commands)&&(o=JSON.parse(n)),{getNextCommand:function(){return--a>=1?o[a-1]:""},getPrevCommand:function(){return++a<=o.length?o[a-1]:""},addCommand:function(e){o.length>100&&o.shift(),o.push(e),localStorage.commands=JSON.stringify(o)}});var s,i=(s=function(e,t){return BX.ajax.runAction("vasoft:git.ConsoleController."+e,{json:t})},{init:function(){return s("environment",{})},execute:function(e){return s("execute",{command:e})}}),u={components:{CommandLine:{components:{CommandInput:{directives:{Focus:{mounted:function(e,t){t.value&&e.focus()}}},props:{modelValue:String,autocomplete:Array},data:function(){return{echo:""}},emits:["update:modelValue","execute"],methods:{keydown:function(e){return 9===e.keyCode?(this.$emit("update:modelValue",this.echo),e.preventDefault(),!1):13===e.keyCode?(""!==this.modelValue&&(r.addCommand(this.modelValue),this.$emit("execute")),e.preventDefault(),!1):38===e.keyCode?(this.$emit("update:modelValue",r.getPrevCommand()),e.preventDefault(),!1):40===e.keyCode?(this.$emit("update:modelValue",r.getNextCommand()),e.preventDefault(),!1):void 0},update:function(){this.echo=this.modelValue+this.search(this.modelValue)},search:function(e){var t=[];for(var n in this.autocomplete)if(this.autocomplete.hasOwnProperty(n)){var o=new RegExp(n);e.match(o)&&(t=this.autocomplete[n])}var a=e.split(" ").pop(),r="";if(""!==a)for(var s=0;sa.length&&i.substring(0,a.length)===a){r=i.substring(a.length,i.length);break}}return r}},template:'\n
\n \n
{{echo}}
\n
\n '}},props:{user:String,path:String,autocomplete:Array},data:function(){return{command:""}},emits:["execute"],methods:{exec:function(){this.$emit("execute",this.command),this.command=""}},template:'\n
\n
{{path}}
\n
{{user}}$
\n \n
\n '}},data:function(){return{user:"",path:"",autocomplete:[],output:"",error:""}},methods:{scroll:function(){},exec:function(e){i.execute(e).then(this.onData).catch(this.onError)},onError:function(e){if(e.hasOwnProperty("errors")&&e.errors.length>0){for(var t=0,n=e.errors.length,o="";t=5e3&&(o+="\n"+e.errors[t].message)}this.error=o}},onData:function(e){e.hasOwnProperty("data")&&(e.data.hasOwnProperty("user")&&(this.user=e.data.user),e.data.hasOwnProperty("path")&&(this.path=e.data.path),e.data.hasOwnProperty("autocomplete")&&(this.autocomplete=e.data.autocomplete),e.data.hasOwnProperty("output")&&(this.output=e.data.output),e.data.hasOwnProperty("error")&&(this.error=e.data.error))}},updated:function(){var e=this.$el.querySelector("#vsg-terminal");e.scrollTop=e.scrollHeight},beforeMount:function(){i.init().then(this.onData)},template:'\n
\n
{{output}}
\n
{{error}}
\n \n
\n '};function l(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}var c=new WeakMap,d=new WeakMap,p=function(){function e(t){babelHelpers.classCallCheck(this,e),l(this,c,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),babelHelpers.classPrivateFieldSet(this,d,document.querySelector(t))}return babelHelpers.createClass(e,[{key:"start",value:function(){babelHelpers.classPrivateFieldSet(this,c,t.BitrixVue.createApp({name:"Git Console Application",components:{Console:u},template:""})),babelHelpers.classPrivateFieldGet(this,c).mount(babelHelpers.classPrivateFieldGet(this,d))}}]),e}();e.GitConsole=p}(this.BX.Vasoft=this.BX.Vasoft||{},BX.Vue3); +this.BX = this.BX || {}; +(function (exports,ui_vue3) { + 'use strict'; + + function useStorage() { + var maxHistory = 100; + var commands = []; + var position = 0; + var load = function load() { + var ls = localStorage['commands']; + if (ls) { + commands = JSON.parse(ls); + } + }; + load(); + var addCommand = function addCommand(command) { + if (commands.length > maxHistory) { + commands.shift(); + } + commands.push(command); + localStorage['commands'] = JSON.stringify(commands); + }; + var getPrevCommand = function getPrevCommand() { + ++position; + return position <= commands.length ? commands[position - 1] : ''; + }; + var getNextCommand = function getNextCommand() { + --position; + return position >= 1 ? commands[position - 1] : ''; + }; + return { + getNextCommand: getNextCommand, + getPrevCommand: getPrevCommand, + addCommand: addCommand + }; + } + + var Focus = { + mounted: function mounted(el, binding) { + if (binding.value) { + el.focus(); + } + } + }; + + var commandStorage = useStorage(); + var CommandInput = { + directives: { + Focus: Focus + }, + props: { + modelValue: String, + autocomplete: Array + }, + data: function data() { + return { + echo: '' + }; + }, + emits: ['update:modelValue', 'execute'], + // language=Vue + methods: { + keydown: function keydown(event) { + if (event.keyCode === 9) { + // Tab + this.$emit('update:modelValue', this.echo); + event.preventDefault(); + return false; + } else if (event.keyCode === 13) { + //Enter + if (this.modelValue !== '') { + commandStorage.addCommand(this.modelValue); + this.$emit('execute'); + } + event.preventDefault(); + return false; + } else if (event.keyCode === 38) { + // Up + this.$emit('update:modelValue', commandStorage.getPrevCommand()); + event.preventDefault(); + return false; + } else if (event.keyCode === 40) { + //Down + this.$emit('update:modelValue', commandStorage.getNextCommand()); + event.preventDefault(); + return false; + } + }, + update: function update() { + this.echo = this.modelValue + this.search(this.modelValue); + }, + search: function search(command) { + var list = []; + for (var key in this.autocomplete) { + if (!this.autocomplete.hasOwnProperty(key)) { + continue; + } + var pattern = new RegExp(key); + if (command.match(pattern)) { + list = this.autocomplete[key]; + } + } + var text = command.split(' ').pop(); + var found = ''; + if (text !== '') { + for (var i = 0; i < list.length; i++) { + var value = list[i]; + if (value.length > text.length && value.substring(0, text.length) === text) { + found = value.substring(text.length, value.length); + break; + } + } + } + return found; + } + }, + // language=Vue + template: "\n
\n \n
{{echo}}
\n
\n " + }; + + var CommandLine = { + components: { + CommandInput: CommandInput + }, + props: { + user: String, + path: String, + autocomplete: Array + }, + data: function data() { + return { + command: '' + }; + }, + emits: ['execute'], + methods: { + exec: function exec() { + this.$emit('execute', this.command); + this.command = ''; + } + }, + // language=Vue + template: "\n
\n
{{path}}
\n
{{user}}$
\n \n
\n " + }; + + function useClient() { + var get = function get(method, data) { + return BX.ajax.runAction('vasoft:git.ConsoleController.' + method, { + json: data + }); + }; + var init = function init() { + return get('environment', {}); + }; + var execute = function execute(command) { + return get('execute', { + command: command + }); + }; + return { + init: init, + execute: execute + }; + } + + var client = useClient(); + var Console = { + components: { + CommandLine: CommandLine + }, + data: function data() { + return { + user: '', + path: '', + autocomplete: [], + output: '', + error: '' + }; + }, + methods: { + scroll: function scroll() {}, + execTagLog: function execTagLog() { + console.log('execTagLog'); + this.exec('git log --no-walk --tags --pretty="%h %d %s%n%b" --decorate=short'); + }, + exec: function exec(command) { + console.log('exec', command); + client.execute(command).then(this.onData)["catch"](this.onError); + }, + onError: function onError(response) { + if (response.hasOwnProperty('errors') && response.errors.length > 0) { + var i = 0, + cnt = response.errors.length; + var errorText = ''; + for (; i < cnt; ++i) { + var error = response.errors[i]; + if (error.hasOwnProperty('code') && error.hasOwnProperty('message') && error.code >= 5000) { + errorText += "\n" + response.errors[i].message; + } + } + this.error = errorText; + } + }, + onData: function onData(response) { + if (!response.hasOwnProperty('data')) { + return; + } + if (response.data.hasOwnProperty('user')) { + this.user = response.data.user; + } + if (response.data.hasOwnProperty('path')) { + this.path = response.data.path; + } + if (response.data.hasOwnProperty('autocomplete')) { + this.autocomplete = response.data.autocomplete; + } + if (response.data.hasOwnProperty('output')) { + this.output = response.data.output; + } + if (response.data.hasOwnProperty('error')) { + this.error = response.data.error; + } + } + }, + updated: function updated() { + var container = this.$el.querySelector('#vsg-terminal'); + container.scrollTop = container.scrollHeight; + }, + beforeMount: function beforeMount() { + client.init().then(this.onData); + }, + // language=Vue + template: "\n
\n
\n \n
\n
0\">{{output}}
\n
0\">{{error}}
\n \n
\n " + }; + + function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); } + function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } } + var _application = /*#__PURE__*/new WeakMap(); + var _rootNode = /*#__PURE__*/new WeakMap(); + var GitConsole = /*#__PURE__*/function () { + function GitConsole(rootNode) { + babelHelpers.classCallCheck(this, GitConsole); + _classPrivateFieldInitSpec(this, _application, { + writable: true, + value: void 0 + }); + _classPrivateFieldInitSpec(this, _rootNode, { + writable: true, + value: void 0 + }); + babelHelpers.classPrivateFieldSet(this, _rootNode, document.querySelector(rootNode)); + } + babelHelpers.createClass(GitConsole, [{ + key: "start", + value: function start() { + babelHelpers.classPrivateFieldSet(this, _application, ui_vue3.BitrixVue.createApp({ + name: 'Git Console Application', + components: { + Console: Console + }, + template: '' + })); + babelHelpers.classPrivateFieldGet(this, _application).mount(babelHelpers.classPrivateFieldGet(this, _rootNode)); + } + }]); + return GitConsole; + }(); + + exports.GitConsole = GitConsole; + +}((this.BX.Vasoft = this.BX.Vasoft || {}),BX.Vue3)); +//# sourceMappingURL=vasoft-git.bundle.js.map diff --git a/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.js.map b/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.js.map index d5647c1..81a261a 100644 --- a/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.js.map +++ b/.last_version/install/bitrix/js/vasoft/git/dist/vasoft-git.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"vasoft-git.bundle.js","sources":["../src/api/useStorage.js","../src/directives/focus.js","../src/components/CommandInput/CommandInput.js","../src/components/CommandLine/CommandLine.js","../src/api/client.js","../src/components/Console/Console.js","../src/application.js"],"sourcesContent":["export function useStorage() {\n const maxHistory = 100;\n let commands = [];\n let position = 0;\n\n const load = () => {\n const ls = localStorage['commands'];\n if (ls) {\n commands = JSON.parse(ls);\n }\n }\n load();\n\n const addCommand = function (command) {\n if (commands.length > maxHistory) {\n commands.shift();\n }\n commands.push(command);\n localStorage['commands'] = JSON.stringify(commands);\n };\n\n const getPrevCommand = function () {\n ++position;\n return position <= commands.length ? commands[position - 1] : '';\n }\n const getNextCommand = function () {\n --position;\n return position >= 1 ? commands[position - 1] : '';\n }\n return {getNextCommand, getPrevCommand, addCommand};\n}","const Focus = {\n mounted: (el, binding) => {\n if (binding.value) {\n el.focus();\n }\n },\n};\nexport default Focus;","import './CommandInput.css';\nimport {useStorage} from '../../api/useStorage';\nimport Focus from '../../directives/focus';\n\nconst commandStorage = useStorage();\n\nexport const CommandInput = {\n directives: {\n Focus\n },\n props: {\n modelValue: String,\n autocomplete: Array\n },\n data() {\n return {\n echo: ''\n }\n },\n emits: ['update:modelValue', 'execute'],\n // language=Vue\n methods: {\n keydown(event) {\n if (event.keyCode === 9) { // Tab\n this.$emit('update:modelValue', this.echo);\n event.preventDefault();\n return false;\n } else if (event.keyCode === 13) { //Enter\n if (this.modelValue !== '') {\n commandStorage.addCommand(this.modelValue);\n this.$emit('execute');\n }\n event.preventDefault();\n return false;\n } else if (event.keyCode === 38) { // Up\n this.$emit('update:modelValue', commandStorage.getPrevCommand());\n event.preventDefault();\n return false;\n } else if (event.keyCode === 40) { //Down\n this.$emit('update:modelValue', commandStorage.getNextCommand());\n event.preventDefault();\n return false;\n }\n },\n update() {\n this.echo = this.modelValue + this.search(this.modelValue);\n },\n search(command) {\n let list = [];\n for (let key in this.autocomplete) {\n if (!this.autocomplete.hasOwnProperty(key)) {\n continue;\n }\n let pattern = new RegExp(key);\n if (command.match(pattern)) {\n list = this.autocomplete[key];\n }\n }\n let text = command.split(' ').pop();\n let found = '';\n if (text !== '') {\n for (let i = 0; i < list.length; i++) {\n let value = list[i];\n if (value.length > text.length && value.substring(0, text.length) === text) {\n found = value.substring(text.length, value.length);\n break;\n }\n }\n }\n return found;\n }\n },\n // language=Vue\n template: `\n
\n \n
{{echo}}
\n
\n `\n};","import './CommandLine.css';\nimport {CommandInput} from '../CommandInput/CommandInput';\n\nexport const CommandLine = {\n components: {\n CommandInput\n },\n props: {\n user: String,\n path: String,\n autocomplete: Array\n },\n data() {\n return {\n command: ''\n }\n },\n emits: ['execute'],\n methods: {\n exec() {\n this.$emit('execute', this.command);\n this.command = '';\n },\n },\n // language=Vue\n template: `\n
\n
{{path}}
\n
{{user}}$
\n \n
\n `\n};","export function useClient() {\n const get = function (method: String, data: Object) {\n return BX.ajax.runAction('vasoft:git.ConsoleController.' + method, {\n json: data\n });\n }\n const init = function () {\n return get('environment', {});\n }\n const execute = function (command) {\n return get('execute', {command: command});\n }\n return {init, execute};\n}","import './Console.css';\nimport {CommandLine} from '../CommandLine/CommandLine';\nimport {useClient} from '../../api/client';\n\nconst client = useClient();\n\nexport const Console = {\n components: {\n CommandLine\n },\n data(): Object {\n return {\n user: '',\n path: '',\n autocomplete: [],\n output: '',\n error: '',\n }\n },\n methods: {\n scroll() {\n },\n exec(command) {\n client.execute(command).then(this.onData).catch(this.onError);\n },\n onError(response) {\n if (response.hasOwnProperty('errors') && response.errors.length > 0) {\n let i = 0, cnt = response.errors.length;\n let errorText = '';\n for (; i < cnt; ++i) {\n let error = response.errors[i];\n if (error.hasOwnProperty('code') && error.hasOwnProperty('message') && error.code > 5000) {\n errorText += \"\\n\" + response.errors[i].message;\n }\n }\n this.error = errorText;\n }\n },\n onData(response) {\n if (!response.hasOwnProperty('data')) {\n return;\n }\n if (response.data.hasOwnProperty('user')) {\n this.user = response.data.user;\n }\n if (response.data.hasOwnProperty('path')) {\n this.path = response.data.path;\n }\n if (response.data.hasOwnProperty('autocomplete')) {\n this.autocomplete = response.data.autocomplete;\n }\n if (response.data.hasOwnProperty('output')) {\n this.output = response.data.output;\n }\n if (response.data.hasOwnProperty('error')) {\n this.error = response.data.error;\n }\n }\n },\n updated() {\n let container = this.$el.querySelector('#vsg-terminal');\n container.scrollTop = container.scrollHeight;\n },\n beforeMount() {\n client.init().then(this.onData);\n },\n // language=Vue\n template: `\n
\n
0\">{{output}}
\n
0\">{{error}}
\n \n
\n `\n};","/**\n * Консоль Git\n *\n * @package vasoft.git\n * @subpackage js.module\n * @copyright 2023\n */\n\nimport {BitrixVue} from 'ui.vue3';\nimport {Console} from './components/Console/Console';\n\n\nexport class GitConsole {\n #application;\n #rootNode;\n constructor(rootNode): void {\n this.#rootNode = document.querySelector(rootNode);\n }\n start(): void {\n this.#application = BitrixVue.createApp({\n name: 'Git Console Application',\n components: {\n Console\n },\n template: ''\n })\n this.#application.mount(this.#rootNode);\n }\n}\n"],"names":["useStorage","maxHistory","commands","position","load","ls","localStorage","JSON","parse","addCommand","command","length","shift","push","stringify","getPrevCommand","getNextCommand","Focus","mounted","el","binding","value","focus","commandStorage","CommandInput","directives","props","modelValue","String","autocomplete","Array","data","echo","emits","methods","keydown","event","keyCode","$emit","preventDefault","update","search","list","key","hasOwnProperty","pattern","RegExp","match","text","split","pop","found","i","substring","template","CommandLine","components","user","path","exec","useClient","get","method","BX","ajax","runAction","json","init","execute","client","Console","output","error","scroll","then","onData","onError","response","errors","cnt","errorText","code","message","updated","container","$el","querySelector","scrollTop","scrollHeight","beforeMount","GitConsole","rootNode","document","BitrixVue","createApp","name","mount"],"mappings":";;;;IAAO,SAASA,UAAT,GAAsB;MACzB,IAAMC,UAAU,GAAG,GAAnB;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,QAAQ,CAAC9C,IAAT,CAAcwC,MAA5B;;;UAEJ,IAAIM,QAAQ,CAAC9C,IAAT,CAAca,cAAd,CAA6B,OAA7B,CAAJ,EAA2C;YACvC,KAAK4B,KAAL,GAAaK,QAAQ,CAAC9C,IAAT,CAAcyC,KAA3B;;;OAjDO;MAqDnBW,OArDmB,qBAqDT;QACN,IAAIC,SAAS,GAAG,KAAKC,GAAL,CAASC,aAAT,CAAuB,eAAvB,CAAhB;QACAF,SAAS,CAACG,SAAV,GAAsBH,SAAS,CAACI,YAAhC;OAvDe;MAyDnBC,WAzDmB,yBAyDL;QACVpB,MAAM,CAACF,IAAP,GAAcO,IAAd,CAAmB,KAAKC,MAAxB;OA1De;;MA6DnBrB,QAAQ;IA7DW,CAAhB;;;;;;;;;;ACMP,QAAaoC,UAAb;MAGI,oBAAYC,QAAZ,EAA4B;QAAA;;QAAA;UAAA;UAAA;;;QAAA;UAAA;UAAA;;;QACxB,mDAAiBC,QAAQ,CAACN,aAAT,CAAuBK,QAAvB,CAAjB;;;MAJR;QAAA;QAAA,wBAMkB;UACV,sDAAoBE,iBAAS,CAACC,SAAV,CAAoB;YACpCC,IAAI,EAAE,yBAD8B;YAEpCvC,UAAU,EAAE;cACRc,OAAO,EAAPA;aAHgC;YAKpChB,QAAQ,EAAE;WALM,CAApB;UAOA,sDAAkB0C,KAAlB,mCAAwB,IAAxB;;;MAdR;IAAA;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"vasoft-git.bundle.js","sources":["../src/api/useStorage.js","../src/directives/focus.js","../src/components/CommandInput/CommandInput.js","../src/components/CommandLine/CommandLine.js","../src/api/client.js","../src/components/Console/Console.js","../src/application.js"],"sourcesContent":["export function useStorage() {\n const maxHistory = 100;\n let commands = [];\n let position = 0;\n\n const load = () => {\n const ls = localStorage['commands'];\n if (ls) {\n commands = JSON.parse(ls);\n }\n }\n load();\n\n const addCommand = function (command) {\n if (commands.length > maxHistory) {\n commands.shift();\n }\n commands.push(command);\n localStorage['commands'] = JSON.stringify(commands);\n };\n\n const getPrevCommand = function () {\n ++position;\n return position <= commands.length ? commands[position - 1] : '';\n }\n const getNextCommand = function () {\n --position;\n return position >= 1 ? commands[position - 1] : '';\n }\n return {getNextCommand, getPrevCommand, addCommand};\n}","const Focus = {\n mounted: (el, binding) => {\n if (binding.value) {\n el.focus();\n }\n },\n};\nexport default Focus;","import './CommandInput.css';\nimport {useStorage} from '../../api/useStorage';\nimport Focus from '../../directives/focus';\n\nconst commandStorage = useStorage();\n\nexport const CommandInput = {\n directives: {\n Focus\n },\n props: {\n modelValue: String,\n autocomplete: Array\n },\n data() {\n return {\n echo: ''\n }\n },\n emits: ['update:modelValue', 'execute'],\n // language=Vue\n methods: {\n keydown(event) {\n if (event.keyCode === 9) { // Tab\n this.$emit('update:modelValue', this.echo);\n event.preventDefault();\n return false;\n } else if (event.keyCode === 13) { //Enter\n if (this.modelValue !== '') {\n commandStorage.addCommand(this.modelValue);\n this.$emit('execute');\n }\n event.preventDefault();\n return false;\n } else if (event.keyCode === 38) { // Up\n this.$emit('update:modelValue', commandStorage.getPrevCommand());\n event.preventDefault();\n return false;\n } else if (event.keyCode === 40) { //Down\n this.$emit('update:modelValue', commandStorage.getNextCommand());\n event.preventDefault();\n return false;\n }\n },\n update() {\n this.echo = this.modelValue + this.search(this.modelValue);\n },\n search(command) {\n let list = [];\n for (let key in this.autocomplete) {\n if (!this.autocomplete.hasOwnProperty(key)) {\n continue;\n }\n let pattern = new RegExp(key);\n if (command.match(pattern)) {\n list = this.autocomplete[key];\n }\n }\n let text = command.split(' ').pop();\n let found = '';\n if (text !== '') {\n for (let i = 0; i < list.length; i++) {\n let value = list[i];\n if (value.length > text.length && value.substring(0, text.length) === text) {\n found = value.substring(text.length, value.length);\n break;\n }\n }\n }\n return found;\n }\n },\n // language=Vue\n template: `\n
\n \n
{{echo}}
\n
\n `\n};","import './CommandLine.css';\nimport {CommandInput} from '../CommandInput/CommandInput';\n\nexport const CommandLine = {\n components: {\n CommandInput\n },\n props: {\n user: String,\n path: String,\n autocomplete: Array\n },\n data() {\n return {\n command: ''\n }\n },\n emits: ['execute'],\n methods: {\n exec() {\n this.$emit('execute', this.command);\n this.command = '';\n },\n },\n // language=Vue\n template: `\n
\n
{{path}}
\n
{{user}}$
\n \n
\n `\n};","export function useClient() {\n const get = function (method: String, data: Object) {\n return BX.ajax.runAction('vasoft:git.ConsoleController.' + method, {\n json: data\n });\n }\n const init = function () {\n return get('environment', {});\n }\n const execute = function (command) {\n return get('execute', {command: command});\n }\n return {init, execute};\n}","import './Console.css';\nimport {CommandLine} from '../CommandLine/CommandLine';\nimport {useClient} from '../../api/client';\n\nconst client = useClient();\n\nexport const Console = {\n components: {\n CommandLine\n },\n data(): Object {\n return {\n user: '',\n path: '',\n autocomplete: [],\n output: '',\n error: '',\n }\n },\n methods: {\n scroll() {\n },\n execTagLog(){\n console.log('execTagLog');\n this.exec('git log --no-walk --tags --pretty=\"%h %d %s%n%b\" --decorate=short');\n },\n exec(command) {\n console.log('exec', command);\n client.execute(command).then(this.onData).catch(this.onError);\n },\n onError(response) {\n if (response.hasOwnProperty('errors') && response.errors.length > 0) {\n let i = 0, cnt = response.errors.length;\n let errorText = '';\n for (; i < cnt; ++i) {\n let error = response.errors[i];\n if (error.hasOwnProperty('code') && error.hasOwnProperty('message') && error.code >= 5000) {\n errorText += \"\\n\" + response.errors[i].message;\n }\n }\n this.error = errorText;\n }\n },\n onData(response) {\n if (!response.hasOwnProperty('data')) {\n return;\n }\n if (response.data.hasOwnProperty('user')) {\n this.user = response.data.user;\n }\n if (response.data.hasOwnProperty('path')) {\n this.path = response.data.path;\n }\n if (response.data.hasOwnProperty('autocomplete')) {\n this.autocomplete = response.data.autocomplete;\n }\n if (response.data.hasOwnProperty('output')) {\n this.output = response.data.output;\n }\n if (response.data.hasOwnProperty('error')) {\n this.error = response.data.error;\n }\n }\n },\n updated() {\n let container = this.$el.querySelector('#vsg-terminal');\n container.scrollTop = container.scrollHeight;\n },\n beforeMount() {\n client.init().then(this.onData);\n },\n // language=Vue\n template: `\n
\n
\n \n
\n
0\">{{output}}
\n
0\">{{error}}
\n \n
\n `\n};","/**\n * Консоль Git\n *\n * @package vasoft.git\n * @subpackage js.module\n * @copyright 2023\n */\n\nimport {BitrixVue} from 'ui.vue3';\nimport {Console} from './components/Console/Console';\n\n\nexport class GitConsole {\n #application;\n #rootNode;\n constructor(rootNode): void {\n this.#rootNode = document.querySelector(rootNode);\n }\n start(): void {\n this.#application = BitrixVue.createApp({\n name: 'Git Console Application',\n components: {\n Console\n },\n template: ''\n })\n this.#application.mount(this.#rootNode);\n }\n}\n"],"names":["useStorage","maxHistory","commands","position","load","ls","localStorage","JSON","parse","addCommand","command","length","shift","push","stringify","getPrevCommand","getNextCommand","Focus","mounted","el","binding","value","focus","commandStorage","CommandInput","directives","props","modelValue","String","autocomplete","Array","data","echo","emits","methods","keydown","event","keyCode","$emit","preventDefault","update","search","list","key","hasOwnProperty","pattern","RegExp","match","text","split","pop","found","i","substring","template","CommandLine","components","user","path","exec","useClient","get","method","BX","ajax","runAction","json","init","execute","client","Console","output","error","scroll","execTagLog","console","log","then","onData","onError","response","errors","cnt","errorText","code","message","updated","container","$el","querySelector","scrollTop","scrollHeight","beforeMount","GitConsole","rootNode","document","BitrixVue","createApp","name","mount"],"mappings":";;;;IAAO,SAASA,UAAU,GAAG;MACzB,IAAMC,UAAU,GAAG,GAAG;MACtB,IAAIC,QAAQ,GAAG,EAAE;MACjB,IAAIC,QAAQ,GAAG,CAAC;MAEhB,IAAMC,IAAI,GAAG,SAAPA,IAAI,GAAS;QACf,IAAMC,EAAE,GAAGC,YAAY,CAAC,UAAU,CAAC;QACnC,IAAID,EAAE,EAAE;UACJH,QAAQ,GAAGK,IAAI,CAACC,KAAK,CAACH,EAAE,CAAC;;OAEhC;MACDD,IAAI,EAAE;MAEN,IAAMK,UAAU,GAAG,SAAbA,UAAU,CAAaC,OAAO,EAAE;QAClC,IAAIR,QAAQ,CAACS,MAAM,G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AG3C;MACDc,OAAO,qBAAG;QACN,IAAIC,SAAS,GAAG,IAAI,CAACC,GAAG,CAACC,aAAa,CAAC,eAAe,CAAC;QACvDF,SAAS,CAACG,SAAS,GAAGH,SAAS,CAACI,YAAY;OAC/C;MACDC,WAAW,yBAAG;QACVvB,MAAM,CAACF,IAAI,EAAE,CAACU,IAAI,CAAC,IAAI,CAACC,MAAM,CAAC;OAClC;;MAEDxB,QAAQ;IAUZ,CAAC;;;;AClFD,IASqD;IAAA;AAGrD,QAAauC,UAAU;MAGnB,oBAAYC,QAAQ,EAAQ;QAAA;QAAA;UAAA;UAAA;;QAAA;UAAA;UAAA;;QACxB,sCAAI,aAAaC,QAAQ,CAACN,aAAa,CAACK,QAAQ,CAAC;;MACpD;QAAA;QAAA,wBACa;UACV,sCAAI,gBAAgBE,iBAAS,CAACC,SAAS,CAAC;YACpCC,IAAI,EAAE,yBAAyB;YAC/B1C,UAAU,EAAE;cACRc,OAAO,EAAPA;aACH;YACDhB,QAAQ,EAAE;WACb,CAAC;UACF,sCAAI,gBAAc6C,KAAK,mCAAC,IAAI,aAAW;;;MAC1C;IAAA;;;;;;;;"} \ No newline at end of file diff --git a/.last_version/install/bitrix/js/vasoft/git/src/components/Console/Console.css b/.last_version/install/bitrix/js/vasoft/git/src/components/Console/Console.css index 15fdd66..8cac124 100644 --- a/.last_version/install/bitrix/js/vasoft/git/src/components/Console/Console.css +++ b/.last_version/install/bitrix/js/vasoft/git/src/components/Console/Console.css @@ -1,7 +1,8 @@ -.adm-submenu-item-link-icon.vasoft-git{ +.adm-submenu-item-link-icon.vasoft-git { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAMFBMVEXwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDPwUDNcxhweAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfhAhUMEBK8qgw3AAAAS0lEQVQY052PsQ0AIQwDs4FH+/23oKC/D0IBC1GRys5FlhPxOmpmwAkbYSj3G5GqkEhVKDUqNM3HOhOVwEjjFh10YW2szlG0PX//A4yeOUizYnq4AAAAAElFTkSuQmCC); background-position: 0 0; } + .vsg-console { --vsg-color-border: #cecece; --vsg-font-size-command: 15px/32px; @@ -15,6 +16,11 @@ border: 1px solid var(--vsg-color-border); } +.vsg-console__buttons { + border-bottom: 1px solid var(--vsg-color-border); + padding: 4px; +} + .vsg-terminal { border-bottom: 1px solid var(--vsg-color-border); padding: 5px; @@ -23,7 +29,9 @@ overflow: auto; font: var(--vsg-font-size-terminal) Arial, sans-serif; color: var(--vsg-font-color-primary); -}.vsg-error { +} + +.vsg-error { border-bottom: 1px solid var(--vsg-color-border); padding: 5px; margin: 0; diff --git a/.last_version/install/bitrix/js/vasoft/git/src/components/Console/Console.js b/.last_version/install/bitrix/js/vasoft/git/src/components/Console/Console.js index dbc1ccb..32ecd91 100644 --- a/.last_version/install/bitrix/js/vasoft/git/src/components/Console/Console.js +++ b/.last_version/install/bitrix/js/vasoft/git/src/components/Console/Console.js @@ -20,7 +20,12 @@ export const Console = { methods: { scroll() { }, + execTagLog(){ + console.log('execTagLog'); + this.exec('git log --no-walk --tags --pretty="%h %d %s%n%b" --decorate=short'); + }, exec(command) { + console.log('exec', command); client.execute(command).then(this.onData).catch(this.onError); }, onError(response) { @@ -67,6 +72,9 @@ export const Console = { // language=Vue template: `
+
+ +
{{output}}
{{error}}
diff --git a/.last_version/install/version.php b/.last_version/install/version.php index d3b7993..7eac5a2 100644 --- a/.last_version/install/version.php +++ b/.last_version/install/version.php @@ -1,5 +1,5 @@ '2.0.0', - 'VERSION_DATE' => '2023-04-05' + 'VERSION' => '2.1.1', + 'VERSION_DATE' => '2024-12-05' ]; diff --git a/.last_version/lang/ru/admin/console.php b/.last_version/lang/ru/admin/console.php index dc31fe2..203313e 100644 --- a/.last_version/lang/ru/admin/console.php +++ b/.last_version/lang/ru/admin/console.php @@ -1,2 +1,2 @@ Команда не допустима. Попроуйте одну из следующих:
#LIST#\n"; +$MESS['VASOFT_GIT_COMMAND_DENIDED'] = "Команда запрещена.\n"; +$MESS['VASOFT_GIT_DIR_NOTEXISTS'] = "cd: #DIR#: Такого каталога не существует.\n"; +$MESS['VASOFT_GIT_ERROR_PROCOPEN'] = "Не удается запустить процесс proc_open.\n"; \ No newline at end of file diff --git a/.last_version/lang/ru/options.php b/.last_version/lang/ru/options.php index a90e4ce..a755af2 100644 --- a/.last_version/lang/ru/options.php +++ b/.last_version/lang/ru/options.php @@ -1,4 +1,4 @@