diff --git a/.gitignore b/.gitignore index b6723d2d5..b8240fef7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ Data-Storage Log-Files -My-Workspaces \ No newline at end of file +My-Workspaces +Github.json diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 805b12230..d73a6da01 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -522,6 +522,59 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE } break + case 'App': { + switch (requestParameters[2]) { // switch by command + case 'Contribute': { + try { + let GITHUB + try { + GITHUB = require('../Github.json') + } catch (err) { + let error = { + result: 'Fail Because', + message: 'File Github.json does not exist.' + } + respondWithContent(JSON.stringify(error), httpResponse) + return + } + + const simpleGit = require('simple-git'); + const options = { + baseDir: process.cwd(), + binary: 'git', + maxConcurrentProcesses: 6, + } + const git = simpleGit(options) + const commitMessage = unescape(requestParameters[3]) + const remote = `https://${GITHUB.user}:${GITHUB.password}@${GITHUB.repository}`; + + git + .pull() + .add('./*') + .commit(commitMessage) + .push('origin', 'in-app-documentation') + + //function onCommit(err) { + // if (err) { throw err } + respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse) + //} + } catch (err) { + console.log('[ERROR] httpInterface -> App -> Contribute -> Method call produced an error.') + console.log('[ERROR] httpInterface -> App -> Contribute -> err.stack = ' + err.stack) + console.log('[ERROR] httpInterface -> App -> Contribute -> Params Received = ' + requestParameters[3]) + + let error = { + result: 'Fail Because', + message: err.message, + stack: err.stack + } + respondWithContent(JSON.stringify(error), httpResponse) + } + break + } + } + break + } case 'LegacyPlotter.js': { respondWithFile(global.env.PATH_TO_CLIENT + 'WebServer/LegacyPlotter.js', httpResponse) @@ -1162,7 +1215,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE let schema = JSON.stringify(schemaArray) respondWithContent(schema, httpResponse) } catch (err) { - console.log('Could not send Schema:' ,filePath, schemaType) + console.log('Could not send Schema:', filePath, schemaType) console.log(err.stack) respondWithContent("[]", httpResponse) } diff --git a/Client/node_modules/@kwsites/file-exists/CHANGELOG.md b/Client/node_modules/@kwsites/file-exists/CHANGELOG.md new file mode 100644 index 000000000..9361ecb08 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/CHANGELOG.md @@ -0,0 +1,12 @@ + +# Release History + +## 1.1.1 + +- Add dependency on `debug` to log results of the file system checks +- Add `jest` tests + +# 1.0.0 + +- First public release, a simple typescript library for checking whether a path exists + on the file system and optionally whether it points to a file or folder. diff --git a/Client/node_modules/@kwsites/file-exists/LICENSE b/Client/node_modules/@kwsites/file-exists/LICENSE new file mode 100644 index 000000000..b123c04ba --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2015 Steve King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Client/node_modules/@kwsites/file-exists/dist/index.d.ts b/Client/node_modules/@kwsites/file-exists/dist/index.d.ts new file mode 100644 index 000000000..8420b1093 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/index.d.ts @@ -0,0 +1 @@ +export * from './src'; diff --git a/Client/node_modules/@kwsites/file-exists/dist/index.js b/Client/node_modules/@kwsites/file-exists/dist/index.js new file mode 100644 index 000000000..87332ba70 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/index.js @@ -0,0 +1,7 @@ +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./src")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Client/node_modules/@kwsites/file-exists/dist/index.js.map b/Client/node_modules/@kwsites/file-exists/dist/index.js.map new file mode 100644 index 000000000..3b75ca481 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;AACA,2BAAsB"} \ No newline at end of file diff --git a/Client/node_modules/@kwsites/file-exists/dist/src/index.d.ts b/Client/node_modules/@kwsites/file-exists/dist/src/index.d.ts new file mode 100644 index 000000000..3d234cd7e --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/src/index.d.ts @@ -0,0 +1,19 @@ +/** + * Synchronous validation of a path existing either as a file or as a directory. + * + * @param {string} path The path to check + * @param {number} type One or both of the exported numeric constants + */ +export declare function exists(path: string, type?: number): boolean; +/** + * Constant representing a file + */ +export declare const FILE = 1; +/** + * Constant representing a folder + */ +export declare const FOLDER = 2; +/** + * Constant representing either a file or a folder + */ +export declare const READABLE: number; diff --git a/Client/node_modules/@kwsites/file-exists/dist/src/index.js b/Client/node_modules/@kwsites/file-exists/dist/src/index.js new file mode 100644 index 000000000..8a41c70f8 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/src/index.js @@ -0,0 +1,55 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs_1 = require("fs"); +const debug_1 = __importDefault(require("debug")); +const log = debug_1.default('@kwsites/file-exists'); +function check(path, isFile, isDirectory) { + log(`checking %s`, path); + try { + const stat = fs_1.statSync(path); + if (stat.isFile() && isFile) { + log(`[OK] path represents a file`); + return true; + } + if (stat.isDirectory() && isDirectory) { + log(`[OK] path represents a directory`); + return true; + } + log(`[FAIL] path represents something other than a file or directory`); + return false; + } + catch (e) { + if (e.code === 'ENOENT') { + log(`[FAIL] path is not accessible: %o`, e); + return false; + } + log(`[FATAL] %o`, e); + throw e; + } +} +/** + * Synchronous validation of a path existing either as a file or as a directory. + * + * @param {string} path The path to check + * @param {number} type One or both of the exported numeric constants + */ +function exists(path, type = exports.READABLE) { + return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0); +} +exports.exists = exists; +/** + * Constant representing a file + */ +exports.FILE = 1; +/** + * Constant representing a folder + */ +exports.FOLDER = 2; +/** + * Constant representing either a file or a folder + */ +exports.READABLE = exports.FILE + exports.FOLDER; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Client/node_modules/@kwsites/file-exists/dist/src/index.js.map b/Client/node_modules/@kwsites/file-exists/dist/src/index.js.map new file mode 100644 index 000000000..68f2b8a29 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,2BAA8B;AAC9B,kDAA0B;AAE1B,MAAM,GAAG,GAAG,eAAK,CAAC,sBAAsB,CAAC,CAAC;AAE1C,SAAS,KAAK,CAAC,IAAY,EAAE,MAAe,EAAE,WAAoB;IAC/D,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAEzB,IAAI;QACD,MAAM,IAAI,GAAG,aAAQ,CAAC,IAAI,CAAC,CAAC;QAE5B,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,MAAM,EAAE;YAC1B,GAAG,CAAC,6BAA6B,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;SACd;QAED,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,WAAW,EAAE;YACpC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YACxC,OAAO,IAAI,CAAC;SACd;QAED,GAAG,CAAC,iEAAiE,CAAC,CAAC;QACvE,OAAO,KAAK,CAAC;KACf;IAAC,OAAO,CAAC,EAAE;QACT,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE;YACtB,GAAG,CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAC;YAC5C,OAAO,KAAK,CAAC;SACf;QAED,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,CAAC;KACV;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,MAAM,CAAC,IAAY,EAAE,OAAe,gBAAQ;IACzD,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,GAAG,YAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,cAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9D,CAAC;AAFD,wBAEC;AAED;;GAEG;AACU,QAAA,IAAI,GAAG,CAAC,CAAC;AAEtB;;GAEG;AACU,QAAA,MAAM,GAAG,CAAC,CAAC;AAExB;;GAEG;AACU,QAAA,QAAQ,GAAG,YAAI,GAAG,cAAM,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.d.ts b/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.d.ts new file mode 100644 index 000000000..ab80d332b --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.d.ts @@ -0,0 +1,7 @@ +export declare function statSync(...args: any[]): any; +export declare function addStatSyncMock(fn: any): void; +export declare function assertMocksUsed(): void; +declare const mockFs: { + statSync: typeof statSync; +}; +export default mockFs; diff --git a/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.js b/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.js new file mode 100644 index 000000000..cd46c71ca --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +let statSyncMocks = []; +function statSync(...args) { + const mock = statSyncMocks.shift(); + if (typeof mock !== 'function') { + throw new Error(`fs.statSync called without configuring a mock`); + } + return mock(...args); +} +exports.statSync = statSync; +function addStatSyncMock(fn) { + statSyncMocks.push(fn); +} +exports.addStatSyncMock = addStatSyncMock; +function assertMocksUsed() { + if (statSyncMocks.length) { + throw new Error(`fs.afterEach: statSync has ${statSyncMocks.length} unused mocks`); + } +} +exports.assertMocksUsed = assertMocksUsed; +const mockFs = { + statSync, +}; +exports.default = mockFs; +//# sourceMappingURL=fs.js.map \ No newline at end of file diff --git a/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.js.map b/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.js.map new file mode 100644 index 000000000..e2a3d1688 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/test/__mocks__/fs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../../test/__mocks__/fs.ts"],"names":[],"mappings":";;AACA,IAAI,aAAa,GAAU,EAAE,CAAC;AAE9B,SAAgB,QAAQ,CAAC,GAAG,IAAW;IACpC,MAAO,IAAI,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;IACpC,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;QAC7B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KACnE;IAED,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AACxB,CAAC;AAPD,4BAOC;AAED,SAAgB,eAAe,CAAC,EAAO;IACpC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC;AAFD,0CAEC;AAED,SAAgB,eAAe;IAC5B,IAAI,aAAa,CAAC,MAAM,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,8BAA8B,aAAa,CAAC,MAAM,eAAe,CAAC,CAAC;KACrF;AACJ,CAAC;AAJD,0CAIC;AAED,MAAM,MAAM,GAAG;IACZ,QAAQ;CACV,CAAA;AAED,kBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.d.ts b/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.js b/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.js new file mode 100644 index 000000000..a36b549d8 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.js @@ -0,0 +1,77 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +jest.mock('fs'); +//@ts-ignore +const fs_1 = require("fs"); +const src_1 = require("../src"); +describe(`exists`, () => { + let statSync; + let statSyncMock; + let path; + beforeEach(() => { + path = `./path/${Math.random()}`; + fs_1.addStatSyncMock(statSyncMock = jest.fn(() => statSync())); + }); + afterEach(() => { + fs_1.assertMocksUsed(); + statSync = statSyncMock = undefined; + }); + describe('known errors', () => { + beforeEach(() => givenStatSyncThrows({ code: 'ENOENT' })); + it('with type', () => { + expect(src_1.exists(path, src_1.READABLE)).toBe(false); + }); + it('with type omitted', () => { + expect(src_1.exists(path)).toBe(false); + }); + }); + describe('unknown errors', () => { + let err; + beforeEach(() => err = givenStatSyncThrows(new Error('something'))); + it('with type', () => { + expect(() => src_1.exists(path, src_1.READABLE)).toThrow(err); + }); + it('with type omitted', () => { + expect(() => src_1.exists(path)).toThrow(err); + }); + }); + describe('path is a file', () => { + beforeEach(() => givenStatSyncIsA('file')); + existsReturns(true, false, true); + }); + describe('path is a folder', () => { + beforeEach(() => givenStatSyncIsA('folder')); + existsReturns(false, true, true); + }); + describe('path is unknown', () => { + beforeEach(() => givenStatSyncIsA('unknown')); + existsReturns(false, false, false); + }); + function existsReturns(file, folder, readable) { + it('when searching for a file', () => { + expect(src_1.exists(path, src_1.FILE)).toBe(file); + }); + it('when searching for a folder', () => { + expect(src_1.exists(path, src_1.FOLDER)).toBe(folder); + }); + it('when searching for either', () => { + expect(src_1.exists(path, src_1.READABLE)).toBe(readable); + }); + it('when searching without a type', () => { + expect(src_1.exists(path)).toBe(readable); + }); + } + function givenStatSyncThrows(err) { + statSync = () => { throw err; }; + return err; + } + function givenStatSyncIsA(type) { + const mockStat = { + isFile() { return type === 'file'; }, + isDirectory() { return type === 'folder'; }, + }; + statSync = () => mockStat; + return mockStat; + } +}); +//# sourceMappingURL=exists.spec.js.map \ No newline at end of file diff --git a/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.js.map b/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.js.map new file mode 100644 index 000000000..669176aa9 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/dist/test/exists.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exists.spec.js","sourceRoot":"","sources":["../../test/exists.spec.ts"],"names":[],"mappings":";;AACA,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEhB,YAAY;AACZ,2BAAsD;AACtD,gCAAwD;AAExD,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IAErB,IAAI,QAAa,CAAC;IAClB,IAAI,YAAiB,CAAC;IACtB,IAAI,IAAY,CAAC;IAEjB,UAAU,CAAC,GAAG,EAAE;QACb,IAAI,GAAG,UAAU,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;QACjC,oBAAe,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC7D,C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AC,QAAQ,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACN,CAAC;IAED,SAAS,mBAAmB,CAAE,GAAQ;QACnC,QAAQ,GAAG,GAAG,EAAE,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;QAChC,OAAO,GAAG,CAAC;IACd,CAAC;IAED,SAAS,gBAAgB,CAAE,IAAmC;QAC3D,MAAM,QAAQ,GAAG;YACd,MAAM,KAAM,OAAO,IAAI,KAAK,MAAM,CAAA,CAAC,CAAC;YACpC,WAAW,KAAM,OAAO,IAAI,KAAK,QAAQ,CAAA,CAAC,CAAC;SAC7C,CAAC;QACF,QAAQ,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC;QAC1B,OAAO,QAAQ,CAAC;IACnB,CAAC;AAEJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/debug/LICENSE b/Client/node_modules/@kwsites/file-exists/node_modules/debug/LICENSE new file mode 100644 index 000000000..658c933d2 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/debug/README.md b/Client/node_modules/@kwsites/file-exists/node_modules/debug/README.md new file mode 100644 index 000000000..88dae35d9 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/debug/README.md @@ -0,0 +1,455 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/debug/package.json b/Client/node_modules/@kwsites/file-exists/node_modules/debug/package.json new file mode 100644 index 000000000..9a8a39a7a --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/debug/package.json @@ -0,0 +1,101 @@ +{ + "_from": "debug@^4.1.1", + "_id": "debug@4.3.1", + "_inBundle": false, + "_integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "_location": "/@kwsites/file-exists/debug", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "debug@^4.1.1", + "name": "debug", + "escapedName": "debug", + "rawSpec": "^4.1.1", + "saveSpec": null, + "fetchSpec": "^4.1.1" + }, + "_requiredBy": [ + "/@kwsites/file-exists" + ], + "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "_shasum": "f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee", + "_spec": "debug@^4.1.1", + "_where": "C:\\Superalgos\\Client\\node_modules\\@kwsites\\file-exists", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + }, + { + "name": "Josh Junon", + "email": "josh@junon.me" + } + ], + "dependencies": { + "ms": "2.1.2" + }, + "deprecated": false, + "description": "small debugging utility", + "devDependencies": { + "brfs": "^2.0.1", + "browserify": "^16.2.3", + "coveralls": "^3.0.2", + "istanbul": "^0.4.5", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6.0" + }, + "files": [ + "src", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", + "main": "./src/index.js", + "name": "debug", + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls", + "test:node": "istanbul cover _mocha -- test.js" + }, + "version": "4.3.1" +} diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/browser.js b/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/browser.js new file mode 100644 index 000000000..cd0fc35d1 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/browser.js @@ -0,0 +1,269 @@ +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/common.js b/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/common.js new file mode 100644 index 000000000..392a8e005 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/common.js @@ -0,0 +1,261 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/index.js b/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/index.js new file mode 100644 index 000000000..bf4c57f25 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/node.js b/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/node.js new file mode 100644 index 000000000..79bc085cb --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/debug/src/node.js @@ -0,0 +1,263 @@ +/** + * Module dependencies. + */ + +const tty = require('tty'); +const util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/ms/index.js b/Client/node_modules/@kwsites/file-exists/node_modules/ms/index.js new file mode 100644 index 000000000..c4498bcc2 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/ms/index.js @@ -0,0 +1,162 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/ms/license.md b/Client/node_modules/@kwsites/file-exists/node_modules/ms/license.md new file mode 100644 index 000000000..69b61253a --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/ms/package.json b/Client/node_modules/@kwsites/file-exists/node_modules/ms/package.json new file mode 100644 index 000000000..04df43b66 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/ms/package.json @@ -0,0 +1,69 @@ +{ + "_from": "ms@2.1.2", + "_id": "ms@2.1.2", + "_inBundle": false, + "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "_location": "/@kwsites/file-exists/ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ms@2.1.2", + "name": "ms", + "escapedName": "ms", + "rawSpec": "2.1.2", + "saveSpec": null, + "fetchSpec": "2.1.2" + }, + "_requiredBy": [ + "/@kwsites/file-exists/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009", + "_spec": "ms@2.1.2", + "_where": "C:\\Superalgos\\Client\\node_modules\\@kwsites\\file-exists\\node_modules\\debug", + "bugs": { + "url": "https://github.com/zeit/ms/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Tiny millisecond conversion utility", + "devDependencies": { + "eslint": "4.12.1", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/zeit/ms#readme", + "license": "MIT", + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "main": "./index", + "name": "ms", + "repository": { + "type": "git", + "url": "git+https://github.com/zeit/ms.git" + }, + "scripts": { + "lint": "eslint lib/* bin/*", + "precommit": "lint-staged", + "test": "mocha tests.js" + }, + "version": "2.1.2" +} diff --git a/Client/node_modules/@kwsites/file-exists/node_modules/ms/readme.md b/Client/node_modules/@kwsites/file-exists/node_modules/ms/readme.md new file mode 100644 index 000000000..9a1996b17 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/node_modules/ms/readme.md @@ -0,0 +1,60 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +ms('-3 days') // -259200000 +ms('-1h') // -3600000 +ms('-200') // -200 +``` + +### Convert from Milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(-3 * 60000) // "-3m" +ms(ms('10 hours')) // "10h" +``` + +### Time Format Written-Out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(-3 * 60000, { long: true }) // "-3 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [Node.js](https://nodejs.org) and in the browser +- If a number is supplied to `ms`, a string with a unit is returned +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) +- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned + +## Related Packages + +- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. + +## Caught a Bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/Client/node_modules/@kwsites/file-exists/package.json b/Client/node_modules/@kwsites/file-exists/package.json new file mode 100644 index 000000000..fd9ae91f6 --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/package.json @@ -0,0 +1,79 @@ +{ + "_from": "@kwsites/file-exists@^1.1.1", + "_id": "@kwsites/file-exists@1.1.1", + "_inBundle": false, + "_integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", + "_location": "/@kwsites/file-exists", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@kwsites/file-exists@^1.1.1", + "name": "@kwsites/file-exists", + "escapedName": "@kwsites%2ffile-exists", + "scope": "@kwsites", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/simple-git" + ], + "_resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", + "_shasum": "ad1efcac13e1987d8dbaf235ef3be5b0d96faa99", + "_spec": "@kwsites/file-exists@^1.1.1", + "_where": "C:\\Superalgos\\Client\\node_modules\\simple-git", + "author": { + "name": "Steve King", + "email": "steve@mydev.co" + }, + "bugs": { + "url": "https://github.com/kwsites/file-exists/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Steve King", + "email": "steve@mydev.co" + } + ], + "dependencies": { + "debug": "^4.1.1" + }, + "deprecated": false, + "description": "Synchronous validation of a path existing either as a file or as a directory.", + "devDependencies": { + "@babel/core": "^7.10.1", + "@babel/preset-env": "^7.10.1", + "@babel/preset-typescript": "^7.10.1", + "@types/debug": "^4.1.5", + "@types/jest": "^26.0.0", + "@types/node": "^10.12.0", + "babel-jest": "^26.0.1", + "jest": "^25.3.0", + "rimraf": "^2.6.2", + "ts-node": "^8.10.2", + "typescript": "^3.1.3" + }, + "files": [ + "dist/**/*.*" + ], + "homepage": "https://github.com/kwsites/file-exists#readme", + "license": "MIT", + "main": "./dist/index.js", + "name": "@kwsites/file-exists", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kwsites/file-exists.git" + }, + "scripts": { + "build": "yarn run clean && tsc", + "clean": "rimraf ./dist", + "postversion": "npm publish --access=public && git push && git push --tags", + "preversion": "yarn run clean && yarn run build && yarn test", + "test": "jest --coverage", + "tsc": "tsc" + }, + "types": "./dist/index.d.ts", + "version": "1.1.1" +} diff --git a/Client/node_modules/@kwsites/file-exists/readme.md b/Client/node_modules/@kwsites/file-exists/readme.md new file mode 100644 index 000000000..0db6d0fdf --- /dev/null +++ b/Client/node_modules/@kwsites/file-exists/readme.md @@ -0,0 +1,41 @@ +# @kwsites/file-exists + +Synchronous validation of a path existing either as a file or as a directory. + +``` +const { exists, FILE, FOLDER, READABLE } = require('@kwsites/file-exists'); + +// check for a folder existing +assert(exists(__dirname, FOLDER)); +assert(!exists(__filename, FOLDER)); + +// check for a file existing +assert(!exists(__filename, FILE)); +assert(exists(__filename, FILE)); + +// when no type is specified, both folders and files are allowed +assert(exists(__dirname)); +assert(exists(__filename)); + +// alternatively specify both files and folders +assert(exists(__dirname, FILE + FOLDER)); + +// or just that the path is readable (can be either a file or folder) +assert(exists(__filename, READABLE)); +``` + +## Troubleshooting + +This library uses [debug](https://www.npmjs.com/package/debug) to handle logging, +to enable logging, use either the environment variable: + +``` +"DEBUG=@kwsites/file-exists" node ./your-app.js +``` + +Or explicitly enable logging using the `debug` library itself: + +```javascript +require('debug').enable('@kwsites/file-exists'); +``` + diff --git a/Client/node_modules/@kwsites/promise-deferred/LICENSE b/Client/node_modules/@kwsites/promise-deferred/LICENSE new file mode 100644 index 000000000..d082eb966 --- /dev/null +++ b/Client/node_modules/@kwsites/promise-deferred/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 kwsites + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Client/node_modules/@kwsites/promise-deferred/dist/index.d.ts b/Client/node_modules/@kwsites/promise-deferred/dist/index.d.ts new file mode 100644 index 000000000..68fb38abe --- /dev/null +++ b/Client/node_modules/@kwsites/promise-deferred/dist/index.d.ts @@ -0,0 +1,49 @@ +/** + * The `DeferredPromise` has a `promise` property in an initially pending state, + * that will be resolved when the `done` method is called or rejected when the + * `fail` method is called. + */ +export interface DeferredPromise { + done(result: RESOLVES): void; + fail(error: REJECTS): void; + readonly status: DeferredPromiseStatus; + readonly fulfilled: boolean; + promise: Promise; +} +/** + * The three states the DeferredPromise can be in - initially pending then either + * resolved or rejected when it is fulfilled. + * + * ```typescript + import {createDeferred, DeferredPromiseStatus} from '@kwsites/promise-deferred`; + + const pending: DeferredPromiseStatus = 'pending'; + expect(createDeferred()).toHaveProperty('status', pending); + ``` + */ +export declare type DeferredPromiseStatus = 'pending' | 'resolved' | 'rejected'; +/** + * Creates a new `DeferredPromise` + * + * ```typescript + import {deferred} from '@kwsites/promise-deferred`; + ``` + */ +export declare function deferred(): DeferredPromise; +/** + * Alias of the exported `deferred` function, to help consumers wanting to use `deferred` as the + * local variable name rather than the factory import name, without needing to rename on import. + * + * ```typescript + import {createDeferred} from '@kwsites/promise-deferred`; + ``` + */ +export declare const createDeferred: typeof deferred; +/** + * Default export allows use as: + * + * ```typescript + import deferred from '@kwsites/promise-deferred`; + ``` + */ +export default deferred; diff --git a/Client/node_modules/@kwsites/promise-deferred/dist/index.js b/Client/node_modules/@kwsites/promise-deferred/dist/index.js new file mode 100644 index 000000000..1ffefe6c2 --- /dev/null +++ b/Client/node_modules/@kwsites/promise-deferred/dist/index.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDeferred = exports.deferred = void 0; +/** + * Creates a new `DeferredPromise` + * + * ```typescript + import {deferred} from '@kwsites/promise-deferred`; + ``` + */ +function deferred() { + let done; + let fail; + let status = 'pending'; + const promise = new Promise((_done, _fail) => { + done = _done; + fail = _fail; + }); + return { + promise, + done(result) { + if (status === 'pending') { + status = 'resolved'; + done(result); + } + }, + fail(error) { + if (status === 'pending') { + status = 'rejected'; + fail(error); + } + }, + get fulfilled() { + return status !== 'pending'; + }, + get status() { + return status; + }, + }; +} +exports.deferred = deferred; +/** + * Alias of the exported `deferred` function, to help consumers wanting to use `deferred` as the + * local variable name rather than the factory import name, without needing to rename on import. + * + * ```typescript + import {createDeferred} from '@kwsites/promise-deferred`; + ``` + */ +exports.createDeferred = deferred; +/** + * Default export allows use as: + * + * ```typescript + import deferred from '@kwsites/promise-deferred`; + ``` + */ +exports.default = deferred; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Client/node_modules/@kwsites/promise-deferred/dist/index.js.map b/Client/node_modules/@kwsites/promise-deferred/dist/index.js.map new file mode 100644 index 000000000..74583ed9b --- /dev/null +++ b/Client/node_modules/@kwsites/promise-deferred/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AA0BA;;;;;;GAMG;AACH,SAAgB,QAAQ;IACrB,IAAI,IAAyB,CAAC;IAC9B,IAAI,IAAwB,CAAC;IAC7B,IAAI,MAAM,GAA0B,SAAS,CAAC;IAE9C,MAAM,OAAO,GAAe,IAAI,OAAO,CAAI,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACzD,IAAI,GAAG,KAAK,CAAC;QACb,IAAI,GAAG,KAAK,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,OAAO;QACJ,OAAO;QACP,IAAI,CAAE,MAAM;YACT,IAAI,MAAM,KAAK,SAAS,EAAE;gBACvB,MAAM,GAAG,UAAU,CAAC;gBACpB,IAAI,CAAC,MAAM,CAAC,CAAC;aACf;QACJ,CAAC;QACD,IAAI,CAAE,KAAK;YACR,IAAI,MAAM,KAAK,SAAS,EAAE;gBACvB,MAAM,GAAG,UAAU,CAAC;gBACpB,IAAI,CAAC,KAAK,CAAC,CAAC;aACd;QACJ,CAAC;QACD,IAAI,SAAS;YACV,OAAO,MAAM,KAAK,SAAS,CAAC;QAC/B,CAAC;QACD,IAAI,MAAM;YACP,OAAO,MAAM,CAAC;QACjB,CAAC;KACH,CAAC;AACL,CAAC;AA/BD,4BA+BC;AAED;;;;;;;GAOG;AACU,QAAA,cAAc,GAAG,QAAQ,CAAC;AAEvC;;;;;;GAMG;AACH,kBAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/@kwsites/promise-deferred/package.json b/Client/node_modules/@kwsites/promise-deferred/package.json new file mode 100644 index 000000000..721f71946 --- /dev/null +++ b/Client/node_modules/@kwsites/promise-deferred/package.json @@ -0,0 +1,79 @@ +{ + "_from": "@kwsites/promise-deferred@^1.1.1", + "_id": "@kwsites/promise-deferred@1.1.1", + "_inBundle": false, + "_integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", + "_location": "/@kwsites/promise-deferred", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@kwsites/promise-deferred@^1.1.1", + "name": "@kwsites/promise-deferred", + "escapedName": "@kwsites%2fpromise-deferred", + "scope": "@kwsites", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/simple-git" + ], + "_resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", + "_shasum": "8ace5259254426ccef57f3175bc64ed7095ed919", + "_spec": "@kwsites/promise-deferred@^1.1.1", + "_where": "C:\\Superalgos\\Client\\node_modules\\simple-git", + "author": { + "name": "Steve King", + "email": "steve@mydev.co" + }, + "bugs": { + "url": "https://github.com/kwsites/promise-deferred/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Steve King", + "email": "steve@mydev.co" + } + ], + "deprecated": false, + "description": "Minimalist creation of promise wrappers, exposing the ability to resolve or reject the inner promise", + "devDependencies": { + "@babel/core": "^7.10.3", + "@babel/preset-env": "^7.10.3", + "@babel/preset-typescript": "^7.10.1", + "@types/jest": "^26.0.0", + "@types/node": "^14.0.13", + "babel-jest": "^26.1.0", + "babel-preset-env": "^1.7.0", + "jest": "^26.1.0", + "ts-node": "^8.10.2", + "typescript": "^3.9.5" + }, + "files": [ + "LICENSE", + "dist/**/*.*" + ], + "homepage": "https://github.com/kwsites/promise-deferred#readme", + "license": "MIT", + "main": "./dist/index", + "name": "@kwsites/promise-deferred", + "private": false, + "repository": { + "type": "git", + "url": "git://github.com/kwsites/promise-deferred.git" + }, + "scripts": { + "build": "tsc --build", + "build:clean": "yarn run clean && tsc", + "clean": "git clean -fxd -e .idea -e node_modules", + "clean:modules": "git clean -fxd node_modules", + "postversion": "npm publish --access=public && git push && git push --tags", + "preversion": "yarn run build:clean && yarn test", + "test": "jest --coverage", + "tsc": "tsc" + }, + "types": "./dist/index", + "version": "1.1.1" +} diff --git a/Client/node_modules/simple-git/CHANGELOG.md b/Client/node_modules/simple-git/CHANGELOG.md new file mode 100644 index 000000000..d720e52ac --- /dev/null +++ b/Client/node_modules/simple-git/CHANGELOG.md @@ -0,0 +1,306 @@ + +# Change History & Release Notes + +## 2.31.0 Handle 'root' commit syntax + +- Adds a `root: boolean` property to the `CommitResult` interface representing whether the commit was a 'root' commit + (which is a commit that has no parent, most commonly the first commit in a repo). + +## 2.30.0 Restore compatibility with Node.js v10 + +- Reinstates native support for node.js v10 by removing use of ES6 constructs + +## 2.29.0 Update TypeScript response type for `git.mergeFromTo` + +- Update type definition for `git.mergeFromTo` to be the `MergeResult` returned + when using the more generic `git.merge` method. + Thanks to [@ofirelias](https://github.com/ofirelias) for the pull request. + +## 2.28.0 Add support for `git apply` & TypeScript Integration Tests + +- Adds support for `git.applyPatch` to apply patches generated in a `git diff` to the working index, + TypeScript consumers can make use of the `ApplyOptions` type definition to make use of strong types + for the supported options. Thanks to [@andreterron](https://github.com/andreterron) for the pull request. + +- Integration tests converted to TypeScript to ensure type safety across all tests. + +## 2.27.0 Included staged delete/modify in StatusResult staged array + +- Update the `git.status` parser to account for staged deleted/modified files and staged files with subsequent + modifications meaning a status of: + - `RM old -> new` will now appear in `renamed` and `new` will also appear in `modified` + - `D file` will now appear in both `deleted` and `staged` where ` D file` would only appear in `deleted` + +## 2.26.0 Fix error when using `git.log` with callback + +- Resolves an issue whereby using `git.log` with a callback (or awaiting the promise created from the now deprecated + `simple-git/promise` import) would fail to return the response to the caller. + +## 2.25.0 TypeScript Types & Unit Tests, Commit Parsing + +- See [Legacy Node Versions](./docs/LEGACY_NODE_VERSIONS.md) for details of how to use `simple-git` with `node.js` + versions 11 and below. +- To help keep the TypeScript definitions in line with functionality, unit tests are now written in TypeScript. +- When using `git.commit`, the first argument must be a string or array of strings. Passing another data type has long + been considered an error, but now a deprecation warning will be shown in the log and will be switched to an error + in version 3. +- Fixes an issue in `git.commit` whereby a commit that included only deleted lines would be parsed as though the + deletions were inclusions. + +## 2.24.0 Types updated + +- `pull`, `push` and `pushTags` parameter types updated to match new functionality and tests switched to TypeScript to ensure they are kept in sync + +## 2.23.0 update `debug` dependency & `master` -> `main` + +- Upgrade `debug` dependency and remove use of now deprecated `debug().destroy()` +- Renames the default source branch from `master` to `main` + +## 2.22.0 add `git.hashObject` interface + +- Adds support for `git hash-object FILE` and `git hash-object -w FILE` + with new interface `git.hashObject(...)`, with thanks to [@MiOnim](https://github.com/MiOnim) + +## 2.21.0 add `string[]` to `LogOptions` type + +- Adds `string[]` to the set of types supported as options for `git.log` +- Fix readme typos + +## 2.20.1 Bug-fix: `LogOptions` type definition + +- `LogOptions` should be intersection rather than union types + +## 2.19.0 - Upgrade task option filters + +- move the command/task option processing function to TypeScript + +## 2.18.0 - Upgrade Clone / Mirror tasks + +- `git.clone` and `git.mirror` rewritten to fit the TypeScript tasks style. +- resolves issue whereby `git.clone` didn't accept an object of options despite being documented as supporting. + +## 2.17.0 - Add remote message parsing to `git pull` + +- `git pull` (and by extension `git merge`) adds remote message parsing to the `PullResult` type +- Remote message parsing adds property `remoteMessages.objects` of type `RemoteMessagesObjectEnumeration` to capture the objects transferred in fetch and push. + +## 2.16.0 - Upgrade Move task + +- `git.mv` rewritten to fit the TypeScript tasks style. +- set up github actions for CI + +## 2.15.0 - Task parsers automatically have access to `stdErr` as well as `stdOut` + +- adds the `TaskParser` type to describe a task's parser function and creates the `LineParser` utility to simplify line-by-line parsing of string responses. +- renames some interfaces for consistency of naming, the original name remains as a type alias marked as `@deprecated` until version 3.x: + - BranchDeletionSummary > BranchSingleDeleteResult + - BranchDeletionBatchSummary > BranchMultiDeleteResult + - MergeSummary > MergeResult + +## 2.14.0 - Bug fix: `git.checkoutBranch` fails to pass commands to git child process + +- resolves an issue whereby the `git.checkoutBranch` method would not pass the branch detail through to the underlying child process. + +## 2.13.2 - PushResult to expose all non-empty remote messages + +- Further to `2.13.0` includes all (non-empty) `remote:` lines in the `PushResult`, + including `remote:` lines used for other parser results (ie: `pullRequestUrl` etc). + +## 2.13.1 - Add support for parsing GitLab Pull Request Url Message + +- Further to `2.13.0` adding support for parsing the reponse to `git.push`, adds support for the pull request message + used by gitlab. + +## 2.13.0 - Upgraded Pull & Merge and parser for Push + +- `.push` and `.pushTags` rewritten as v2 style tasks. The git response is now parsed and returned as a + [PushResult](./typings/response.d.ts) + +- Pull and merge rewritten to fit the TypeScript tasks style. + +- Integration tests updated to run through jest directly without compiling from nodeunit + +## 2.12.0 - Bug fix: chaining onto / async awaiting `git.tags` failed + +- resolves an issue whereby the `git.tags` method could not be chained or used as an async/promise. + +## 2.11.0 - Parallel / concurrent tasks, fresh repo status parser & bug-fix in `checkoutLocalBranch` + +- until now, `simple-git` reject all pending tasks in the queue when a task has failed. From `2.11.0`, only + tasks chained from the failing one will be rejected, other tasks can continue to be processed as normal, + giving the developer more control over which tasks should be treated as atomic chains, and which can be + [run in parallel](./readme.md#concurrent--parallel-requests). + + To support this, and to prevent the issues seen when `git` is run concurrently in too many child processes, + `simple-git` will limit the number of tasks running in parallel at any one time to be at most 1 from each + chain (ie: chained tasks are still run in series) and at most 5 tasks across all chains ( + [configurable](./readme.md#configuration) by passing `{maxConcurrentProcesses: x}` in the `simpleGit` constructor). + +- add support to `git.status()` for parsing the response of a repo that has no commits yet, previously + it wouldn't determine the branch name correctly. + +- resolved a flaw introduced in `2.9.0` whereby `checkoutLocalBranch` would silently fail and not check out the branch + +## 2.10.0 - trailing options in checkout, init, status, reset & bug-fix awaiting a non-task + +- `git.checkout` now supports both object and array forms of supplying trailing options. + +```typescript +import simpleGit from 'simple-git'; +await simpleGit().checkout('branch-name', ['--track', 'remote/branch']); +await simpleGit().checkout(['branch-name', '--track', 'remote/branch']); +await simpleGit().checkout({'branch-name': null}); +``` + +- `git.init` now supports both object and array forms of supplying trailing options and now + parses the response to return an [InitResult](./typings/response.d.ts); + +```typescript +import simpleGit, { InitResult } from 'simple-git'; +const notSharedInit: InitResult = await simpleGit().init(false, ['--shared=false']); +const notSharedBareInit: InitResult = await simpleGit().init(['--bare', '--shared=false']); +const sharedInit: InitResult = await simpleGit().init(false, {'--shared': 'true'}); +const sharedBareInit: InitResult = await simpleGit().init({'--bare': null, '--shared': 'false'}); +``` + +- `git.status` now supports both object and array forms of supplying trailing options. + +```typescript +import simpleGit, { StatusResult } from 'simple-git'; +const repoStatus: StatusResult = await simpleGit().status(); +const subDirStatus: StatusResult = await simpleGit().status(['--', 'sub-dir']); +``` + +- `git.reset` upgraded to the new task style and exports an enum `ResetMode` with all supported + merge modes and now supports both object and array forms of supplying trailing options. + +```typescript +import simpleGit, { ResetMode } from 'simple-git'; + +// git reset --hard +await simpleGit().reset(ResetMode.HARD); + +// git reset --soft -- sub-dir +await simpleGit().reset(ResetMode.SOFT, ['--', 'sub-dir']); +``` + +- bug-fix: it should not be possible to await the `simpleGit()` task runner, only the tasks it returns. + +```typescript +expect(simpleGit().then).toBeUndefined(); +expect(simpleGit().init().then).toBe(expect.any(Function)); +``` + +## 2.9.0 - checkIsRepo, rev-parse + +- `.checkIsRepo()` updated to allow choosing the type of check to run, either by using the exported `CheckRepoActions` enum + or the text equivalents ('bare', 'root' or 'tree'): + - `checkIsRepo(CheckRepoActions.BARE): Promise` determines whether the working directory represents a bare repo. + - `checkIsRepo(CheckRepoActions.IS_REPO_ROOT): Promise` determines whether the working directory is at the root of a repo. + - `checkIsRepo(CheckRepoActions.IN_TREE): Promise` determines whether the working directory is a descendent of a git root. + +- `.revparse()` converted to a new style task + +## 2.8.0 - Support for `default` import in TS without use of `esModuleInterop` + +- Enables support for using the default export of `simple-git` as an es module, in TypeScript it is no + longer necessary to enable the `esModuleInterop` flag in the `tsconfig.json` to consume the default + export. + +### 2.7.2 - Bug Fix: Remove `promise.ts` source from `simple-git` published artifact + +- Closes #471, whereby the source for the promise wrapped runner would be included in the published artifact + due to sharing the same name as the explicitly included `promise.js` in the project root. + +### 2.7.1 - Bug Fix: `await git.log` having imported from root `simple-git` + +- Fixes #464, whereby using `await` on `git.log` without having supplied a callback would ignore the leading options + object or options array. + +## 2.7.0 - Output Handler and logging + +- Updated to the `outputHandler` type to add a trailing argument for the arguments passed into the child process. +- All logging now uses the [debug](https://www.npmjs.com/package/debug) library. Enable logging by adding `simple-git` + to the `DEBUG` environment variable. `git.silent(false)` can still be used to explicitly enable logging and is + equivalent to calling `require('debug').enable('simple-git')`. + +## 2.6.0 - Native Promises, Typed Errors, TypeScript Importing, Git.clean and Git.raw + +### Native Promises + +- _TL;DR - `.then` and `.catch` can now be called on the standard `simpleGit` chain to handle the promise + returned by the most recently added task... essentially, promises now just work the way you would expect + them to._ +- The main export from `simple-git` no longer shows the deprecation notice for using the + `.then` function, it now exposes the promise chain generated from the most recently run + task, allowing the combination of chain building and ad-hoc splitting off to a new promise chain. + - See the [unit](./test/unit/promises.spec.js) and [integration](./test/integration/promise-from-root.spec.js) tests. + - See the [typescript consumer](./test/consumer/ts-default-from-root.spec.ts) test. + +### TypeScript Importing + +- Promise / async interface and TypeScript types all available from the `simple-git` import rather than needing + `simple-git/promise`, see examples in the [ReadMe](./readme.md) or in the [consumer tests](./test/consumer). + +### Typed Errors + +- Tasks that previously validated their usage and rejected with a `TypeError` will now reject with a + [`TaskConfigurationError`](./src/lib/errors/task-configuration-error.ts). + +- Tasks that previously rejected with a custom object (currently only `git.merge` when the auto-merge fails) + will now reject with a [`GitResponseError`](./src/lib/errors/git-response-error.ts) where previously it + was a modified `Error`. + +### Git Clean + +- `git.clean(...)` will now return a `CleanSummary` instead of the raw string data + +### Git Raw + +- `git.raw(...)` now accepts any number of leading string arguments as an alternative to the + single array of strings. + +## 2.5.0 - Git.remote + +- all `git.remote` related functions converted to TypeScript + +## 2.4.0 - Git.subModule + +- all `git.subModule` related functions converted to TypeScript + +## 2.3.0 - Git.config + +- add new `git.listConfig` to get current configuration +- `git.addConfig` supports a new `append` flag to append the value into the config rather than overwrite existing + +## 2.2.0 - Git.branch + +- all `git.branch` related functions converted to TypeScript +- add new `git.deleteLocalBranches` to delete multiple branches in one call +- `git.deleteLocalBranches` and `git.deleteLocalBranch` now support an optional `forceDelete` flag + +## 2.1.0 - Git.tag + +- `.tags`, `.addTag` and `.addAnnotatedTag` converted to TypeScript, no backward compatibility changes + +## 2.0.0 - Incremental switch to TypeScript and rewritten task execution + +- If your application depended on any functions with a name starting with an `_`, the upgrade may not be seamless, +please only use the documented public API. + +- `git.log` date format is now strict ISO by default (ie: uses the placeholder `%aI`) instead of the 1.x default of +`%ai` for an "ISO-like" date format. To restore the old behaviour, add `strictDate = false` to the options passed to +`git.log`. + + +## 1.110.0 - ListLogLine + +- The default format expression used in `.log` splits ref data out of the `message` into a property of its own: `{ message: 'Some commit message (some-branch-name)' }` becomes `{ message: 'Some commit message', refs: 'some-branch-name' }` | +- The commit body content is now included in the default format expression and can be used to identify the content of merge conflicts eg: `{ body: '# Conflicts:\n# some-file.txt' }` | + + +## 1.0.0 + +Bumped to a new major revision in the 1.x branch, now uses `ChildProcess.spawn` in place of `ChildProcess.exec` to +add escaping to the arguments passed to each of the tasks. + diff --git a/Client/node_modules/simple-git/LICENSE b/Client/node_modules/simple-git/LICENSE new file mode 100644 index 000000000..b123c04ba --- /dev/null +++ b/Client/node_modules/simple-git/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2015 Steve King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Client/node_modules/simple-git/node_modules/debug/LICENSE b/Client/node_modules/simple-git/node_modules/debug/LICENSE new file mode 100644 index 000000000..658c933d2 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Client/node_modules/simple-git/node_modules/debug/README.md b/Client/node_modules/simple-git/node_modules/debug/README.md new file mode 100644 index 000000000..88dae35d9 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/debug/README.md @@ -0,0 +1,455 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Client/node_modules/simple-git/node_modules/debug/package.json b/Client/node_modules/simple-git/node_modules/debug/package.json new file mode 100644 index 000000000..f4d379ee7 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/debug/package.json @@ -0,0 +1,101 @@ +{ + "_from": "debug@^4.3.1", + "_id": "debug@4.3.1", + "_inBundle": false, + "_integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "_location": "/simple-git/debug", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "debug@^4.3.1", + "name": "debug", + "escapedName": "debug", + "rawSpec": "^4.3.1", + "saveSpec": null, + "fetchSpec": "^4.3.1" + }, + "_requiredBy": [ + "/simple-git" + ], + "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "_shasum": "f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee", + "_spec": "debug@^4.3.1", + "_where": "C:\\Superalgos\\Client\\node_modules\\simple-git", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": "./src/browser.js", + "bugs": { + "url": "https://github.com/visionmedia/debug/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + }, + { + "name": "Josh Junon", + "email": "josh@junon.me" + } + ], + "dependencies": { + "ms": "2.1.2" + }, + "deprecated": false, + "description": "small debugging utility", + "devDependencies": { + "brfs": "^2.0.1", + "browserify": "^16.2.3", + "coveralls": "^3.0.2", + "istanbul": "^0.4.5", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6.0" + }, + "files": [ + "src", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/visionmedia/debug#readme", + "keywords": [ + "debug", + "log", + "debugger" + ], + "license": "MIT", + "main": "./src/index.js", + "name": "debug", + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls", + "test:node": "istanbul cover _mocha -- test.js" + }, + "version": "4.3.1" +} diff --git a/Client/node_modules/simple-git/node_modules/debug/src/browser.js b/Client/node_modules/simple-git/node_modules/debug/src/browser.js new file mode 100644 index 000000000..cd0fc35d1 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/debug/src/browser.js @@ -0,0 +1,269 @@ +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; diff --git a/Client/node_modules/simple-git/node_modules/debug/src/common.js b/Client/node_modules/simple-git/node_modules/debug/src/common.js new file mode 100644 index 000000000..392a8e005 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/debug/src/common.js @@ -0,0 +1,261 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; diff --git a/Client/node_modules/simple-git/node_modules/debug/src/index.js b/Client/node_modules/simple-git/node_modules/debug/src/index.js new file mode 100644 index 000000000..bf4c57f25 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/Client/node_modules/simple-git/node_modules/debug/src/node.js b/Client/node_modules/simple-git/node_modules/debug/src/node.js new file mode 100644 index 000000000..79bc085cb --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/debug/src/node.js @@ -0,0 +1,263 @@ +/** + * Module dependencies. + */ + +const tty = require('tty'); +const util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; diff --git a/Client/node_modules/simple-git/node_modules/ms/index.js b/Client/node_modules/simple-git/node_modules/ms/index.js new file mode 100644 index 000000000..c4498bcc2 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/ms/index.js @@ -0,0 +1,162 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} diff --git a/Client/node_modules/simple-git/node_modules/ms/license.md b/Client/node_modules/simple-git/node_modules/ms/license.md new file mode 100644 index 000000000..69b61253a --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Client/node_modules/simple-git/node_modules/ms/package.json b/Client/node_modules/simple-git/node_modules/ms/package.json new file mode 100644 index 000000000..fade7c386 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/ms/package.json @@ -0,0 +1,69 @@ +{ + "_from": "ms@2.1.2", + "_id": "ms@2.1.2", + "_inBundle": false, + "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "_location": "/simple-git/ms", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "ms@2.1.2", + "name": "ms", + "escapedName": "ms", + "rawSpec": "2.1.2", + "saveSpec": null, + "fetchSpec": "2.1.2" + }, + "_requiredBy": [ + "/simple-git/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "_shasum": "d09d1f357b443f493382a8eb3ccd183872ae6009", + "_spec": "ms@2.1.2", + "_where": "C:\\Superalgos\\Client\\node_modules\\simple-git\\node_modules\\debug", + "bugs": { + "url": "https://github.com/zeit/ms/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Tiny millisecond conversion utility", + "devDependencies": { + "eslint": "4.12.1", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/zeit/ms#readme", + "license": "MIT", + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "main": "./index", + "name": "ms", + "repository": { + "type": "git", + "url": "git+https://github.com/zeit/ms.git" + }, + "scripts": { + "lint": "eslint lib/* bin/*", + "precommit": "lint-staged", + "test": "mocha tests.js" + }, + "version": "2.1.2" +} diff --git a/Client/node_modules/simple-git/node_modules/ms/readme.md b/Client/node_modules/simple-git/node_modules/ms/readme.md new file mode 100644 index 000000000..9a1996b17 --- /dev/null +++ b/Client/node_modules/simple-git/node_modules/ms/readme.md @@ -0,0 +1,60 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +ms('-3 days') // -259200000 +ms('-1h') // -3600000 +ms('-200') // -200 +``` + +### Convert from Milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(-3 * 60000) // "-3m" +ms(ms('10 hours')) // "10h" +``` + +### Time Format Written-Out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(-3 * 60000, { long: true }) // "-3 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [Node.js](https://nodejs.org) and in the browser +- If a number is supplied to `ms`, a string with a unit is returned +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) +- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned + +## Related Packages + +- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. + +## Caught a Bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/Client/node_modules/simple-git/package.json b/Client/node_modules/simple-git/package.json new file mode 100644 index 000000000..cfecdc4db --- /dev/null +++ b/Client/node_modules/simple-git/package.json @@ -0,0 +1,96 @@ +{ + "_from": "simple-git", + "_id": "simple-git@2.31.0", + "_inBundle": false, + "_integrity": "sha512-/+rmE7dYZMbRAfEmn8EUIOwlM2G7UdzpkC60KF86YAfXGnmGtsPrKsym0hKvLBdFLLW019C+aZld1+6iIVy5xA==", + "_location": "/simple-git", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "simple-git", + "name": "simple-git", + "escapedName": "simple-git", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/simple-git/-/simple-git-2.31.0.tgz", + "_shasum": "3e5954c1e36c76fb382c08eaa2749a206db9f613", + "_spec": "simple-git", + "_where": "C:\\Superalgos\\Client", + "author": { + "name": "Steve King", + "email": "steve@mydev.co" + }, + "bugs": { + "url": "https://github.com/steveukx/git-js/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Steve King", + "email": "steve@mydev.co" + } + ], + "dependencies": { + "@kwsites/file-exists": "^1.1.1", + "@kwsites/promise-deferred": "^1.1.1", + "debug": "^4.3.1" + }, + "deprecated": false, + "description": "Simple GIT interface for node.js", + "devDependencies": { + "@babel/core": "^7.12.9", + "@babel/preset-env": "^7.12.7", + "@babel/preset-typescript": "^7.12.7", + "@kwsites/promise-result": "^1.1.0", + "@types/debug": "^4.1.5", + "@types/jest": "^26.0.15", + "@types/node": "^14.14.10", + "babel-jest": "^26.6.3", + "babel-plugin-module-resolver": "^4.0.0", + "jest": "^26.6.3", + "ts-node": "^9.0.0", + "typescript": "^4.1.2" + }, + "files": [ + "promise.js", + "promise.d.ts", + "src/**/*.d.ts", + "src/**/*.js", + "src/**/*.js.map", + "typings/" + ], + "homepage": "https://github.com/steveukx/git-js#readme", + "keywords": [ + "git", + "source control", + "vcs" + ], + "license": "MIT", + "main": "./src/index.js", + "name": "simple-git", + "repository": { + "type": "git", + "url": "git://github.com/steveukx/git-js.git" + }, + "scripts": { + "build": "tsc --build", + "build:clean": "yarn clean && yarn build", + "build:release": "tsc -p tsconfig.release.json", + "clean": "git clean -fxd -e .idea -e node_modules", + "postversion": "npm publish && git push && git push --tags", + "preversion": "yarn clean && yarn test && yarn build:release", + "test": "yarn test:consumer && yarn test:jest", + "test:consumer": "tsc -p test/consumer/tsconfig-standard.json && tsc -p test/consumer/tsconfig-promise.json", + "test:jest": "jest --coverage", + "tsc": "tsc" + }, + "types": "./typings/index.d.ts", + "version": "2.31.0" +} diff --git a/Client/node_modules/simple-git/promise.d.ts b/Client/node_modules/simple-git/promise.d.ts new file mode 100644 index 000000000..ebecc0d0b --- /dev/null +++ b/Client/node_modules/simple-git/promise.d.ts @@ -0,0 +1,46 @@ +import * as errors from './typings/errors'; +import * as types from './typings/types'; +import * as resp from './typings/response'; +import * as simpleGit from './typings/simple-git'; + +declare const simplegit: simplegit.SimpleGitExport; + +declare namespace simplegit { + + type SimpleGitExport = ((basePath?: string) => simplegit.SimpleGit) & { + CleanOptions: typeof types.CleanOptions + }; + + type SimpleGit = simpleGit.SimpleGit; + + // errors + type GitError = errors.GitError; + type GitConstructError = errors.GitConstructError; + type GitResponseError = errors.GitResponseError; + type TaskConfigurationError = errors.TaskConfigurationError; + + // responses + type BranchSummary = resp.BranchSummary + type CleanSummary = resp.CleanSummary; + type CleanMode = types.CleanMode; + type DiffResult = resp.DiffResult; + type FetchResult = resp.FetchResult; + type CommitResult = resp.CommitResult; + type MergeResult = resp.MergeResult; + type PullResult = resp.PullResult; + type StatusResult = resp.StatusResult; + type TagResult = resp.TagResult; + + // types + type outputHandler = types.outputHandler + type LogOptions = types.LogOptions; + type Options = types.Options; + + // deprecated + /** @deprecated use MergeResult */ + type MergeSummary = resp.MergeSummary; + /** @deprecated use CommitResult */ + type CommitSummary = resp.CommitResult; +} + +export = simplegit; diff --git a/Client/node_modules/simple-git/promise.js b/Client/node_modules/simple-git/promise.js new file mode 100644 index 000000000..a8aaf34d4 --- /dev/null +++ b/Client/node_modules/simple-git/promise.js @@ -0,0 +1,7 @@ + +const {esModuleFactory, gitExportFactory} = require('./src/git-factory'); +const {gitP} = require('./src/lib/runners/promise-wrapped'); + +module.exports = esModuleFactory( + gitExportFactory(gitP) +); diff --git a/Client/node_modules/simple-git/readme.md b/Client/node_modules/simple-git/readme.md new file mode 100644 index 000000000..e2d68674f --- /dev/null +++ b/Client/node_modules/simple-git/readme.md @@ -0,0 +1,796 @@ +# Simple Git +[![NPM version](https://img.shields.io/npm/v/simple-git.svg)](https://www.npmjs.com/package/simple-git) + [![Build Status](https://travis-ci.org/steveukx/git-js.svg?branch=master)](https://travis-ci.org/steveukx/git-js) + +A lightweight interface for running `git` commands in any [node.js](https://nodejs.org) application. + +# Installation + +Easiest through [npm](https://npmjs.org): `npm install simple-git` + +# Dependencies + +Requires [git](https://git-scm.com/downloads) to be installed and that it can be called using the command `git`. + +# Usage + +Include into your JavaScript app using: + +```js +// require the library, main export is a function +const simpleGit = require('simple-git'); +const git = simpleGit(); +``` + +Include in a TypeScript app using: + +```typescript +// Import `SimpleGit` types and the default function exported from `simple-git` +import simpleGit, {SimpleGit} from 'simple-git'; +const git: SimpleGit = simpleGit(); + +// prior to v2.6.0 required importing from `simple-git/promise` +// this import is still available but is now deprecated +import gitP, {SimpleGit} from 'simple-git/promise'; +const git: SimpleGit = gitP(); +``` + +## Configuration + +Configure each `simple-git` instance with a properties object passed to the main `simpleGit` function: + +```typescript +import simpleGit, { SimpleGit, SimpleGitOptions } from 'simple-git'; + +const options: SimpleGitOptions = { + baseDir: process.cwd(), + binary: 'git', + maxConcurrentProcesses: 6, +}; + +// when setting all options in a single object +const git: SimpleGit = simpleGit(options); + +// or split out the baseDir, supported for backward compatibility +const git: SimpleGit = simpleGit('/some/path', { binary: 'git' }); +``` + +The first argument can be either a string (representing the working directory for `git` commands to run in), +`SimpleGitOptions` object or `undefined`, the second parameter is an optional `SimpleGitOptions` object. + +All configuration properties are optional, the default values are shown in the example above. + +## Using task callbacks + +Each of the methods in the API listing below can be called in a chain and will be called in series after each other. +The result of each task is sent to a trailing callback argument: + +```javascript +const simpleGit = require('simple-git'); +const git = simpleGit(); +git.init(onInit).addRemote('origin', 'git@github.com:steveukx/git-js.git', onRemoteAdd); + +function onInit (err, initResult) { } +function onRemoteAdd (err, addRemoteResult) { } +``` + +If any of the steps in the chain result in an error, all pending steps will be cancelled, see the +[parallel tasks]((#concurrent--parallel-requests)) section for more information on how to run tasks in parallel rather than in series . + +## Using task promises + +Based on the same API as the callback API detailed below, but instead of returning the `simpleGit` object for +chaining, each task returns a promise to be fulfilled when that task is completed. + +```javascript +const simpleGit = require('simple-git'); +const git = simpleGit(); + +// using promises on each task +git.init() + .then(function onInit (initResult) { }) + .then(() => git.addRemote('origin', 'git@github.com:steveukx/git-js.git')) + .then(function onRemoteAdd (addRemoteResult) { }) + .catch(err => console.error(err)); + +// using a promise at the end of the chain to check for failures in any task +git.init().addRemote('origin', 'git@github.com:steveukx/git-js.git') + .catch(err => console.error(err)); +``` + +## Using task promises as async/await + +Whether in TypeScript or JavaScript in node.js version 8 or above the promise API will work automatically +with await: + +```typescript +import simpleGit, { SimpleGit } from 'simple-git'; + +const git: SimpleGit = simpleGit(); +const initResult = await git.init(); +const addRemoteResult = await git.addRemote('origin', 'git@github.com:steveukx/git-js.git'); +``` + +To catch errors in async code, either wrap the whole chain in a try/catch: + +```javascript +const git = simpleGit() +try { + await git.init(); + await git.addRemote(name, repoUrl); +} +catch (e) { /* handle all errors here */ } +``` + +or catch individual steps to permit the main chain to carry on executing rather than +jumping to the final `catch` on the first error: + +```javascript +const git = simpleGit() +try { + await git.init().catch(ignoreError); + await git.addRemote(name, repoUrl); +} +catch (e) { /* handle all errors here */ } + +function ignoreError () {} +``` + +## Task Responses + +Whether using a trailing callback or a Promise, tasks either return the raw `string` or `Buffer` response from the +`git` binary, or where possible a parsed interpretation of the response. + +For type details of the response for each of the tasks, please see the [TypeScript definitions](./typings/simple-git.d.ts). + + +# API + +| API | What it does | +|-----|--------------| +| `.add([fileA, ...], handlerFn)` | adds one or more files to be under source control | +| `.addAnnotatedTag(tagName, tagMessage, handlerFn)` | adds an annotated tag to the head of the current branch | +| `.addTag(name, handlerFn)` | adds a lightweight tag to the head of the current branch | +| `.catFile(options[, handlerFn])` | generate `cat-file` detail, `options` should be an array of strings as supported arguments to the [cat-file](https://git-scm.com/docs/git-cat-file) command | +| `.checkIgnore([filepath, ...], handlerFn)` | checks if filepath excluded by .gitignore rules | +| `.clearQueue()` | immediately clears the queue of pending tasks (note: any command currently in progress will still call its completion callback) | +| `.commit(message, handlerFn)` | commits changes in the current working directory with the supplied message where the message can be either a single string or array of strings to be passed as separate arguments (the `git` command line interface converts these to be separated by double line breaks) | +| `.commit(message, [fileA, ...], options, handlerFn)` | commits changes on the named files with the supplied message, when supplied, the optional options object can contain any other parameters to pass to the commit command, setting the value of the property to be a string will add `name=value` to the command string, setting any other type of value will result in just the key from the object being passed (ie: just `name`), an example of setting the author is below | +| `.customBinary(gitPath)` | sets the command to use to reference git, allows for using a git binary not available on the path environment variable | +| `.cwd(workingDirectory)` | Sets the current working directory for all commands after this step in the chain | +| `.diff(options, handlerFn)` | get the diff of the current repo compared to the last commit with a set of options supplied as a string | +| `.diff(handlerFn)` | get the diff for all file in the current repo compared to the last commit | +| `.diffSummary(handlerFn)` | gets a summary of the diff for files in the repo, uses the `git diff --stat` format to calculate changes. Handler is called with a nullable error object and an instance of the [DiffSummary](src/lib/responses/DiffSummary.js) | +| `.diffSummary(options, handlerFn)` | includes options in the call to `diff --stat options` and returns a [DiffSummary](src/lib/responses/DiffSummary.js) | +| `.env(name, value)` | Set environment variables to be passed to the spawned child processes, [see usage in detail below](#environment-variables). | +| `.exec(handlerFn)` | calls a simple function in the current step | +| `.fetch([options, ] handlerFn)` | update the local working copy database with changes from the default remote repo and branch, when supplied the options argument can be a standard [options object](#how-to-specify-options) either an array of string commands as supported by the [git fetch](https://git-scm.com/docs/git-fetch). | +| `.fetch(remote, branch, handlerFn)` | update the local working copy database with changes from a remote repo | +| `.fetch(handlerFn)` | update the local working copy database with changes from the default remote repo and branch | +| `.log([options], handlerFn)` | list commits between `options.from` and `options.to` tags or branch (if not specified will show all history). Additionally you can provide `options.file`, which is the path to a file in your repository. Then only this file will be considered. `options.symmetric` allows you to specify whether you want to use [symmetric revision range](https://git-scm.com/docs/gitrevisions#_dotted_range_notations) (To be compatible, by default, its value is true). For any other set of options, supply `options` as an array of strings to be appended to the `git log` command. To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on. Set `options.multiLine` to true to include a multi-line body in the output format. Options can also be supplied as a standard [options](#how-to-specify-options) object for adding custom properties supported by the [git log](https://git-scm.com/docs/git-log) command. | +| `.outputHandler(handlerFn)` | attaches a handler that will be called with the name of the command being run and the `stdout` and `stderr` [readable streams](https://nodejs.org/api/stream.html#stream_class_stream_readable) created by the [child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess) running that command | +| `.raw(args[, handlerFn])` | Execute any arbitrary array of commands supported by the underlying git binary. When the git process returns a non-zero signal on exit and it printed something to `stderr`, the commmand will be treated as an error, otherwise treated as a success. | +| `.rebase([options,] handlerFn)` | Rebases the repo, `options` should be supplied as an array of string parameters supported by the [git rebase](https://git-scm.com/docs/git-rebase) command, or an object of options (see details below for option formats). | +| `.revert(commit [, options [, handlerFn]])` | reverts one or more commits in the working copy. The commit can be any regular commit-ish value (hash, name or offset such as `HEAD~2`) or a range of commits (eg: `master~5..master~2`). When supplied the [options](#how-to-specify-options) argument contain any options accepted by [git-revert](https://git-scm.com/docs/git-revert). | +| `.rm([fileA, ...], handlerFn)` | removes any number of files from source control | +| `.rmKeepLocal([fileA, ...], handlerFn)` | removes files from source control but leaves them on disk | +| `.stash([options, ][ handlerFn])` | Stash the working directory, optional first argument can be an array of string arguments or [options](#how-to-specify-options) object to pass to the [git stash](https://git-scm.com/docs/git-stash) command. | +| `.stashList([options, ][handlerFn])` | Retrieves the stash list, optional first argument can be an object specifying `options.splitter` to override the default value of `;;;;`, alternatively options can be a set of arguments as supported by the `git stash list` command. | +| `.tag(args[], handlerFn)` | Runs any supported [git tag](https://git-scm.com/docs/git-tag) commands with arguments passed as an array of strings . | +| `.tags([options, ] handlerFn)` | list all tags, use the optional [options](#how-to-specify-options) object to set any options allows by the [git tag](https://git-scm.com/docs/git-tag) command. Tags will be sorted by semantic version number by default, for git versions 2.7 and above, use the `--sort` option to set a custom sort. | +| `.show([options], handlerFn)` | Show various types of objects, for example the file content at a certain commit. `options` is the single value string or array of string commands you want to run | + +## git apply + +- `.applyPatch(patch, [options])` applies a single string patch (as generated by `git diff`), optionally configured with the supplied [options](#how-to-specify-options) to set any arguments supported by the [apply](https://git-scm.com/docs/git-apply) command. Returns the unmodified string response from `stdout` of the `git` binary. +- `.applyPatch(patches, [options])` applies an array of string patches (as generated by `git diff`), optionally configured with the supplied [options](#how-to-specify-options) to set any arguments supported by the [apply](https://git-scm.com/docs/git-apply) command. Returns the unmodified string response from `stdout` of the `git` binary. + +## git branch + +- `.branch([options])` uses the supplied [options](#how-to-specify-options) to run any arguments supported by the [branch](https://git-scm.com/docs/git-branch) command. Either returns a [BranchSummaryResult](src/lib/responses/BranchSummary.ts) instance when listing branches, or a [BranchSingleDeleteResult](typings/response.d.ts) type object when the options included `-d`, `-D` or `--delete` which cause it to delete a named branch rather than list existing branches. +- `.branchLocal()` gets a list of local branches as a [BranchSummaryResult](src/lib/responses/BranchSummary.ts) instance +- `.deleteLocalBranch(branchName)` deletes a local branch - treats a failed attempt as an error +- `.deleteLocalBranch(branchName, forceDelete)` deletes a local branch, optionally explicitly setting forceDelete to true - treats a failed attempt as an error +- `.deleteLocalBranches(branchNames)` deletes multiple local branches +- `.deleteLocalBranches(branchNames, forceDelete)` deletes multiple local branches, optionally explicitly setting forceDelete to true + +## git clean + +- `.clean(mode)` clean the working tree. Mode should be "n" - dry run or "f" - force +- `.clean(cleanSwitches [,options])` set `cleanSwitches` to a string containing any number of the supported single character options, optionally with a standard [options](#how-to-specify-options) object + +## git checkout + +- `.checkout(checkoutWhat [, options])` - checks out the supplied tag, revision or branch when supplied as a string, + additional arguments supported by [git checkout](https://git-scm.com/docs/git-checkout) can be supplied as an + [options](#how-to-specify-options) object/array. + +- `.checkout(options)` - uses the checks out the supplied [options](#how-to-specify-options) object/array to check out. + +- `.checkoutBranch(branchName, startPoint)` - checks out a new branch from the supplied start point. + +- `.checkoutLocalBranch(branchName)` - checks out a new local branch + +## git clone + +- `.clone(repoPath, [localPath, [options]])` clone a remote repo at `repoPath` to a local directory at `localPath`, optionally with a standard [options](#how-to-specify-options) object of additional arguments to include between `git clone` and the trailing `repo local` arguments +- `.clone(repoPath, [options])` clone a remote repo at `repoPath` to a directory in the current working directory with the same name as the repo + +- `mirror(repoPath, [localPath, [options]])` behaves the same as the `.clone` interface with the [`--mirror` flag](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---mirror) enabled. + + +## git config + +- `.addConfig(key, value, append = false)` add a local configuration property, when `append` is set to `true` the + configuration setting is appended to rather than set in the local config. +- `.listConfig()` reads the current configuration and returns a [ConfigListSummary](./src/lib/responses/ConfigList.ts) + +## git hash-object + +- `.hashObject(filePath, write = false)` computes the object ID value for the contents of the named file (which can be + outside of the work tree), optionally writing the resulting value to the object database. + +## git init + +- `.init(bare [, options])` initialize a repository using the boolean `bare` parameter to intialise a bare repository. + Any number of other arguments supported by [git init](https://git-scm.com/docs/git-init) can be supplied as an + [options](#how-to-specify-options) object/array. + +- `.init([options])` initialize a repository using any arguments supported by + [git init](https://git-scm.com/docs/git-init) supplied as an [options](#how-to-specify-options) object/array. + +## git merge + +- `.merge(options)` runs a merge using any configuration [options](#how-to-specify-options) supported + by [git merge](https://git-scm.com/docs/git-init). + Conflicts during the merge result in an error response, the response is an instance of + [MergeSummary](src/lib/responses/MergeSummary.ts) whether it was an error or success. + When successful, the MergeSummary has all detail from a the [PullSummary](src/lib/responses/PullSummary.ts) + along with summary detail for the merge. + When the merge failed, the MergeSummary contains summary detail for why the merge failed and which files + prevented the merge. + +- `.mergeFromTo(from, to [, options])` - merge from one branch to another, similar to `.merge` but with the + `from` and `to` supplied as strings separately to any additional the [options](#how-to-specify-options). + +## git mv + +- `.mv(from, to)` rename or move a single file at `from` to `to` + +- `.mv(from, to)` move all files in the `from` array to the `to` directory + + +## git pull + +- `.pull([options])` pulls all updates from the default tracked remote, any arguments supported by + [git pull](https://git-scm.com/docs/git-pull) can be supplied as an [options](#how-to-specify-options) object/array. + +- `.pull(remote, branch[, options])` pulls all updates from the specified remote branch (eg 'origin'/'master') along + with any custom [options](#how-to-specify-options) object/array + +## git push + +- `.push([options])` pushes to a named remote/branch using any supported [options](#how-to-specify-options) + from the [git push](https://git-scm.com/docs/git-push) command. Note that `simple-git` enforces the use of + `--verbose --porcelain` options in order to parse the response. You don't need to supply these options. + +- `.push(remote, branch[, options])` pushes to a named remote/branch, supports additional + [options](#how-to-specify-options) from the [git push](https://git-scm.com/docs/git-push) command. + +- `.pushTags(remote[, options])` pushes local tags to a named remote (equivalent to using `.push([remote, '--tags'])`) + +## git remote + +- `.addRemote(name, repo, [options])` adds a new named remote to be tracked as `name` at the path `repo`, optionally with any supported [options](#how-to-specify-options) for the [git add](https://git-scm.com/docs/git-remote#Documentation/git-remote.txt-emaddem) call. +- `.getRemotes([verbose])` gets a list of the named remotes, supply the optional `verbose` option as `true` to include the URLs and purpose of each ref +- `.listRemote([options])` lists remote repositories - there are so many optional arguments in the underlying `git ls-remote` call, just supply any you want to use as the optional [options](#how-to-specify-options) eg: `git.listRemote(['--heads', '--tags'], console.log)` +- `.remote([options])` runs a `git remote` command with any number of [options](#how-to-specify-options) +- `.removeRemote(name)` removes the named remote + +## git reset + +- `.reset(resetMode, [resetOptions])` resets the repository, sets the reset mode to one of the supported types (use a constant from + the exported `ResetMode` enum, or a string equivalent: `mixed`, `soft`, `hard`, `merge`, `keep`). Any number of other arguments + supported by [git reset](https://git-scm.com/docs/git-reset) can be supplied as an [options](#how-to-specify-options) object/array. + +- `.reset(resetOptions)` resets the repository with the supplied [options](#how-to-specify-options) + +- `.reset()` resets the repository in `soft` mode. + +## git rev-parse / repo properties + +- `.revparse([options])` sends the supplied [options](#how-to-specify-options) to [git rev-parse](https://git-scm.com/docs/git-rev-parse) and returns the string response from `git`. + +- `.checkIsRepo()` gets whether the current working directory is a descendent of a git repository. +- `.checkIsRepo('bare')` gets whether the current working directory is within a bare git repo (see either [git clone --bare](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---bare) or [git init --bare](https://git-scm.com/docs/git-init#Documentation/git-init.txt---bare)). +- `.checkIsRepo('root')` gets whether the current working directory is the root directory for a repo (sub-directories will return false). + +## git status + +- `.status([options])` gets the status of the current repo, resulting in a [StatusResult](typings/response.d.ts). Additional arguments + supported by [git status](https://git-scm.com/docs/git-status) can be supplied as an [options](#how-to-specify-options) object/array. + +## git submodule + +- `.subModule(options)` Run a `git submodule` command with on or more arguments passed in as an [options](#how-to-specify-options) array or object +- `.submoduleAdd(repo, path)` Adds a new sub module +- `.submoduleInit([options]` Initialises sub modules, the optional [options](#how-to-specify-options) argument can be used to pass extra options to the `git submodule init` command. +- `.submoduleUpdate(subModuleName, [options])` Updates sub modules, can be called with a sub module name and [options](#how-to-specify-options), just the options or with no arguments + +# How to Specify Options + +Where the task accepts custom options (eg: `pull` or `commit`), these can be supplied as an object, the keys of which +will all be merged as trailing arguments in the command string, or as a simple array of strings. + +## Options as an Object + +When the value of the property in the options object is a `string`, that name value +pair will be included in the command string as `name=value`. For example: + +```js +// results in 'git pull origin master --no-rebase' +git().pull('origin', 'master', {'--no-rebase': null}) + +// results in 'git pull origin master --rebase=true' +git().pull('origin', 'master', {'--rebase': 'true'}) +``` + +## Options as an Array + +Options can also be supplied as an array of strings to be merged into the task's commands +in the same way as when an object is used: + +```javascript +// +git.pull('origin', 'master', ['--no-rebase']) +``` + +# Release History + +Major release 2.x changes the way the queue of tasks are handled to use promises internally and makes +available the `.then` and `.catch` methods for integrating with promise consumers or async await. + +TypeScript is used by default for all new code, allowing for auto-generated type definitions and a phased +re-write of the library rather than a big-bang. + +For a per-release overview of changes, see the [changelog](./CHANGELOG.md). + +## 2.x Upgrade Notes + +When upgrading to release 2.x from 1.x, see the [changelog](./CHANGELOG.md) for the release 2.0.0 + +# Recently Deprecated / Altered APIs + +- ~~2.25.0 depends on Node.js version 12 or above, for use in lower versions of node.js ensure you are also + importing the necessary polyfills from `core-js`, see [Legacy Node Versions](./docs/LEGACY_NODE_VERSIONS.md)~~ + _this change has been reverted in 2.30.0 and will be postponed until version 3.x_. + +- 2.13.0 `.push` now returns a [PushResult](./typings/response.d.ts) parsed representation of the response. + +- 2.11.0 treats tasks chained together as atomic, where any failure in the chain prevents later tasks from + executing and tasks called from the root `git` instance as the origin of a new chain, and able to be + [run in parallel](#concurrent--parallel-requests) without failures impacting one anther. Prior to this + version, tasks called on the root `git` instance would be cancelled when another one failed. + +- 2.7.0 deprecates use of `.silent()` in favour of using the `debug` library - see [Enable Logging](#enable-logging) + for further details. + +- 2.6.0 introduced `.then` and `.catch` as a way to chain a promise onto the current step of the chain. +Importing from `simple-git/promise` instead of just `simple-git` is no longer required and is actively discouraged. + +For the full history see the [changelog](./CHANGELOG.md); + +# Concurrent / Parallel Requests + +When the methods of `simple-git` are chained together, they create an execution chain that will run in series, +useful for when the tasks themselves are order-dependent, eg: + +```typescript +const git = simpleGit(); +git.init().addRemote('origin', 'https://some-repo.git').fetch(); +``` + +Each task requires that the one before it has been run successfully before it is called, any errors in a +step of the chain should prevent later steps from being attempted. + +When the methods of `simple-git` are called on the root instance (ie: `git = simpleGit()`) rather than chained +off another task, it starts a new chain and will not be affected failures in tasks already being run. Useful +for when the tasks are independent of each other, eg: + +```typescript +const git = simpleGit(); +const results = await Promise.all([ + git.raw('rev-parse', '--show-cdup').catch(swallow), + git.raw('rev-parse', '--show-prefix').catch(swallow), +]); +function swallow (err) { return null } +``` + +Each `simple-git` instance limits the number of spawned child processes that can be run simultaneously and +manages the queue of pending tasks for you. Configure this value by passing an options object to the +`simpleGit` function, eg: + +```typescript +const git = simpleGit({ maxConcurrentProcesses: 10 }); +``` + +Treating tasks called on the root instance as the start of separate chains is a change to the behaviour of + `simple-git` and was added in version `2.11.0`. + +# Complex Requests + +When no suitable wrapper exists in the interface for creating a request, it is possible to run a command directly +using `git.raw([...], handler)`. The array of commands are passed directly to the `git` binary: + +```js +const git = require('simple-git'); +const path = '/path/to/repo'; +const commands = [ 'config', '--global', 'advice.pushNonFastForward', 'false' ]; + +// using an array of commands +git(path).raw(commands, (err, result) => { + + // err is null unless this command failed + // result is the raw output of this command + +}); + +// using a var-args of strings and awaiting rather than using the callback +const result = await git(path).raw(...commands); +``` + +# Authentication + +The easiest way to supply a username / password to the remote host is to include it in the URL, for example: + +```js +const USER = 'something'; +const PASS = 'somewhere'; +const REPO = 'github.com/username/private-repo'; + +const git = require('simple-git'); +const remote = `https://${USER}:${PASS}@${REPO}`; + +git().silent(true) + .clone(remote) + .then(() => console.log('finished')) + .catch((err) => console.error('failed: ', err)); + +``` + +Be sure to enable silent mode to prevent fatal errors from being logged to stdout. + +# Environment Variables + +Pass one or more environment variables to the child processes spawned by `simple-git` with the `.env` method which +supports passing either an object of name=value pairs or setting a single variable at a time: + +```js +const GIT_SSH_COMMAND = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"; + +const git = require('simple-git'); + +git() + .env('GIT_SSH_COMMAND', GIT_SSH_COMMAND) + .status((err, status) => { /* */ }) + +git().env({ ...process.env, GIT_SSH_COMMAND }) + .status() + .then(status => { }) + .catch(err => {}); + +``` + +Note - when passing environment variables into the child process, these will replace the standard `process.env` +variables, the example above creates a new object based on `process.env` but with the `GIT_SSH_COMMAND` property +added. + +# TypeScript + +To import with TypeScript: + +```typescript +import simpleGit, { SimpleGit, StatusResult } from 'simple-git'; + +const git: SimpleGit = simpleGit(); +const status: StatusResult = await git.status(); +``` + +# Promise and async compatible + +For each task run, the return is the same `SimpleGit` instance for ease of building +a series of tasks that all run sequentially and are treated as atomic (ie: if any +step fails, the later tasks are not attempted). + +To work with promises (either directly or as part of async/await), simply call the +function as before: + +```js +const simpleGit = require('simple-git'); +const git = simpleGit(); + +// async / await +const status = await git.status(); + +// promise +git.status().then(result => {...}); +``` + +# Exception Handling + +When the `git` process exits with a non-zero status (or in some cases like `merge` the git +process exits with a successful zero code but there are conflicts in the merge) the task +will reject with a `GitError` when there is no available parser to handle the error or a +`GitResponseError` for when there is. + +See the `err` property of the callback: + +```javascript +git.merge((err, mergeSummary) => { + if (err.git) { + mergeSummary = err.git; // the failed mergeSummary + } +}) +``` + +Catch errors with try/catch in async code: + +```javascript +try { + const mergeSummary = await git.merge(); + console.log(`Merged ${ mergeSummary.merges.length } files`); +} +catch (err) { + // err.message - the string summary of the error + // err.stack - some stack trace detail + // err.git - where a parser was able to run, this is the parsed content + + console.error(`Merge resulted in ${ err.git.conflicts.length } conflicts`); +} +``` + +Catch errors with a `.catch` on the promise: + +```javascript +const mergeSummary = await git.merge() + .catch(err => { + if (err.git) { return err.git; } // the unsuccessful mergeSummary + throw err; // some other error, so throw + }); + +if (mergeSummary.failed) { + console.error(`Merge resulted in ${ mergeSummary.conflicts.length } conflicts`); +} +``` + +With typed errors available in TypeScript + +```typescript +import simpleGit, { MergeSummary, GitResponseError } from 'simple-git'; +try { + const mergeSummary = await simpleGit().merge(); + console.log(`Merged ${ mergeSummary.merges.length } files`); +} +catch (err) { + // err.message - the string summary of the error + // err.stack - some stack trace detail + // err.git - where a parser was able to run, this is the parsed content + const mergeSummary: MergeSummary = (err as GitResponseError).git; + const conflicts = mergeSummary?.conflicts || []; + + console.error(`Merge resulted in ${ conflicts.length } conflicts`); +} +``` + +# Troubleshooting / FAQ + +### Enable logging + +This library uses [debug](https://www.npmjs.com/package/debug) to handle logging, +to enable logging, use either the environment variable: + +``` +"DEBUG=simple-git" node ./your-app.js +``` + +Or explicitly enable logging using the `debug` library itself: + +```javascript +require('debug').enable('simple-git'); +``` + +### Enable Verbose Logging + +If the regular logs aren't sufficient to find the source of your issue, enable one or more of the +following for a more complete look at what the library is doing: + +- `DEBUG=simple-git:task:*` adds debug output for each task being run through the library +- `DEBUG=simple-git:task:add:*` adds debug output for specific git commands, just replace the `add` with + the command you need to investigate. To output multiple just add them both to the environment + variable eg: `DEBUG=simple-git:task:add:*,simple-git:task:commit:*` +- `DEBUG=simple-git:output:*` logs the raw data received from the git process on both `stdOut` and `stdErr` +- `DEBUG=simple-git,simple-git:*` logs _everything_ + +### Every command returns ENOENT error message + +There are a few potential reasons: + +- `git` isn't available as a binary for the user running the main `node` process, custom paths to the binary can be used + with the `.customBinary(...)` api option. + +- the working directory passed in to the main `simple-git` function isn't accessible, check it is read/write accessible + by the user running the `node` process. This library uses + [@kwsites/file-exists](https://www.npmjs.com/package/@kwsites/file-exists) to validate the working directory exists, + to output its logs add `@kwsites/file-exists` to your `DEBUG` environment variable. eg: + + `DEBUG=@kwsites/file-exists,simple-git node ./your-app.js` + +### Log response properties are out of order + +The properties of `git.log` are fetched using the character sequence ` ò ` as a delimiter. If your commit messages +use this sequence, supply a custom `splitter` in the options, for example: `git.log({ splitter: '💻' })` + +### Pull / Diff / Merge summary responses don't recognise any files + +- Enable verbose logs with the environment variable `DEBUG=simple-git:task:*,simple-git:output:*` +- Check the output (for example: `simple-git:output:diff:1 [stdOut] 1 file changed, 1 insertion(+)`) +- Check the `stdOut` output is the same as you would expect to see when running the command directly in terminal +- Check the language used in the response is english locale + +In some cases `git` will show progress messages or additional detail on error states in the output for +`stdErr` that will help debug your issue, these messages are also included in the verbose log. + +### Legacy Node Versions + +From `v3.x`, `simple-git` will drop support for `node.js` version 10 or below, to use in a lower version of +node will result in errors such as: + +- `Object.fromEntries is not a function` +- `Object.entries is not a function` +- `message.flatMap is not a function` + +To resolve these issues, either upgrade to a newer version of node.js or ensure you are using the necessary +polyfills from `core-js` - see [Legacy Node Versions](./docs/LEGACY_NODE_VERSIONS.md). + +# Examples + + +### using a pathspec to limit the scope of the task + +If the `simple-git` api doesn't explicitly limit the scope of the task being run (ie: `git.add()` requires the files to +be added, but `git.status()` will run against the entire repo), add a `pathspec` to the command using trailing options: + +```typescript +const git = simpleGit(); +const wholeRepoStatus = await git.status(); +const subDirStatusUsingOptArray = await git.status(['--', 'sub-dir']); +const subDirStatusUsingOptObject = await git.status({'--': null, 'sub-dir': null}); +``` + +### async await + +```javascript +async function status (workingDir) { + const git = require('simple-git'); + + let statusSummary = null; + try { + statusSummary = await git(workingDir).status(); + } + catch (e) { + // handle the error + } + + return statusSummary; +} + +// using the async function +status(__dirname + '/some-repo').then(status => console.log(status)); +``` + +### Initialise a git repo if necessary + +```javascript +const simpleGit = require('simple-git'); +const git = simpleGit(__dirname); + +git.checkIsRepo() + .then(isRepo => !isRepo && initialiseRepo(git)) + .then(() => git.fetch()); + +function initialiseRepo (git) { + return git.init() + .then(() => git.addRemote('origin', 'https://some.git.repo')) +} +``` + +### Update repo and get a list of tags + +```javascript +require('simple-git')(__dirname + '/some-repo') + .pull() + .tags((err, tags) => console.log("Latest available tag: %s", tags.latest)); + +// update repo and when there are changes, restart the app +require('simple-git')() + .pull((err, update) => { + if(update && update.summary.changes) { + require('child_process').exec('npm restart'); + } + }); +``` + +### Starting a new repo + +```javascript +require('simple-git')() + .init() + .add('./*') + .commit("first commit!") + .addRemote('origin', 'https://github.com/user/repo.git') + .push('origin', 'master'); +``` + +### push with `-u` + +```js +require('simple-git')() + .add('./*') + .commit("first commit!") + .addRemote('origin', 'some-repo-url') + .push(['-u', 'origin', 'master'], () => console.log('done')); +``` + +### Piping to the console for long running tasks + +```js +require('simple-git')() + .outputHandler((command, stdout, stderr) => { + stdout.pipe(process.stdout); + stderr.pipe(process.stderr); + }) + .checkout('https://github.com/user/repo.git'); +``` + +### Update repo and print messages when there are changes, restart the app + +```javascript +require('simple-git')() + .exec(() => console.log('Starting pull...')) + .pull((err, update) => { + if(update && update.summary.changes) { + require('child_process').exec('npm restart'); + } + }) + .exec(() => console.log('pull done.')); +``` + +### Get a full commits list, and then only between 0.11.0 and 0.12.0 tags + +```javascript +require('simple-git')() + .log((err, log) => console.log(log)) + .log('0.11.0', '0.12.0', (err, log) => console.log(log)); +``` + +### Set the local configuration for author, then author for an individual commit + +```javascript +require('simple-git')() + .addConfig('user.name', 'Some One') + .addConfig('user.email', 'some@one.com') + .commit('committed as "Some One"', 'file-one') + .commit('committed as "Another Person"', 'file-two', { '--author': '"Another Person "' }); +``` + +### Get remote repositories + +```javascript +require('simple-git')() + .listRemote(['--get-url'], (err, data) => { + if (!err) { + console.log('Remote url for repository at ' + __dirname + ':'); + console.log(data); + } + }); +``` diff --git a/Client/node_modules/simple-git/src/git-factory.js b/Client/node_modules/simple-git/src/git-factory.js new file mode 100644 index 000000000..e73c93146 --- /dev/null +++ b/Client/node_modules/simple-git/src/git-factory.js @@ -0,0 +1,46 @@ +const Git = require('./git'); +const {GitConstructError} = require('./lib/api'); +const {createInstanceConfig, folderExists} = require('./lib/utils'); + +const api = Object.create(null); +for (let imported = require('./lib/api'), keys = Object.keys(imported), i = 0; i < keys.length; i++) { + const name = keys[i]; + if (/^[A-Z]/.test(name)) { + api[name] = imported[name]; + } +} + +/** + * Adds the necessary properties to the supplied object to enable it for use as + * the default export of a module. + * + * Eg: `module.exports = esModuleFactory({ something () {} })` + */ +module.exports.esModuleFactory = function esModuleFactory (defaultExport) { + return Object.defineProperties(defaultExport, { + __esModule: {value: true}, + default: {value: defaultExport}, + }); +} + +module.exports.gitExportFactory = function gitExportFactory (factory, extra) { + return Object.assign(function () { + return factory.apply(null, arguments); + }, + api, + extra || {}, + ); +}; + +module.exports.gitInstanceFactory = function gitInstanceFactory (baseDir, options) { + const config = createInstanceConfig( + baseDir && (typeof baseDir === 'string' ? {baseDir} : baseDir), + options + ); + + if (!folderExists(config.baseDir)) { + throw new GitConstructError(config, `Cannot use simple-git on a directory that does not exist`); + } + + return new Git(config); +}; diff --git a/Client/node_modules/simple-git/src/git.js b/Client/node_modules/simple-git/src/git.js new file mode 100644 index 000000000..85419f0e8 --- /dev/null +++ b/Client/node_modules/simple-git/src/git.js @@ -0,0 +1,985 @@ +const {GitExecutor} = require('./lib/runners/git-executor'); + +const {Scheduler} = require('./lib/runners/scheduler'); +const {GitLogger} = require('./lib/git-logger'); +const {adhocExecTask, configurationErrorTask} = require('./lib/tasks/task'); +const {NOOP, appendTaskOptions, asArray, filterArray, filterPrimitives, filterString, filterStringOrStringArray, filterType, folderExists, getTrailingOptions, trailingFunctionArgument, trailingOptionsArgument} = require('./lib/utils'); +const {applyPatchTask} = require('./lib/tasks/apply-patch') +const {branchTask, branchLocalTask, deleteBranchesTask, deleteBranchTask} = require('./lib/tasks/branch'); +const {taskCallback} = require('./lib/task-callback'); +const {checkIsRepoTask} = require('./lib/tasks/check-is-repo'); +const {cloneTask, cloneMirrorTask} = require('./lib/tasks/clone'); +const {addConfigTask, listConfigTask} = require('./lib/tasks/config'); +const {cleanWithOptionsTask, isCleanOptionsArray} = require('./lib/tasks/clean'); +const {commitTask} = require('./lib/tasks/commit'); +const {diffSummaryTask} = require('./lib/tasks/diff'); +const {fetchTask} = require('./lib/tasks/fetch'); +const {hashObjectTask} = require('./lib/tasks/hash-object'); +const {initTask} = require('./lib/tasks/init'); +const {logTask, parseLogOptions} = require('./lib/tasks/log'); +const {mergeTask} = require('./lib/tasks/merge'); +const {moveTask} = require("./lib/tasks/move"); +const {pullTask} = require('./lib/tasks/pull'); +const {pushTagsTask, pushTask} = require('./lib/tasks/push'); +const {addRemoteTask, getRemotesTask, listRemotesTask, remoteTask, removeRemoteTask} = require('./lib/tasks/remote'); +const {getResetMode, resetTask} = require('./lib/tasks/reset'); +const {stashListTask} = require('./lib/tasks/stash-list'); +const {statusTask} = require('./lib/tasks/status'); +const {addSubModuleTask, initSubModuleTask, subModuleTask, updateSubModuleTask} = require('./lib/tasks/sub-module'); +const {addAnnotatedTagTask, addTagTask, tagListTask} = require('./lib/tasks/tag'); +const {straightThroughStringTask} = require('./lib/tasks/task'); +const {parseCheckIgnore} = require('./lib/responses/CheckIgnore'); + +const ChainedExecutor = Symbol('ChainedExecutor'); + +/** + * Git handling for node. All public functions can be chained and all `then` handlers are optional. + * + * @param {SimpleGitOptions} options Configuration settings for this instance + * + * @constructor + */ +function Git (options) { + this._executor = new GitExecutor( + options.binary, options.baseDir, + new Scheduler(options.maxConcurrentProcesses) + ); + this._logger = new GitLogger(); +} + +/** + * The executor that runs each of the added commands + * @type {GitExecutor} + * @private + */ +Git.prototype._executor = null; + +/** + * Logging utility for printing out info or error messages to the user + * @type {GitLogger} + * @private + */ +Git.prototype._logger = null; + +/** + * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on + * the system path, or a fully qualified path to the executable. + * + * @param {string} command + * @returns {Git} + */ +Git.prototype.customBinary = function (command) { + this._executor.binary = command; + return this; +}; + +/** + * Sets an environment variable for the spawned child process, either supply both a name and value as strings or + * a single object to entirely replace the current environment variables. + * + * @param {string|Object} name + * @param {string} [value] + * @returns {Git} + */ +Git.prototype.env = function (name, value) { + if (arguments.length === 1 && typeof name === 'object') { + this._executor.env = name; + } else { + (this._executor.env = this._executor.env || {})[name] = value; + } + + return this; +}; + +/** + * Sets the working directory of the subsequent commands. + */ +Git.prototype.cwd = function (workingDirectory) { + const task = (typeof workingDirectory !== 'string') + ? configurationErrorTask('Git.cwd: workingDirectory must be supplied as a string') + : adhocExecTask(() => { + if (!folderExists(workingDirectory)) { + throw new Error(`Git.cwd: cannot change to non-directory "${ workingDirectory }"`); + } + + return (this._executor.cwd = workingDirectory); + }); + + return this._runTask(task, trailingFunctionArgument(arguments) || NOOP); +}; + +/** + * Sets a handler function to be called whenever a new child process is created, the handler function will be called + * with the name of the command being run and the stdout & stderr streams used by the ChildProcess. + * + * @example + * require('simple-git') + * .outputHandler(function (command, stdout, stderr) { + * stdout.pipe(process.stdout); + * }) + * .checkout('https://github.com/user/repo.git'); + * + * @see https://nodejs.org/api/child_process.html#child_process_class_childprocess + * @see https://nodejs.org/api/stream.html#stream_class_stream_readable + * @param {Function} outputHandler + * @returns {Git} + */ +Git.prototype.outputHandler = function (outputHandler) { + this._executor.outputHandler = outputHandler; + return this; +}; + +/** + * Initialize a git repo + * + * @param {Boolean} [bare=false] + * @param {Function} [then] + */ +Git.prototype.init = function (bare, then) { + return this._runTask( + initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Check the status of the local repo + */ +Git.prototype.status = function () { + return this._runTask( + statusTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * List the stash(s) of the local repo + */ +Git.prototype.stashList = function (options) { + return this._runTask( + stashListTask( + trailingOptionsArgument(arguments) || {}, + filterArray(options) && options || [] + ), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Stash the local repo + * + * @param {Object|Array} [options] + * @param {Function} [then] + */ +Git.prototype.stash = function (options, then) { + return this._runTask( + straightThroughStringTask(['stash', ...getTrailingOptions(arguments)]), + trailingFunctionArgument(arguments), + ); +}; + +function createCloneTask (api, task, repoPath, localPath) { + if (typeof repoPath !== 'string') { + return configurationErrorTask(`git.${ api }() requires a string 'repoPath'`); + } + + return task(repoPath, filterType(localPath, filterString), getTrailingOptions(arguments)); +} + + +/** + * Clone a git repo + */ +Git.prototype.clone = function () { + return this._runTask( + createCloneTask('clone', cloneTask, ...arguments), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Mirror a git repo + */ +Git.prototype.mirror = function () { + return this._runTask( + createCloneTask('mirror', cloneMirrorTask, ...arguments), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Moves one or more files to a new destination. + * + * @see https://git-scm.com/docs/git-mv + * + * @param {string|string[]} from + * @param {string} to + */ +Git.prototype.mv = function (from, to) { + return this._runTask(moveTask(from, to), trailingFunctionArgument(arguments)); +}; + +/** + * Internally uses pull and tags to get the list of tags then checks out the latest tag. + * + * @param {Function} [then] + */ +Git.prototype.checkoutLatestTag = function (then) { + var git = this; + return this.pull(function () { + git.tags(function (err, tags) { + git.checkout(tags.latest, then); + }); + }); +}; + +/** + * Adds one or more files to source control + */ +Git.prototype.add = function (files) { + return this._run( + ['add'].concat(files), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Commits changes in the current working directory - when specific file paths are supplied, only changes on those + * files will be committed. + * + * @param {string|string[]} message + * @param {string|string[]} [files] + * @param {Object} [options] + * @param {Function} [then] + */ +Git.prototype.commit = function (message, files, options, then) { + const next = trailingFunctionArgument(arguments); + const messages = []; + + if (filterStringOrStringArray(message)) { + messages.push(...asArray(message)); + } + else { + console.warn('simple-git deprecation notice: git.commit: requires the commit message to be supplied as a string/string[], this will be an error in version 3'); + } + + return this._runTask( + commitTask( + messages, + asArray(filterType(files, filterStringOrStringArray, [])), + [...filterType(options, filterArray, []), ...getTrailingOptions(arguments, 0, true)] + ), + next + ); +}; + +/** + * Pull the updated contents of the current repo + */ +Git.prototype.pull = function (remote, branch, options, then) { + return this._runTask( + pullTask(filterType(remote, filterString), filterType(branch, filterString), getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Fetch the updated contents of the current repo. + * + * @example + * .fetch('upstream', 'master') // fetches from master on remote named upstream + * .fetch(function () {}) // runs fetch against default remote and branch and calls function + * + * @param {string} [remote] + * @param {string} [branch] + */ +Git.prototype.fetch = function (remote, branch) { + return this._runTask( + fetchTask(filterType(remote, filterString), filterType(branch, filterString), getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in + * a production environment. + * + * @param {boolean} silence + * @returns {Git} + */ +Git.prototype.silent = function (silence) { + this._logger.silent(!!silence); + return this; +}; + +/** + * List all tags. When using git 2.7.0 or above, include an options object with `"--sort": "property-name"` to + * sort the tags by that property instead of using the default semantic versioning sort. + * + * Note, supplying this option when it is not supported by your Git version will cause the operation to fail. + * + * @param {Object} [options] + * @param {Function} [then] + */ +Git.prototype.tags = function (options, then) { + return this._runTask( + tagListTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Rebases the current working copy. Options can be supplied either as an array of string parameters + * to be sent to the `git rebase` command, or a standard options object. + */ +Git.prototype.rebase = function () { + return this._run( + ['rebase'].concat(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments) + ); +}; + +/** + * Reset a repo + * + * @param {string|string[]} [mode=soft] Either an array of arguments supported by the 'git reset' command, or the + * string value 'soft' or 'hard' to set the reset mode. + * @param {Function} [then] + */ +Git.prototype.reset = function (mode, then) { + return this._runTask( + resetTask(getResetMode(mode), getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Revert one or more commits in the local working copy + */ +Git.prototype.revert = function (commit) { + const next = trailingFunctionArgument(arguments); + + if (typeof commit !== 'string') { + return this._runTask( + configurationErrorTask('Commit must be a string'), + next, + ); + } + + return this._run([ + 'revert', + ...getTrailingOptions(arguments, 0, true), + commit + ], next); +}; + +/** + * Add a lightweight tag to the head of the current branch + * + * @param {string} name + * @param {Function} [then] + */ +Git.prototype.addTag = function (name, then) { + const task = (typeof name === 'string') + ? addTagTask(name) + : configurationErrorTask('Git.addTag requires a tag name'); + + return this._runTask(task, trailingFunctionArgument(arguments)); +}; + +/** + * Add an annotated tag to the head of the current branch + * + * @param {string} tagName + * @param {string} tagMessage + * @param {Function} [then] + */ +Git.prototype.addAnnotatedTag = function (tagName, tagMessage, then) { + return this._runTask( + addAnnotatedTagTask(tagName, tagMessage), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Check out a tag or revision, any number of additional arguments can be passed to the `git checkout` command + * by supplying either a string or array of strings as the `what` parameter. + * + * @param {string|string[]} what One or more commands to pass to `git checkout` + * @param {Function} [then] + */ +Git.prototype.checkout = function (what, then) { + const commands = ['checkout', ...getTrailingOptions(arguments, true)]; + return this._runTask( + straightThroughStringTask(commands), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Check out a remote branch + * + * @param {string} branchName name of branch + * @param {string} startPoint (e.g origin/development) + * @param {Function} [then] + */ +Git.prototype.checkoutBranch = function (branchName, startPoint, then) { + return this.checkout(['-b', branchName, startPoint], trailingFunctionArgument(arguments)); +}; + +/** + * Check out a local branch + */ +Git.prototype.checkoutLocalBranch = function (branchName, then) { + return this.checkout(['-b', branchName], trailingFunctionArgument(arguments)); +}; + +/** + * Delete a local branch + */ +Git.prototype.deleteLocalBranch = function (branchName, forceDelete, then) { + return this._runTask( + deleteBranchTask(branchName, typeof forceDelete === "boolean" ? forceDelete : false), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Delete one or more local branches + */ +Git.prototype.deleteLocalBranches = function (branchNames, forceDelete, then) { + return this._runTask( + deleteBranchesTask(branchNames, typeof forceDelete === "boolean" ? forceDelete : false), + trailingFunctionArgument(arguments), + ); +}; + +/** + * List all branches + * + * @param {Object | string[]} [options] + * @param {Function} [then] + */ +Git.prototype.branch = function (options, then) { + return this._runTask( + branchTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Return list of local branches + * + * @param {Function} [then] + */ +Git.prototype.branchLocal = function (then) { + return this._runTask( + branchLocalTask(), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Add config to local git instance + * + * @param {string} key configuration key (e.g user.name) + * @param {string} value for the given key (e.g your name) + * @param {boolean} [append=false] optionally append the key/value pair (equivalent of passing `--add` option). + * @param {Function} [then] + */ +Git.prototype.addConfig = function (key, value, append, then) { + return this._runTask( + addConfigTask(key, value, typeof append === "boolean" ? append : false), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.listConfig = function () { + return this._runTask(listConfigTask(), trailingFunctionArgument(arguments)); +}; + +/** + * Executes any command against the git binary. + */ +Git.prototype.raw = function (commands) { + const createRestCommands = !Array.isArray(commands); + const command = [].slice.call(createRestCommands ? arguments : commands, 0); + + for (let i = 0; i < command.length && createRestCommands; i++) { + if (!filterPrimitives(command[i])) { + command.splice(i, command.length - i); + break; + } + } + + command.push( + ...getTrailingOptions(arguments, 0, true), + ); + + var next = trailingFunctionArgument(arguments); + + if (!command.length) { + return this._runTask( + configurationErrorTask('Raw: must supply one or more command to execute'), + next, + ); + } + + return this._run(command, next); +}; + +Git.prototype.submoduleAdd = function (repo, path, then) { + return this._runTask( + addSubModuleTask(repo, path), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.submoduleUpdate = function (args, then) { + return this._runTask( + updateSubModuleTask(getTrailingOptions(arguments, true)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.submoduleInit = function (args, then) { + return this._runTask( + initSubModuleTask(getTrailingOptions(arguments, true)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.subModule = function (options, then) { + return this._runTask( + subModuleTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.listRemote = function () { + return this._runTask( + listRemotesTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Adds a remote to the list of remotes. + */ +Git.prototype.addRemote = function (remoteName, remoteRepo, then) { + return this._runTask( + addRemoteTask(remoteName, remoteRepo, getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Removes an entry by name from the list of remotes. + */ +Git.prototype.removeRemote = function (remoteName, then) { + return this._runTask( + removeRemoteTask(remoteName), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Gets the currently available remotes, setting the optional verbose argument to true includes additional + * detail on the remotes themselves. + */ +Git.prototype.getRemotes = function (verbose, then) { + return this._runTask( + getRemotesTask(verbose === true), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Compute object ID from a file + */ +Git.prototype.hashObject = function (path, write) { + return this._runTask( + hashObjectTask(path, write === true), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Call any `git remote` function with arguments passed as an array of strings. + * + * @param {string[]} options + * @param {Function} [then] + */ +Git.prototype.remote = function (options, then) { + return this._runTask( + remoteTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Merges from one branch to another, equivalent to running `git merge ${from} $[to}`, the `options` argument can + * either be an array of additional parameters to pass to the command or null / omitted to be ignored. + * + * @param {string} from + * @param {string} to + */ +Git.prototype.mergeFromTo = function (from, to) { + if (!(filterString(from) && filterString(to))) { + return this._runTask(configurationErrorTask( + `Git.mergeFromTo requires that the 'from' and 'to' arguments are supplied as strings` + )); + } + + return this._runTask( + mergeTask([from, to, ...getTrailingOptions(arguments)]), + trailingFunctionArgument(arguments, false), + ); +}; + +/** + * Runs a merge, `options` can be either an array of arguments + * supported by the [`git merge`](https://git-scm.com/docs/git-merge) + * or an options object. + * + * Conflicts during the merge result in an error response, + * the response type whether it was an error or success will be a MergeSummary instance. + * When successful, the MergeSummary has all detail from a the PullSummary + * + * @param {Object | string[]} [options] + * @param {Function} [then] + * @returns {*} + * + * @see ./responses/MergeSummary.js + * @see ./responses/PullSummary.js + */ +Git.prototype.merge = function () { + return this._runTask( + mergeTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Call any `git tag` function with arguments passed as an array of strings. + * + * @param {string[]} options + * @param {Function} [then] + */ +Git.prototype.tag = function (options, then) { + const command = getTrailingOptions(arguments); + + if (command[0] !== 'tag') { + command.unshift('tag'); + } + + return this._run(command, trailingFunctionArgument(arguments)); +}; + +/** + * Updates repository server info + * + * @param {Function} [then] + */ +Git.prototype.updateServerInfo = function (then) { + return this._run(["update-server-info"], trailingFunctionArgument(arguments)); +}; + +/** + * Pushes the current committed changes to a remote, optionally specify the names of the remote and branch to use + * when pushing. Supply multiple options as an array of strings in the first argument - see examples below. + */ +Git.prototype.push = function (remote, branch, then) { + const task = pushTask( + {remote: filterType(remote, filterString), branch: filterType(branch, filterString)}, + getTrailingOptions(arguments), + ); + return this._runTask(task, trailingFunctionArgument(arguments)); +}; + +/** + * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the + * default configured remote spec. + * + * @param {string} [remote] + * @param {Function} [then] + */ +Git.prototype.pushTags = function (remote, then) { + const task = pushTagsTask({remote: filterType(remote, filterString)}, getTrailingOptions(arguments)); + + return this._runTask(task, trailingFunctionArgument(arguments)); +}; + +/** + * Removes the named files from source control. + * + * @param {string|string[]} files + * @param {Function} [then] + */ +Git.prototype.rm = function (files, then) { + return this._rm(files, '-f', then); +}; + +/** + * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To + * completely remove the files, use `rm`. + * + * @param {string|string[]} files + * @param {Function} [then] + */ +Git.prototype.rmKeepLocal = function (files, then) { + return this._rm(files, '--cached', then); +}; + +/** + * Returns a list of objects in a tree based on commit hash. Passing in an object hash returns the object's content, + * size, and type. + * + * Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents. + * + * @param {string[]} [options] + * @param {Function} [then] + */ +Git.prototype.catFile = function (options, then) { + return this._catFile('utf-8', arguments); +}; + +/** + * Equivalent to `catFile` but will return the native `Buffer` of content from the git command's stdout. + * + * @param {string[]} options + * @param then + */ +Git.prototype.binaryCatFile = function (options, then) { + return this._catFile('buffer', arguments); +}; + +Git.prototype._catFile = function (format, args) { + var handler = trailingFunctionArgument(args); + var command = ['cat-file']; + var options = args[0]; + + if (typeof options === 'string') { + return this._runTask( + configurationErrorTask('Git#catFile: options must be supplied as an array of strings'), + handler, + ); + } + + if (Array.isArray(options)) { + command.push.apply(command, options); + } + + return this._run(command, handler, { + format: format + }); +}; + +Git.prototype.diff = function (options, then) { + const command = ['diff', ...getTrailingOptions(arguments)]; + + if (typeof options === 'string') { + command.splice(1, 0, options); + this._logger.warn('Git#diff: supplying options as a single string is now deprecated, switch to an array of strings'); + } + + return this._runTask( + straightThroughStringTask(command), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.diffSummary = function () { + return this._runTask( + diffSummaryTask(getTrailingOptions(arguments, 1)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype.applyPatch = function(patches) { + const task = !filterStringOrStringArray(patches) + ? configurationErrorTask(`git.applyPatch requires one or more string patches as the first argument`) + : applyPatchTask(asArray(patches), getTrailingOptions([].slice.call(arguments, 1))); + + return this._runTask( + task, + trailingFunctionArgument(arguments), + ); +} + +Git.prototype.revparse = function () { + const commands = ['rev-parse', ...getTrailingOptions(arguments, true)]; + return this._runTask( + straightThroughStringTask(commands, true), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Show various types of objects, for example the file at a certain commit + * + * @param {string[]} [options] + * @param {Function} [then] + */ +Git.prototype.show = function (options, then) { + return this._runTask( + straightThroughStringTask(['show', ...getTrailingOptions(arguments, 1)]), + trailingFunctionArgument(arguments) + ); +}; + +/** + */ +Git.prototype.clean = function (mode, options, then) { + const usingCleanOptionsArray = isCleanOptionsArray(mode); + const cleanMode = usingCleanOptionsArray && mode.join('') || filterType(mode, filterString) || ''; + const customArgs = getTrailingOptions([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0)); + + return this._runTask( + cleanWithOptionsTask(cleanMode, customArgs), + trailingFunctionArgument(arguments), + ); +}; + +/** + * Call a simple function at the next step in the chain. + * @param {Function} [then] + */ +Git.prototype.exec = function (then) { + const task = { + commands: [], + format: 'utf-8', + parser () { + if (typeof then === 'function') { + then(); + } + } + }; + + return this._runTask(task); +}; + +/** + * Show commit logs from `HEAD` to the first commit. + * If provided between `options.from` and `options.to` tags or branch. + * + * Additionally you can provide options.file, which is the path to a file in your repository. Then only this file will be considered. + * + * To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on. + * + * Options can also be supplied as a standard options object for adding custom properties supported by the git log command. + * For any other set of options, supply options as an array of strings to be appended to the git log command. + */ +Git.prototype.log = function (options) { + const next = trailingFunctionArgument(arguments); + + if (filterString(arguments[0]) && filterString(arguments[1])) { + return this._runTask( + configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`), + next + ); + } + + const parsedOptions = parseLogOptions( + trailingOptionsArgument(arguments) || {}, + filterArray(options) && options || [] + ); + + return this._runTask( + logTask(parsedOptions.splitter, parsedOptions.fields, parsedOptions.commands), + next, + ) +}; + +/** + * Clears the queue of pending commands and returns the wrapper instance for chaining. + * + * @returns {Git} + */ +Git.prototype.clearQueue = function () { + // TODO: + // this._executor.clear(); + return this; +}; + +/** + * Check if a pathname or pathnames are excluded by .gitignore + * + * @param {string|string[]} pathnames + * @param {Function} [then] + */ +Git.prototype.checkIgnore = function (pathnames, then) { + return this._run( + ["check-ignore", ...asArray((filterType(pathnames, filterStringOrStringArray, [])))], + trailingFunctionArgument(arguments), + { + parser: parseCheckIgnore + } + ) +}; + +Git.prototype.checkIsRepo = function (checkType, then) { + return this._runTask( + checkIsRepoTask(filterType(checkType, filterString)), + trailingFunctionArgument(arguments), + ); +}; + +Git.prototype._rm = function (_files, options, then) { + var files = [].concat(_files); + var args = ['rm', options]; + args.push.apply(args, files); + + return this._run(args, trailingFunctionArgument(arguments)); +}; + +/** + * Schedules the supplied command to be run, the command should not include the name of the git binary and should + * be an array of strings passed as the arguments to the git binary. + * + * @param {string[]} command + * @param {Function} then + * @param {Object} [opt] + * @param {boolean} [opt.concatStdErr=false] Optionally concatenate stderr output into the stdout + * @param {boolean} [opt.format="utf-8"] The format to use when reading the content of stdout + * @param {Function} [opt.onError] Optional error handler for this command - can be used to allow non-clean exits + * without killing the remaining stack of commands + * @param {Function} [opt.parser] Optional parser function + * @param {number} [opt.onError.exitCode] + * @param {string} [opt.onError.stdErr] + * + * @returns {Git} + */ +Git.prototype._run = function (command, then, opt) { + + const task = Object.assign({ + concatStdErr: false, + onError: undefined, + format: 'utf-8', + parser (data) { + return data; + } + }, opt || {}, { + commands: command, + }); + + return this._runTask(task, then); +}; + +Git.prototype._runTask = function (task, then) { + const executor = this[ChainedExecutor] || this._executor.chain(); + const promise = executor.push(task); + + taskCallback( + task, + promise, + then); + + return Object.create(this, { + then: {value: promise.then.bind(promise)}, + catch: {value: promise.catch.bind(promise)}, + [ChainedExecutor]: {value: executor}, + }); +}; + +module.exports = Git; diff --git a/Client/node_modules/simple-git/src/index.js b/Client/node_modules/simple-git/src/index.js new file mode 100644 index 000000000..2587f3571 --- /dev/null +++ b/Client/node_modules/simple-git/src/index.js @@ -0,0 +1,7 @@ + +const {gitP} = require('./lib/runners/promise-wrapped'); +const {esModuleFactory, gitInstanceFactory, gitExportFactory} = require('./git-factory'); + +module.exports = esModuleFactory( + gitExportFactory(gitInstanceFactory, {gitP}) +); diff --git a/Client/node_modules/simple-git/src/lib/api.d.ts b/Client/node_modules/simple-git/src/lib/api.d.ts new file mode 100644 index 000000000..5e96b7475 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/api.d.ts @@ -0,0 +1,7 @@ +export { CleanOptions } from './tasks/clean'; +export { CheckRepoActions } from './tasks/check-is-repo'; +export { ResetMode } from './tasks/reset'; +export { GitConstructError } from './errors/git-construct-error'; +export { GitError } from './errors/git-error'; +export { GitResponseError } from './errors/git-response-error'; +export { TaskConfigurationError } from './errors/task-configuration-error'; diff --git a/Client/node_modules/simple-git/src/lib/api.js b/Client/node_modules/simple-git/src/lib/api.js new file mode 100644 index 000000000..a5242d282 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/api.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TaskConfigurationError = exports.GitResponseError = exports.GitError = exports.GitConstructError = exports.ResetMode = exports.CheckRepoActions = exports.CleanOptions = void 0; +var clean_1 = require("./tasks/clean"); +Object.defineProperty(exports, "CleanOptions", { enumerable: true, get: function () { return clean_1.CleanOptions; } }); +var check_is_repo_1 = require("./tasks/check-is-repo"); +Object.defineProperty(exports, "CheckRepoActions", { enumerable: true, get: function () { return check_is_repo_1.CheckRepoActions; } }); +var reset_1 = require("./tasks/reset"); +Object.defineProperty(exports, "ResetMode", { enumerable: true, get: function () { return reset_1.ResetMode; } }); +var git_construct_error_1 = require("./errors/git-construct-error"); +Object.defineProperty(exports, "GitConstructError", { enumerable: true, get: function () { return git_construct_error_1.GitConstructError; } }); +var git_error_1 = require("./errors/git-error"); +Object.defineProperty(exports, "GitError", { enumerable: true, get: function () { return git_error_1.GitError; } }); +var git_response_error_1 = require("./errors/git-response-error"); +Object.defineProperty(exports, "GitResponseError", { enumerable: true, get: function () { return git_response_error_1.GitResponseError; } }); +var task_configuration_error_1 = require("./errors/task-configuration-error"); +Object.defineProperty(exports, "TaskConfigurationError", { enumerable: true, get: function () { return task_configuration_error_1.TaskConfigurationError; } }); +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/api.js.map b/Client/node_modules/simple-git/src/lib/api.js.map new file mode 100644 index 000000000..d693d808a --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["api.ts"],"names":[],"mappings":";;;AAAA,uCAA6C;AAApC,qGAAA,YAAY,OAAA;AACrB,uDAAyD;AAAhD,iHAAA,gBAAgB,OAAA;AACzB,uCAA0C;AAAjC,kGAAA,SAAS,OAAA;AAClB,oEAAiE;AAAxD,wHAAA,iBAAiB,OAAA;AAC1B,gDAA8C;AAArC,qGAAA,QAAQ,OAAA;AACjB,kEAA+D;AAAtD,sHAAA,gBAAgB,OAAA;AACzB,8EAA2E;AAAlE,kIAAA,sBAAsB,OAAA"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/errors/git-construct-error.d.ts b/Client/node_modules/simple-git/src/lib/errors/git-construct-error.d.ts new file mode 100644 index 000000000..6c6f0678b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-construct-error.d.ts @@ -0,0 +1,15 @@ +import { GitError } from './git-error'; +import { SimpleGitOptions } from '../types'; +/** + * The `GitConstructError` is thrown when an error occurs in the constructor + * of the `simple-git` instance itself. Most commonly as a result of using + * a `baseDir` option that points to a folder that either does not exist, + * or cannot be read by the user the node script is running as. + * + * Check the `.message` property for more detail including the properties + * passed to the constructor. + */ +export declare class GitConstructError extends GitError { + readonly config: SimpleGitOptions; + constructor(config: SimpleGitOptions, message: string); +} diff --git a/Client/node_modules/simple-git/src/lib/errors/git-construct-error.js b/Client/node_modules/simple-git/src/lib/errors/git-construct-error.js new file mode 100644 index 000000000..17859e3b0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-construct-error.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GitConstructError = void 0; +const git_error_1 = require("./git-error"); +/** + * The `GitConstructError` is thrown when an error occurs in the constructor + * of the `simple-git` instance itself. Most commonly as a result of using + * a `baseDir` option that points to a folder that either does not exist, + * or cannot be read by the user the node script is running as. + * + * Check the `.message` property for more detail including the properties + * passed to the constructor. + */ +class GitConstructError extends git_error_1.GitError { + constructor(config, message) { + super(undefined, message); + this.config = config; + } +} +exports.GitConstructError = GitConstructError; +//# sourceMappingURL=git-construct-error.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/errors/git-construct-error.js.map b/Client/node_modules/simple-git/src/lib/errors/git-construct-error.js.map new file mode 100644 index 000000000..660b8b051 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-construct-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"git-construct-error.js","sourceRoot":"","sources":["git-construct-error.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AAGvC;;;;;;;;GAQG;AACH,MAAa,iBAAkB,SAAQ,oBAAQ;IAE5C,YACmB,MAAwB,EACxC,OAAe;QAEf,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAHV,WAAM,GAAN,MAAM,CAAkB;IAI3C,CAAC;CAEH;AATD,8CASC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/errors/git-error.d.ts b/Client/node_modules/simple-git/src/lib/errors/git-error.d.ts new file mode 100644 index 000000000..96abb7efc --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-error.d.ts @@ -0,0 +1,29 @@ +/** + * The `GitError` is thrown when the underlying `git` process throws a + * fatal exception (eg an `ENOENT` exception when attempting to use a + * non-writable directory as the root for your repo), and acts as the + * base class for more specific errors thrown by the parsing of the + * git response or errors in the configuration of the task about to + * be run. + * + * When an exception is thrown, pending tasks in the same instance will + * not be executed. The recommended way to run a series of tasks that + * can independently fail without needing to prevent future tasks from + * running is to catch them individually: + * + * ```typescript + import { gitP, SimpleGit, GitError, PullResult } from 'simple-git'; + + function catchTask (e: GitError) { + return e. + } + + const git = gitP(repoWorkingDir); + const pulled: PullResult | GitError = await git.pull().catch(catchTask); + const pushed: string | GitError = await git.pushTags().catch(catchTask); + ``` + */ +export declare class GitError extends Error { + task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined; + constructor(task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined, message?: string); +} diff --git a/Client/node_modules/simple-git/src/lib/errors/git-error.js b/Client/node_modules/simple-git/src/lib/errors/git-error.js new file mode 100644 index 000000000..04d42e171 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-error.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GitError = void 0; +/** + * The `GitError` is thrown when the underlying `git` process throws a + * fatal exception (eg an `ENOENT` exception when attempting to use a + * non-writable directory as the root for your repo), and acts as the + * base class for more specific errors thrown by the parsing of the + * git response or errors in the configuration of the task about to + * be run. + * + * When an exception is thrown, pending tasks in the same instance will + * not be executed. The recommended way to run a series of tasks that + * can independently fail without needing to prevent future tasks from + * running is to catch them individually: + * + * ```typescript + import { gitP, SimpleGit, GitError, PullResult } from 'simple-git'; + + function catchTask (e: GitError) { + return e. + } + + const git = gitP(repoWorkingDir); + const pulled: PullResult | GitError = await git.pull().catch(catchTask); + const pushed: string | GitError = await git.pushTags().catch(catchTask); + ``` + */ +class GitError extends Error { + constructor(task, message) { + super(message); + this.task = task; + Object.setPrototypeOf(this, new.target.prototype); + } +} +exports.GitError = GitError; +//# sourceMappingURL=git-error.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/errors/git-error.js.map b/Client/node_modules/simple-git/src/lib/errors/git-error.js.map new file mode 100644 index 000000000..95c4e97db --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"git-error.js","sourceRoot":"","sources":["git-error.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAa,QAAS,SAAQ,KAAK;IAEhC,YACU,IAAyB,EAChC,OAAgB;QAEhB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAqB;QAIhC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;CAEH;AAVD,4BAUC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/errors/git-response-error.d.ts b/Client/node_modules/simple-git/src/lib/errors/git-response-error.d.ts new file mode 100644 index 000000000..5d77bb09d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-response-error.d.ts @@ -0,0 +1,32 @@ +import { GitError } from './git-error'; +/** + * The `GitResponseError` is the wrapper for a parsed response that is treated as + * a fatal error, for example attempting a `merge` can leave the repo in a corrupted + * state when there are conflicts so the task will reject rather than resolve. + * + * For example, catching the merge conflict exception: + * + * ```typescript + import { gitP, SimpleGit, GitResponseError, MergeSummary } from 'simple-git'; + + const git = gitP(repoRoot); + const mergeOptions: string[] = ['--no-ff', 'other-branch']; + const mergeSummary: MergeSummary = await git.merge(mergeOptions) + .catch((e: GitResponseError) => e.git); + + if (mergeSummary.failed) { + // deal with the error + } + ``` + */ +export declare class GitResponseError extends GitError { + /** + * `.git` access the parsed response that is treated as being an error + */ + readonly git: T; + constructor( + /** + * `.git` access the parsed response that is treated as being an error + */ + git: T, message?: string); +} diff --git a/Client/node_modules/simple-git/src/lib/errors/git-response-error.js b/Client/node_modules/simple-git/src/lib/errors/git-response-error.js new file mode 100644 index 000000000..7c1af93ab --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-response-error.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GitResponseError = void 0; +const git_error_1 = require("./git-error"); +/** + * The `GitResponseError` is the wrapper for a parsed response that is treated as + * a fatal error, for example attempting a `merge` can leave the repo in a corrupted + * state when there are conflicts so the task will reject rather than resolve. + * + * For example, catching the merge conflict exception: + * + * ```typescript + import { gitP, SimpleGit, GitResponseError, MergeSummary } from 'simple-git'; + + const git = gitP(repoRoot); + const mergeOptions: string[] = ['--no-ff', 'other-branch']; + const mergeSummary: MergeSummary = await git.merge(mergeOptions) + .catch((e: GitResponseError) => e.git); + + if (mergeSummary.failed) { + // deal with the error + } + ``` + */ +class GitResponseError extends git_error_1.GitError { + constructor( + /** + * `.git` access the parsed response that is treated as being an error + */ + git, message) { + super(undefined, message || String(git)); + this.git = git; + } +} +exports.GitResponseError = GitResponseError; +//# sourceMappingURL=git-response-error.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/errors/git-response-error.js.map b/Client/node_modules/simple-git/src/lib/errors/git-response-error.js.map new file mode 100644 index 000000000..ba3d8e71a --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/git-response-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"git-response-error.js","sourceRoot":"","sources":["git-response-error.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AAEvC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,gBAA0B,SAAQ,oBAAQ;IAEpD;IACG;;OAEG;IACa,GAAM,EACtB,OAAgB;QAEhB,KAAK,CAAC,SAAS,EAAE,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAHzB,QAAG,GAAH,GAAG,CAAG;IAIzB,CAAC;CAEH;AAZD,4CAYC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.d.ts b/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.d.ts new file mode 100644 index 000000000..9f8a957d7 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.d.ts @@ -0,0 +1,12 @@ +import { GitError } from './git-error'; +/** + * The `TaskConfigurationError` is thrown when a command was incorrectly + * configured. An error of this kind means that no attempt was made to + * run your command through the underlying `git` binary. + * + * Check the `.message` property for more detail on why your configuration + * resulted in an error. + */ +export declare class TaskConfigurationError extends GitError { + constructor(message?: string); +} diff --git a/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.js b/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.js new file mode 100644 index 000000000..6351732c6 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TaskConfigurationError = void 0; +const git_error_1 = require("./git-error"); +/** + * The `TaskConfigurationError` is thrown when a command was incorrectly + * configured. An error of this kind means that no attempt was made to + * run your command through the underlying `git` binary. + * + * Check the `.message` property for more detail on why your configuration + * resulted in an error. + */ +class TaskConfigurationError extends git_error_1.GitError { + constructor(message) { + super(undefined, message); + } +} +exports.TaskConfigurationError = TaskConfigurationError; +//# sourceMappingURL=task-configuration-error.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.js.map b/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.js.map new file mode 100644 index 000000000..757a1d192 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/errors/task-configuration-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"task-configuration-error.js","sourceRoot":"","sources":["task-configuration-error.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AAEvC;;;;;;;GAOG;AACH,MAAa,sBAAuB,SAAQ,oBAAQ;IAEjD,YACG,OAAgB;QAEhB,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC;CAEH;AARD,wDAQC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/git-logger.d.ts b/Client/node_modules/simple-git/src/lib/git-logger.d.ts new file mode 100644 index 000000000..50a853594 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/git-logger.d.ts @@ -0,0 +1,29 @@ +import { Debugger } from 'debug'; +/** + * The shared debug logging instance + */ +export declare const log: Debugger; +declare type OutputLoggingHandler = (message: string, ...args: any[]) => void; +export interface OutputLogger extends OutputLoggingHandler { + readonly key: string; + readonly label: string; + debug: OutputLoggingHandler; + info: OutputLoggingHandler; + step(nextStep?: string): OutputLogger; + child(name: string): OutputLogger; + sibling(name: string): OutputLogger; + destroy(): void; +} +export declare function createLogger(label: string, verbose?: string | Debugger, initialStep?: string, infoDebugger?: Debugger): OutputLogger; +/** + * The `GitLogger` is used by the main `SimpleGit` runner to handle logging + * any warnings or errors. + */ +export declare class GitLogger { + private _out; + error: OutputLoggingHandler; + warn: OutputLoggingHandler; + constructor(_out?: Debugger); + silent(silence?: boolean): void; +} +export {}; diff --git a/Client/node_modules/simple-git/src/lib/git-logger.js b/Client/node_modules/simple-git/src/lib/git-logger.js new file mode 100644 index 000000000..84ea644ac --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/git-logger.js @@ -0,0 +1,113 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GitLogger = exports.createLogger = exports.log = void 0; +const debug_1 = require("debug"); +const utils_1 = require("./utils"); +debug_1.default.formatters.L = (value) => String(utils_1.filterHasLength(value) ? value.length : '-'); +debug_1.default.formatters.B = (value) => { + if (Buffer.isBuffer(value)) { + return value.toString('utf8'); + } + return utils_1.objectToString(value); +}; +/** + * The shared debug logging instance + */ +exports.log = debug_1.default('simple-git'); +function prefixedLogger(to, prefix, forward) { + if (!prefix || !String(prefix).replace(/\s*/, '')) { + return !forward ? to : (message, ...args) => { + to(message, ...args); + forward(message, ...args); + }; + } + return (message, ...args) => { + to(`%s ${message}`, prefix, ...args); + if (forward) { + forward(message, ...args); + } + }; +} +function childLoggerName(name, childDebugger, { namespace: parentNamespace }) { + if (typeof name === 'string') { + return name; + } + const childNamespace = childDebugger && childDebugger.namespace || ''; + if (childNamespace.startsWith(parentNamespace)) { + return childNamespace.substr(parentNamespace.length + 1); + } + return childNamespace || parentNamespace; +} +function createLogger(label, verbose, initialStep, infoDebugger = exports.log) { + const labelPrefix = label && `[${label}]` || ''; + const spawned = []; + const debugDebugger = (typeof verbose === 'string') ? infoDebugger.extend(verbose) : verbose; + const key = childLoggerName(utils_1.filterType(verbose, utils_1.filterString), debugDebugger, infoDebugger); + return step(initialStep); + function destroy() { + spawned.forEach(logger => logger.destroy()); + spawned.length = 0; + } + function child(name) { + return utils_1.append(spawned, createLogger(label, debugDebugger && debugDebugger.extend(name) || name)); + } + function sibling(name, initial) { + return utils_1.append(spawned, createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger)); + } + function step(phase) { + const stepPrefix = phase && `[${phase}]` || ''; + const debug = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || utils_1.NOOP; + const info = prefixedLogger(infoDebugger, `${labelPrefix} ${stepPrefix}`, debug); + return Object.assign(debugDebugger ? debug : info, { + key, + label, + child, + sibling, + debug, + info, + step, + destroy, + }); + } +} +exports.createLogger = createLogger; +/** + * The `GitLogger` is used by the main `SimpleGit` runner to handle logging + * any warnings or errors. + */ +class GitLogger { + constructor(_out = exports.log) { + this._out = _out; + this.error = prefixedLogger(_out, '[ERROR]'); + this.warn = prefixedLogger(_out, '[WARN]'); + } + silent(silence = false) { + if (silence !== this._out.enabled) { + return; + } + const { namespace } = this._out; + const env = (process.env.DEBUG || '').split(',').filter(s => !!s); + const hasOn = env.includes(namespace); + const hasOff = env.includes(`-${namespace}`); + // enabling the log + if (!silence) { + if (hasOff) { + utils_1.remove(env, `-${namespace}`); + } + else { + env.push(namespace); + } + } + else { + if (hasOn) { + utils_1.remove(env, namespace); + } + else { + env.push(`-${namespace}`); + } + } + debug_1.default.enable(env.join(',')); + } +} +exports.GitLogger = GitLogger; +//# sourceMappingURL=git-logger.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/git-logger.js.map b/Client/node_modules/simple-git/src/lib/git-logger.js.map new file mode 100644 index 000000000..c1633107f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/git-logger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"git-logger.js","sourceRoot":"","sources":["git-logger.ts"],"names":[],"mappings":";;;AAAA,iCAAwC;AACxC,mCAA0G;AAG1G,eAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,uBAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACzF,eAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,KAAa,EAAE,EAAE;IACpC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QACzB,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KAChC;IACD,OAAO,sBAAc,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAA;AAED;;GAEG;AACU,QAAA,GAAG,GAAG,eAAK,CAAC,YAAY,CAAC,CAAC;AAg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AC,IAAI,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;aAC5B;SACH;QAED,eAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,CAAC;CAEH;AA1CD,8BA0CC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.d.ts new file mode 100644 index 000000000..ee05b45d0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.d.ts @@ -0,0 +1,5 @@ +import { BranchMultiDeleteResult } from '../../../typings'; +import { TaskParser } from '../types'; +import { ExitCodes } from '../utils'; +export declare const parseBranchDeletions: TaskParser; +export declare function hasBranchDeletionError(data: string, processExitCode: ExitCodes): boolean; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js b/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js new file mode 100644 index 000000000..07c4bd400 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasBranchDeletionError = exports.parseBranchDeletions = void 0; +const BranchDeleteSummary_1 = require("../responses/BranchDeleteSummary"); +const utils_1 = require("../utils"); +const deleteSuccessRegex = /(\S+)\s+\(\S+\s([^)]+)\)/; +const deleteErrorRegex = /^error[^']+'([^']+)'/m; +const parsers = [ + new utils_1.LineParser(deleteSuccessRegex, (result, [branch, hash]) => { + const deletion = BranchDeleteSummary_1.branchDeletionSuccess(branch, hash); + result.all.push(deletion); + result.branches[branch] = deletion; + }), + new utils_1.LineParser(deleteErrorRegex, (result, [branch]) => { + const deletion = BranchDeleteSummary_1.branchDeletionFailure(branch); + result.errors.push(deletion); + result.all.push(deletion); + result.branches[branch] = deletion; + }), +]; +const parseBranchDeletions = (stdOut) => { + return utils_1.parseStringResponse(new BranchDeleteSummary_1.BranchDeletionBatch(), parsers, stdOut); +}; +exports.parseBranchDeletions = parseBranchDeletions; +function hasBranchDeletionError(data, processExitCode) { + return processExitCode === utils_1.ExitCodes.ERROR && deleteErrorRegex.test(data); +} +exports.hasBranchDeletionError = hasBranchDeletionError; +//# sourceMappingURL=parse-branch-delete.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js.map new file mode 100644 index 000000000..20d0a558f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-branch-delete.js","sourceRoot":"","sources":["parse-branch-delete.ts"],"names":[],"mappings":";;;AACA,0EAAqH;AAErH,oCAAsE;AAEtE,MAAM,kBAAkB,GAAG,0BAA0B,CAAC;AACtD,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEjD,MAAM,OAAO,GAA0C;IACpD,IAAI,kBAAU,CAAC,kBAAkB,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;QAC3D,MAAM,QAAQ,GAAG,2CAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAErD,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;IACtC,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,gBAAgB,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;QACnD,MAAM,QAAQ,GAAG,2CAAqB,CAAC,MAAM,CAAC,CAAC;QAE/C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7B,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;IACtC,CAAC,CAAC;CACJ,CAAC;AAEK,MAAM,oBAAoB,GAAgD,CAAC,MAAc,EAAE,EAAE;IACjG,OAAO,2BAAmB,CAAC,IAAI,yCAAmB,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC1E,CAAC,CAAA;AAFY,QAAA,oBAAoB,wBAEhC;AAED,SAAgB,sBAAsB,CAAC,IAAY,EAAE,eAA0B;IAC5E,OAAO,eAAe,KAAK,iBAAS,CAAC,KAAK,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7E,CAAC;AAFD,wDAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-branch.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-branch.d.ts new file mode 100644 index 000000000..3c39c2938 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-branch.d.ts @@ -0,0 +1,2 @@ +import { BranchSummary } from '../../../typings'; +export declare function parseBranchSummary(stdOut: string): BranchSummary; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-branch.js b/Client/node_modules/simple-git/src/lib/parsers/parse-branch.js new file mode 100644 index 000000000..5b68b29fa --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-branch.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseBranchSummary = void 0; +const BranchSummary_1 = require("../responses/BranchSummary"); +const utils_1 = require("../utils"); +const parsers = [ + new utils_1.LineParser(/^(\*\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => { + result.push(!!current, true, name, commit, label); + }), + new utils_1.LineParser(/^(\*\s)?(\S+)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => { + result.push(!!current, false, name, commit, label); + }) +]; +function parseBranchSummary(stdOut) { + return utils_1.parseStringResponse(new BranchSummary_1.BranchSummaryResult(), parsers, stdOut); +} +exports.parseBranchSummary = parseBranchSummary; +//# sourceMappingURL=parse-branch.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-branch.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-branch.js.map new file mode 100644 index 000000000..fceb47815 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-branch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-branch.js","sourceRoot":"","sources":["parse-branch.ts"],"names":[],"mappings":";;;AACA,8DAAiE;AACjE,oCAA2D;AAE3D,MAAM,OAAO,GAAsC;IAChD,IAAI,kBAAU,CAAC,uEAAuE,EAAE,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE;QAChI,MAAM,CAAC,IAAI,CACR,CAAC,CAAC,OAAO,EACT,IAAI,EACJ,IAAI,EAAE,MAAM,EAAE,KAAK,CACrB,CAAC;IACL,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,oCAAoC,EAAE,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE;QAC7F,MAAM,CAAC,IAAI,CACR,CAAC,CAAC,OAAO,EACT,KAAK,EACL,IAAI,EAAE,MAAM,EAAE,KAAK,CACrB,CAAC;IACL,CAAC,CAAC;CACJ,CAAC;AAEF,SAAgB,kBAAkB,CAAE,MAAc;IAC/C,OAAO,2BAAmB,CAAC,IAAI,mCAAmB,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC1E,CAAC;AAFD,gDAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-commit.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-commit.d.ts new file mode 100644 index 000000000..1b47298c0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-commit.d.ts @@ -0,0 +1,2 @@ +import { CommitResult } from '../../../typings'; +export declare function parseCommitResult(stdOut: string): CommitResult; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-commit.js b/Client/node_modules/simple-git/src/lib/parsers/parse-commit.js new file mode 100644 index 000000000..aea99f1c1 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-commit.js @@ -0,0 +1,53 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseCommitResult = void 0; +const utils_1 = require("../utils"); +const parsers = [ + new utils_1.LineParser(/\[([^\s]+)( \([^)]+\))? ([^\]]+)/, (result, [branch, root, commit]) => { + result.branch = branch; + result.commit = commit; + result.root = !!root; + }), + new utils_1.LineParser(/\s*Author:\s(.+)/i, (result, [author]) => { + const parts = author.split('<'); + const email = parts.pop(); + if (!email || !email.includes('@')) { + return; + } + result.author = { + email: email.substr(0, email.length - 1), + name: parts.join('<').trim() + }; + }), + new utils_1.LineParser(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g, (result, [changes, insertions, deletions]) => { + result.summary.changes = parseInt(changes, 10) || 0; + result.summary.insertions = parseInt(insertions, 10) || 0; + result.summary.deletions = parseInt(deletions, 10) || 0; + }), + new utils_1.LineParser(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/, (result, [changes, lines, direction]) => { + result.summary.changes = parseInt(changes, 10) || 0; + const count = parseInt(lines, 10) || 0; + if (direction === '-') { + result.summary.deletions = count; + } + else if (direction === '+') { + result.summary.insertions = count; + } + }), +]; +function parseCommitResult(stdOut) { + const result = { + author: null, + branch: '', + commit: '', + root: false, + summary: { + changes: 0, + insertions: 0, + deletions: 0, + }, + }; + return utils_1.parseStringResponse(result, parsers, stdOut); +} +exports.parseCommitResult = parseCommitResult; +//# sourceMappingURL=parse-commit.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-commit.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-commit.js.map new file mode 100644 index 000000000..207f89693 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-commit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-commit.js","sourceRoot":"","sources":["parse-commit.ts"],"names":[],"mappings":";;;AACA,oCAA2D;AAE3D,MAAM,OAAO,GAA+B;IACzC,IAAI,kBAAU,CAAC,kCAAkC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE;QACnF,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;IACxB,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;QACtD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;QAE1B,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACjC,OAAO;SACT;QAED,MAAM,CAAC,MAAM,GAAG;YACb,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YACxC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;SAC9B,CAAC;IACL,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,4CAA4C,EAAE,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,EAAE;QACvG,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QACpD,MAAM,CAAC,OAAO,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QAC1D,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,wCAAwC,EAAE,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE;QAC9F,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QACpD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,SAAS,KAAK,GAAG,EAAE;YACpB,MAAM,CAAC,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;SACnC;aAAM,IAAI,SAAS,KAAK,GAAG,EAAE;YAC3B,MAAM,CAAC,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC;SACpC;IACJ,CAAC,CAAC;CACJ,CAAC;AAEF,SAAgB,iBAAiB,CAAC,MAAc;IAC7C,MAAM,MAAM,GAAiB;QAC1B,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,KAAK;QACX,OAAO,EAAE;YACN,OAAO,EAAE,CAAC;YACV,UAAU,EAAE,CAAC;YACb,SAAS,EAAE,CAAC;SACd;KACH,CAAC;IACF,OAAO,2BAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACvD,CAAC;AAbD,8CAaC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts new file mode 100644 index 000000000..baaeb6404 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts @@ -0,0 +1,2 @@ +import { DiffResult } from '../../../typings'; +export declare function parseDiffResult(stdOut: string): DiffResult; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js b/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js new file mode 100644 index 000000000..022266d21 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js @@ -0,0 +1,74 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseDiffResult = void 0; +const DiffSummary_1 = require("../responses/DiffSummary"); +function parseDiffResult(stdOut) { + const lines = stdOut.trim().split('\n'); + const status = new DiffSummary_1.DiffSummary(); + readSummaryLine(status, lines.pop()); + for (let i = 0, max = lines.length; i < max; i++) { + const line = lines[i]; + textFileChange(line, status) || binaryFileChange(line, status); + } + return status; +} +exports.parseDiffResult = parseDiffResult; +function readSummaryLine(status, summary) { + (summary || '') + .trim() + .split(', ') + .forEach(function (text) { + const summary = /(\d+)\s([a-z]+)/.exec(text); + if (!summary) { + return; + } + summaryType(status, summary[2], parseInt(summary[1], 10)); + }); +} +function summaryType(status, key, value) { + const match = (/([a-z]+?)s?\b/.exec(key)); + if (!match || !statusUpdate[match[1]]) { + return; + } + statusUpdate[match[1]](status, value); +} +const statusUpdate = { + file(status, value) { + status.changed = value; + }, + deletion(status, value) { + status.deletions = value; + }, + insertion(status, value) { + status.insertions = value; + } +}; +function textFileChange(input, { files }) { + const line = input.trim().match(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/); + if (line) { + var alterations = (line[3] || '').trim(); + files.push({ + file: line[1].trim(), + changes: parseInt(line[2], 10), + insertions: alterations.replace(/-/g, '').length, + deletions: alterations.replace(/\+/g, '').length, + binary: false + }); + return true; + } + return false; +} +function binaryFileChange(input, { files }) { + const line = input.match(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)$/); + if (line) { + files.push({ + file: line[1].trim(), + before: +line[2], + after: +line[3], + binary: true + }); + return true; + } + return false; +} +//# sourceMappingURL=parse-diff-summary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js.map new file mode 100644 index 000000000..c5cffe47c --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-diff-summary.js","sourceRoot":"","sources":["parse-diff-summary.ts"],"names":[],"mappings":";;;AACA,0DAAuD;AAEvD,SAAgB,eAAe,CAAC,MAAc;IAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,yBAAW,EAAE,CAAC;IACjC,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAErC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QAC/C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KACjE;IAED,OAAO,MAAM,CAAC;AACjB,CAAC;AAXD,0CAWC;AAED,SAAS,eAAe,CAAC,MAAkB,EAAE,OAAgB;IAC1D,CAAC,OAAO,IAAI,EAAE,CAAC;SACX,IAAI,EAAE;SACN,KAAK,CAAC,IAAI,CAAC;SACX,OAAO,CAAC,UAAU,IAAY;QAC5B,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,EAAE;YACX,OAAO;SACT;QAED,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,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AC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM;YAChD,MAAM,EAAE,KAAK;SACf,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;KACd;IAED,OAAO,KAAK,CAAA;AACf,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,EAAC,KAAK,EAAa;IACzD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC5E,IAAI,IAAI,EAAE;QACP,KAAK,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;YACpB,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;YAChB,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;YACf,MAAM,EAAE,IAAI;SACd,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;KACd;IACD,OAAO,KAAK,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.d.ts new file mode 100644 index 000000000..98dc1a3d8 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.d.ts @@ -0,0 +1,2 @@ +import { FetchResult } from '../../../typings'; +export declare function parseFetchResult(stdOut: string, stdErr: string): FetchResult; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.js b/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.js new file mode 100644 index 000000000..383c4aaed --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseFetchResult = void 0; +const utils_1 = require("../utils"); +const parsers = [ + new utils_1.LineParser(/From (.+)$/, (result, [remote]) => { + result.remote = remote; + }), + new utils_1.LineParser(/\* \[new branch]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => { + result.branches.push({ + name, + tracking, + }); + }), + new utils_1.LineParser(/\* \[new tag]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => { + result.tags.push({ + name, + tracking, + }); + }) +]; +function parseFetchResult(stdOut, stdErr) { + const result = { + raw: stdOut, + remote: null, + branches: [], + tags: [], + }; + return utils_1.parseStringResponse(result, parsers, stdOut, stdErr); +} +exports.parseFetchResult = parseFetchResult; +//# sourceMappingURL=parse-fetch.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.js.map new file mode 100644 index 000000000..97446487d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-fetch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-fetch.js","sourceRoot":"","sources":["parse-fetch.ts"],"names":[],"mappings":";;;AACA,oCAA2D;AAE3D,MAAM,OAAO,GAA8B;IACxC,IAAI,kBAAU,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;QAC/C,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IAC1B,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,qCAAqC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE;QAChF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;YAClB,IAAI;YACJ,QAAQ;SACV,CAAC,CAAC;IACN,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,kCAAkC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE;QAC7E,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;YACd,IAAI;YACJ,QAAQ;SACV,CAAC,CAAC;IACN,CAAC,CAAC;CACJ,CAAC;AAEF,SAAgB,gBAAgB,CAAE,MAAc,EAAE,MAAc;IAC7D,MAAM,MAAM,GAAgB;QACzB,GAAG,EAAE,MAAM;QACX,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,EAAE;KACV,CAAC;IACF,OAAO,2BAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC;AARD,4CAQC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.d.ts new file mode 100644 index 000000000..113af34b7 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.d.ts @@ -0,0 +1,5 @@ +import { LogResult } from '../../../typings'; +export declare const START_BOUNDARY = "\u00F2\u00F2\u00F2\u00F2\u00F2\u00F2 "; +export declare const COMMIT_BOUNDARY = " \u00F2\u00F2"; +export declare const SPLITTER = " \u00F2 "; +export declare function createListLogSummaryParser(splitter?: string, fields?: string[]): (stdOut: string) => LogResult; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js b/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js new file mode 100644 index 000000000..fcec84393 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createListLogSummaryParser = exports.SPLITTER = exports.COMMIT_BOUNDARY = exports.START_BOUNDARY = void 0; +const utils_1 = require("../utils"); +const parse_diff_summary_1 = require("./parse-diff-summary"); +exports.START_BOUNDARY = 'òòòòòò '; +exports.COMMIT_BOUNDARY = ' òò'; +exports.SPLITTER = ' ò '; +const defaultFieldNames = ['hash', 'date', 'message', 'refs', 'author_name', 'author_email']; +function lineBuilder(tokens, fields) { + return fields.reduce((line, field, index) => { + line[field] = tokens[index] || ''; + return line; + }, Object.create({ diff: null })); +} +function createListLogSummaryParser(splitter = exports.SPLITTER, fields = defaultFieldNames) { + return function (stdOut) { + const all = utils_1.toLinesWithContent(stdOut, true, exports.START_BOUNDARY) + .map(function (item) { + const lineDetail = item.trim().split(exports.COMMIT_BOUNDARY); + const listLogLine = lineBuilder(lineDetail[0].trim().split(splitter), fields); + if (lineDetail.length > 1 && !!lineDetail[1].trim()) { + listLogLine.diff = parse_diff_summary_1.parseDiffResult(lineDetail[1]); + } + return listLogLine; + }); + return { + all, + latest: all.length && all[0] || null, + total: all.length, + }; + }; +} +exports.createListLogSummaryParser = createListLogSummaryParser; +//# sourceMappingURL=parse-list-log-summary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js.map new file mode 100644 index 000000000..ab69760ad --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-list-log-summary.js","sourceRoot":"","sources":["parse-list-log-summary.ts"],"names":[],"mappings":";;;AACA,oCAA8C;AAC9C,6DAAuD;AAE1C,QAAA,cAAc,GAAG,SAAS,CAAC;AAE3B,QAAA,eAAe,GAAG,KAAK,CAAC;AAExB,QAAA,QAAQ,GAAG,KAAK,CAAC;AAE9B,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAE7F,SAAS,WAAW,CAAC,MAAgB,EAAE,MAAgB;IACpD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IACf,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAQ,CAAC,CAAC;AAC1C,CAAC;AAED,SAAgB,0BAA0B,CAAW,QAAQ,GAAG,gBAAQ,EAAE,MAAM,GAAG,iBAAiB;IACjG,OAAO,UAAU,MAAc;QAC5B,MAAM,GAAG,GAAmC,0BAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,sBAAc,CAAC;aACxF,GAAG,CAAC,UAAU,IAAI;YAChB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,uBAAe,CAAC,CAAC;YACtD,MAAM,WAAW,GAAoB,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;YAE/F,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE;gBAClD,WAAW,CAAC,IAAI,GAAG,oCAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;aACpD;YAED,OAAO,WAAW,CAAC;QACtB,CAAC,CAAC,CAAC;QAEN,OAAO;YACJ,GAAG;YACH,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI;YACpC,KAAK,EAAE,GAAG,CAAC,MAAM;SACnB,CAAA;IACJ,CAAC,CAAA;AACJ,CAAC;AApBD,gEAoBC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-merge.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-merge.d.ts new file mode 100644 index 000000000..42435fd15 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-merge.d.ts @@ -0,0 +1,11 @@ +import { MergeDetail, MergeResult } from '../../../typings'; +import { TaskParser } from '../types'; +/** + * Parse the complete response from `git.merge` + */ +export declare const parseMergeResult: TaskParser; +/** + * Parse the merge specific detail (ie: not the content also available in the pull detail) from `git.mnerge` + * @param stdOut + */ +export declare const parseMergeDetail: TaskParser; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-merge.js b/Client/node_modules/simple-git/src/lib/parsers/parse-merge.js new file mode 100644 index 000000000..a5779925c --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-merge.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseMergeDetail = exports.parseMergeResult = void 0; +const MergeSummary_1 = require("../responses/MergeSummary"); +const utils_1 = require("../utils"); +const parse_pull_1 = require("./parse-pull"); +const parsers = [ + new utils_1.LineParser(/^Auto-merging\s+(.+)$/, (summary, [autoMerge]) => { + summary.merges.push(autoMerge); + }), + new utils_1.LineParser(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/, (summary, [reason, file]) => { + summary.conflicts.push(new MergeSummary_1.MergeSummaryConflict(reason, file)); + }), + new utils_1.LineParser(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/, (summary, [reason, file, deleteRef]) => { + summary.conflicts.push(new MergeSummary_1.MergeSummaryConflict(reason, file, { deleteRef })); + }), + new utils_1.LineParser(/^CONFLICT\s+\((.+)\):/, (summary, [reason]) => { + summary.conflicts.push(new MergeSummary_1.MergeSummaryConflict(reason, null)); + }), + new utils_1.LineParser(/^Automatic merge failed;\s+(.+)$/, (summary, [result]) => { + summary.result = result; + }), +]; +/** + * Parse the complete response from `git.merge` + */ +const parseMergeResult = (stdOut, stdErr) => { + return Object.assign(exports.parseMergeDetail(stdOut, stdErr), parse_pull_1.parsePullResult(stdOut, stdErr)); +}; +exports.parseMergeResult = parseMergeResult; +/** + * Parse the merge specific detail (ie: not the content also available in the pull detail) from `git.mnerge` + * @param stdOut + */ +const parseMergeDetail = (stdOut) => { + return utils_1.parseStringResponse(new MergeSummary_1.MergeSummaryDetail(), parsers, stdOut); +}; +exports.parseMergeDetail = parseMergeDetail; +//# sourceMappingURL=parse-merge.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-merge.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-merge.js.map new file mode 100644 index 000000000..0d59b37e6 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-merge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-merge.js","sourceRoot":"","sources":["parse-merge.ts"],"names":[],"mappings":";;;AACA,4DAAqF;AAErF,oCAA2D;AAC3D,6CAA+C;AAE/C,MAAM,OAAO,GAA8B;IACxC,IAAI,kBAAU,CAAC,uBAAuB,EAAE,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE;QAC9D,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,+CAA+C,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;QACzF,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,mCAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,wDAAwD,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE;QAC7G,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,mCAAoB,CAAC,MAAM,EAAE,IAAI,EAAE,EAAC,SAAS,EAAC,CAAC,CAAC,CAAC;IAC/E,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,uBAAuB,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,mCAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC;IACF,IAAI,kBAAU,CAAC,kCAAkC,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;QACtE,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IAC3B,CAAC,CAAC;CACJ,CAAC;AAEF;;GAEG;AACI,MAAM,gBAAgB,GAAoC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;IACjF,OAAO,MAAM,CAAC,MAAM,CACjB,wBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,4BAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CACjC,CAAC;AACL,CAAC,CAAC;AALW,QAAA,gBAAgB,oBAK3B;AAEF;;;GAGG;AACI,MAAM,gBAAgB,GAAoC,CAAC,MAAM,EAAE,EAAE;IACzE,OAAO,2BAAmB,CAAC,IAAI,iCAAkB,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACzE,CAAC,CAAA;AAFY,QAAA,gBAAgB,oBAE5B"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-move.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-move.d.ts new file mode 100644 index 000000000..a2af49d0f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-move.d.ts @@ -0,0 +1,2 @@ +import { MoveResult } from '../../../typings'; +export declare function parseMoveResult(stdOut: string): MoveResult; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-move.js b/Client/node_modules/simple-git/src/lib/parsers/parse-move.js new file mode 100644 index 000000000..6468c8036 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-move.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseMoveResult = void 0; +const utils_1 = require("../utils"); +const parsers = [ + new utils_1.LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => { + result.moves.push({ from, to }); + }), +]; +function parseMoveResult(stdOut) { + return utils_1.parseStringResponse({ moves: [] }, parsers, stdOut); +} +exports.parseMoveResult = parseMoveResult; +//# sourceMappingURL=parse-move.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-move.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-move.js.map new file mode 100644 index 000000000..a724a6d18 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-move.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-move.js","sourceRoot":"","sources":["parse-move.ts"],"names":[],"mappings":";;;AACA,oCAA2D;AAE3D,MAAM,OAAO,GAA6B;IACvC,IAAI,kBAAU,CAAC,yBAAyB,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE;QAC9D,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC;IACjC,CAAC,CAAC;CACJ,CAAC;AAEF,SAAgB,eAAe,CAAE,MAAc;IAC5C,OAAO,2BAAmB,CAAC,EAAC,KAAK,EAAE,EAAE,EAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC5D,CAAC;AAFD,0CAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-pull.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-pull.d.ts new file mode 100644 index 000000000..85c6b966f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-pull.d.ts @@ -0,0 +1,4 @@ +import { PullDetail, PullResult } from '../../../typings'; +import { TaskParser } from '../types'; +export declare const parsePullDetail: TaskParser; +export declare const parsePullResult: TaskParser; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-pull.js b/Client/node_modules/simple-git/src/lib/parsers/parse-pull.js new file mode 100644 index 000000000..3227a6c29 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-pull.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parsePullResult = exports.parsePullDetail = void 0; +const PullSummary_1 = require("../responses/PullSummary"); +const utils_1 = require("../utils"); +const parse_remote_messages_1 = require("./parse-remote-messages"); +const FILE_UPDATE_REGEX = /^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/; +const SUMMARY_REGEX = /(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/; +const ACTION_REGEX = /^(create|delete) mode \d+ (.+)/; +const parsers = [ + new utils_1.LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => { + result.files.push(file); + if (insertions) { + result.insertions[file] = insertions.length; + } + if (deletions) { + result.deletions[file] = deletions.length; + } + }), + new utils_1.LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => { + if (insertions !== undefined || deletions !== undefined) { + result.summary.changes = +changes || 0; + result.summary.insertions = +insertions || 0; + result.summary.deletions = +deletions || 0; + return true; + } + return false; + }), + new utils_1.LineParser(ACTION_REGEX, (result, [action, file]) => { + utils_1.append(result.files, file); + utils_1.append((action === 'create') ? result.created : result.deleted, file); + }), +]; +const parsePullDetail = (stdOut, stdErr) => { + return utils_1.parseStringResponse(new PullSummary_1.PullSummary(), parsers, stdOut, stdErr); +}; +exports.parsePullDetail = parsePullDetail; +const parsePullResult = (stdOut, stdErr) => { + return Object.assign(new PullSummary_1.PullSummary(), exports.parsePullDetail(stdOut, stdErr), parse_remote_messages_1.parseRemoteMessages(stdOut, stdErr)); +}; +exports.parsePullResult = parsePullResult; +//# sourceMappingURL=parse-pull.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-pull.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-pull.js.map new file mode 100644 index 000000000..46e1a7153 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-pull.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-pull.js","sourceRoot":"","sources":["parse-pull.ts"],"names":[],"mappings":";;;AACA,0DAAuD;AAEvD,oCAAmE;AACnE,mEAA8D;AAE9D,MAAM,iBAAiB,GAAG,kCAAkC,CAAC;AAC7D,MAAM,aAAa,GAAG,8CAA8C,CAAC;AACrE,MAAM,YAAY,GAAG,gCAAgC,CAAC;AAEtD,MAAM,OAAO,GAA6B;IACvC,IA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,MAAM,EAAE,MAAM,EAAE,EAAE;IAC/E,OAAO,2BAAmB,CAAC,IAAI,yBAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1E,CAAC,CAAA;AAFY,QAAA,eAAe,mBAE3B;AAEM,MAAM,eAAe,GAAmC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;IAC/E,OAAO,MAAM,CAAC,MAAM,CACjB,IAAI,yBAAW,EAAE,EACjB,uBAAe,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,2CAAmB,CAAiB,MAAM,EAAE,MAAM,CAAC,CACrD,CAAC;AACL,CAAC,CAAA;AANY,QAAA,eAAe,mBAM3B"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-push.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-push.d.ts new file mode 100644 index 000000000..9bb39b47c --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-push.d.ts @@ -0,0 +1,4 @@ +import { PushDetail, PushResult } from '../../../typings'; +import { TaskParser } from '../types'; +export declare const parsePushResult: TaskParser; +export declare const parsePushDetail: TaskParser; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-push.js b/Client/node_modules/simple-git/src/lib/parsers/parse-push.js new file mode 100644 index 000000000..f9bb1f78c --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-push.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parsePushDetail = exports.parsePushResult = void 0; +const utils_1 = require("../utils"); +const parse_remote_messages_1 = require("./parse-remote-messages"); +function pushResultPushedItem(local, remote, status) { + const deleted = status.includes('deleted'); + const tag = status.includes('tag') || /^refs\/tags/.test(local); + const alreadyUpdated = !status.includes('new'); + return { + deleted, + tag, + branch: !tag, + new: !alreadyUpdated, + alreadyUpdated, + local, + remote, + }; +} +const parsers = [ + new utils_1.LineParser(/^Pushing to (.+)$/, (result, [repo]) => { + result.repo = repo; + }), + new utils_1.LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => { + result.ref = Object.assign(Object.assign({}, (result.ref || {})), { local }); + }), + new utils_1.LineParser(/^[*-=]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => { + result.pushed.push(pushResultPushedItem(local, remote, type)); + }), + new utils_1.LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, (result, [local, remote, remoteName]) => { + result.branch = Object.assign(Object.assign({}, (result.branch || {})), { local, + remote, + remoteName }); + }), + new utils_1.LineParser(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/, (result, [local, remote, from, to]) => { + result.update = { + head: { + local, + remote, + }, + hash: { + from, + to, + }, + }; + }), +]; +const parsePushResult = (stdOut, stdErr) => { + const pushDetail = exports.parsePushDetail(stdOut, stdErr); + const responseDetail = parse_remote_messages_1.parseRemoteMessages(stdOut, stdErr); + return Object.assign(Object.assign({}, pushDetail), responseDetail); +}; +exports.parsePushResult = parsePushResult; +const parsePushDetail = (stdOut, stdErr) => { + return utils_1.parseStringResponse({ pushed: [] }, parsers, stdOut, stdErr); +}; +exports.parsePushDetail = parsePushDetail; +//# sourceMappingURL=parse-push.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-push.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-push.js.map new file mode 100644 index 000000000..57b717175 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-push.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-push.js","sourceRoot":"","sources":["parse-push.ts"],"names":[],"mappings":";;;AAEA,oCAA2D;AAC3D,mEAA8D;AAE9D,SAAS,oBAAoB,CAAC,KAAa,EAAE,MAAc,EAAE,MAAc;IACxE,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC3C,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,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E,CAAC,EAAE,EAAE;QAClG,MAAM,CAAC,MAAM,GAAG;YACb,IAAI,EAAE;gBACH,KAAK;gBACL,MAAM;aACR;YACD,IAAI,EAAE;gBACH,IAAI;gBACJ,EAAE;aACJ;SACH,CAAC;IACL,CAAC,CAAC;CACJ,CAAC;AAEK,MAAM,eAAe,GAAmC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;IAC/E,MAAM,UAAU,GAAG,uBAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnD,MAAM,cAAc,GAAG,2CAAmB,CAA2B,MAAM,EAAE,MAAM,CAAC,CAAC;IAErF,uCACM,UAAU,GACV,cAAc,EAClB;AACL,CAAC,CAAA;AARY,QAAA,eAAe,mBAQ3B;AAEM,MAAM,eAAe,GAAmC,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;IAC/E,OAAO,2BAAmB,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACrE,CAAC,CAAA;AAFY,QAAA,eAAe,mBAE3B"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.d.ts new file mode 100644 index 000000000..9c2498910 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.d.ts @@ -0,0 +1,5 @@ +import { RemoteMessageResult, RemoteMessages } from '../../../typings'; +export declare function parseRemoteMessages(_stdOut: string, stdErr: string): RemoteMessageResult; +export declare class RemoteMessageSummary implements RemoteMessages { + readonly all: string[]; +} diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js new file mode 100644 index 000000000..e95a54dfd --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RemoteMessageSummary = exports.parseRemoteMessages = void 0; +const utils_1 = require("../utils"); +const parse_remote_objects_1 = require("./parse-remote-objects"); +const parsers = [ + new utils_1.RemoteLineParser(/^remote:\s*(.+)$/, (result, [text]) => { + result.remoteMessages.all.push(text.trim()); + return false; + }), + ...parse_remote_objects_1.remoteMessagesObjectParsers, + new utils_1.RemoteLineParser([/create a (?:pull|merge) request/i, /\s(https?:\/\/\S+)$/], (result, [pullRequestUrl]) => { + result.remoteMessages.pullRequestUrl = pullRequestUrl; + }), + new utils_1.RemoteLineParser([/found (\d+) vulnerabilities.+\(([^)]+)\)/i, /\s(https?:\/\/\S+)$/], (result, [count, summary, url]) => { + result.remoteMessages.vulnerabilities = { + count: utils_1.asNumber(count), + summary, + url, + }; + }), +]; +function parseRemoteMessages(_stdOut, stdErr) { + return utils_1.parseStringResponse({ remoteMessages: new RemoteMessageSummary() }, parsers, stdErr); +} +exports.parseRemoteMessages = parseRemoteMessages; +class RemoteMessageSummary { + constructor() { + this.all = []; + } +} +exports.RemoteMessageSummary = RemoteMessageSummary; +//# sourceMappingURL=parse-remote-messages.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js.map new file mode 100644 index 000000000..860a61949 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-remote-messages.js","sourceRoot":"","sources":["parse-remote-messages.ts"],"names":[],"mappings":";;;AACA,oCAA2E;AAC3E,iEAAqE;AAErE,MAAM,OAAO,GAAuF;IACjG,IAAI,wBAAgB,CAAC,kBAAkB,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;QACzD,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5C,OAAO,KAAK,CAAC;IAChB,CAAC,CAAC;IACF,GAAG,kDAA2B;IAC9B,IAAI,wBAAgB,CAAC,CAAC,kCAAkC,EAAE,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE;QAC3G,MAAM,CAAC,cAA2C,CAAC,cAAc,GAAG,cAAc,CAAC;IACvF,CAAC,CAAC;IACF,IAAI,wBAAgB,CAAC,CAAC,2CAA2C,EAAE,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE;QACzH,MAAM,CAAC,cAA2C,CAAC,eAAe,GAAG;YACnE,KAAK,EAAE,gBAAQ,CAAC,KAAK,CAAC;YACtB,OAAO;YACP,GAAG;SACL,CAAC;IACL,CAAC,CAAC;CACJ,CAAC;AAEF,SAAgB,mBAAmB,CAChC,OAAe,EAAE,MAAc;IAE/B,OAAO,2BAAmB,CAAC,EAAC,cAAc,EAAE,IAAI,oBAAoB,EAAO,EAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAClG,CAAC;AAJD,kDAIC;AAED,MAAa,oBAAoB;IAAjC;QACmB,QAAG,GAAa,EAAE,CAAC;IACtC,CAAC;CAAA;AAFD,oDAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.d.ts b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.d.ts new file mode 100644 index 000000000..513b58a5d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.d.ts @@ -0,0 +1,3 @@ +import { RemoteMessageResult, RemoteMessages } from '../../../typings'; +import { RemoteLineParser } from '../utils'; +export declare const remoteMessagesObjectParsers: RemoteLineParser>[]; diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js new file mode 100644 index 000000000..4fa3d1728 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.remoteMessagesObjectParsers = void 0; +const utils_1 = require("../utils"); +function objectEnumerationResult(remoteMessages) { + return (remoteMessages.objects = remoteMessages.objects || { + compressing: 0, + counting: 0, + enumerating: 0, + packReused: 0, + reused: { count: 0, delta: 0 }, + total: { count: 0, delta: 0 } + }); +} +function asObjectCount(source) { + const count = /^\s*(\d+)/.exec(source); + const delta = /delta (\d+)/i.exec(source); + return { + count: utils_1.asNumber(count && count[1] || '0'), + delta: utils_1.asNumber(delta && delta[1] || '0'), + }; +} +exports.remoteMessagesObjectParsers = [ + new utils_1.RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i, (result, [action, count]) => { + const key = action.toLowerCase(); + const enumeration = objectEnumerationResult(result.remoteMessages); + Object.assign(enumeration, { [key]: utils_1.asNumber(count) }); + }), + new utils_1.RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i, (result, [action, count]) => { + const key = action.toLowerCase(); + const enumeration = objectEnumerationResult(result.remoteMessages); + Object.assign(enumeration, { [key]: utils_1.asNumber(count) }); + }), + new utils_1.RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i, (result, [total, reused, packReused]) => { + const objects = objectEnumerationResult(result.remoteMessages); + objects.total = asObjectCount(total); + objects.reused = asObjectCount(reused); + objects.packReused = utils_1.asNumber(packReused); + }), +]; +//# sourceMappingURL=parse-remote-objects.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js.map b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js.map new file mode 100644 index 000000000..e748f3774 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-remote-objects.js","sourceRoot":"","sources":["parse-remote-objects.ts"],"names":[],"mappings":";;;AACA,oC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AAE;QAC9H,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QACjC,MAAM,WAAW,GAAG,uBAAuB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAEnE,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAC,CAAC,GAAG,CAAC,EAAE,gBAAQ,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC;IACxD,CAAC,CAAC;IACF,IAAI,wBAAgB,CAAC,mDAAmD,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,EAAE;QAC/G,MAAM,OAAO,GAAG,uBAAuB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAC/D,OAAO,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,CAAC,UAAU,GAAG,gBAAQ,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC,CAAC;CACJ,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.d.ts new file mode 100644 index 000000000..e7d35176b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.d.ts @@ -0,0 +1,12 @@ +import { BranchMultiDeleteResult, BranchSingleDeleteFailure, BranchSingleDeleteResult, BranchSingleDeleteSuccess } from '../../../typings'; +export declare class BranchDeletionBatch implements BranchMultiDeleteResult { + all: BranchSingleDeleteResult[]; + branches: { + [branchName: string]: BranchSingleDeleteResult; + }; + errors: BranchSingleDeleteResult[]; + get success(): boolean; +} +export declare function branchDeletionSuccess(branch: string, hash: string): BranchSingleDeleteSuccess; +export declare function branchDeletionFailure(branch: string): BranchSingleDeleteFailure; +export declare function isSingleBranchDeleteFailure(test: BranchSingleDeleteResult): test is BranchSingleDeleteSuccess; diff --git a/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js b/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js new file mode 100644 index 000000000..b240055c8 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isSingleBranchDeleteFailure = exports.branchDeletionFailure = exports.branchDeletionSuccess = exports.BranchDeletionBatch = void 0; +class BranchDeletionBatch { + constructor() { + this.all = []; + this.branches = {}; + this.errors = []; + } + get success() { + return !this.errors.length; + } +} +exports.BranchDeletionBatch = BranchDeletionBatch; +function branchDeletionSuccess(branch, hash) { + return { + branch, hash, success: true, + }; +} +exports.branchDeletionSuccess = branchDeletionSuccess; +function branchDeletionFailure(branch) { + return { + branch, hash: null, success: false, + }; +} +exports.branchDeletionFailure = branchDeletionFailure; +function isSingleBranchDeleteFailure(test) { + return test.success; +} +exports.isSingleBranchDeleteFailure = isSingleBranchDeleteFailure; +//# sourceMappingURL=BranchDeleteSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js.map new file mode 100644 index 000000000..496298c0e --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BranchDeleteSummary.js","sourceRoot":"","sources":["BranchDeleteSummary.ts"],"names":[],"mappings":";;;AAOA,MAAa,mBAAmB;IAAhC;QACG,QAAG,GAA+B,EAAE,CAAC;QACrC,aAAQ,GAAuD,EAAE,CAAC;QAClE,WAAM,GAA+B,EAAE,CAAC;IAK3C,CAAC;IAHE,IAAI,OAAO;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;CACH;AARD,kDAQC;AAED,SAAgB,qBAAqB,CAAE,MAAc,EAAE,IAAY;IAChE,OAAO;QACJ,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI;KAC7B,CAAC;AACL,CAAC;AAJD,sDAIC;AAED,SAAgB,qBAAqB,CAAE,MAAc;IAClD,OAAO;QACJ,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK;KACpC,CAAC;AACL,CAAC;AAJD,sDAIC;AAED,SAAgB,2BAA2B,CAAE,IAA8B;IACxE,OAAO,IAAI,CAAC,OAAO,CAAC;AACvB,CAAC;AAFD,kEAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/BranchSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/BranchSummary.d.ts new file mode 100644 index 000000000..69cd69898 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/BranchSummary.d.ts @@ -0,0 +1,10 @@ +import { BranchSummary, BranchSummaryBranch } from '../../../typings'; +export declare class BranchSummaryResult implements BranchSummary { + all: string[]; + branches: { + [p: string]: BranchSummaryBranch; + }; + current: string; + detached: boolean; + push(current: boolean, detached: boolean, name: string, commit: string, label: string): void; +} diff --git a/Client/node_modules/simple-git/src/lib/responses/BranchSummary.js b/Client/node_modules/simple-git/src/lib/responses/BranchSummary.js new file mode 100644 index 000000000..2e54ec614 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/BranchSummary.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BranchSummaryResult = void 0; +class BranchSummaryResult { + constructor() { + this.all = []; + this.branches = {}; + this.current = ''; + this.detached = false; + } + push(current, detached, name, commit, label) { + if (current) { + this.detached = detached; + this.current = name; + } + this.all.push(name); + this.branches[name] = { + current: current, + name: name, + commit: commit, + label: label + }; + } +} +exports.BranchSummaryResult = BranchSummaryResult; +//# sourceMappingURL=BranchSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/BranchSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/BranchSummary.js.map new file mode 100644 index 000000000..05a4a5b3a --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/BranchSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BranchSummary.js","sourceRoot":"","sources":["BranchSummary.ts"],"names":[],"mappings":";;;AAEA,MAAa,mBAAmB;IAAhC;QACU,QAAG,GAAa,EAAE,CAAC;QACnB,aAAQ,GAAyC,EAAE,CAAC;QACpD,YAAO,GAAW,EAAE,CAAC;QACrB,aAAQ,GAAY,KAAK,CAAC;IAgBpC,CAAC;IAdE,IAAI,CAAC,OAAgB,EAAE,QAAiB,EAAE,IAAY,EAAE,MAAc,EAAE,KAAa;QAClF,IAAI,OAAO,EAAE;YACV,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;SACtB;QAED,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG;YACnB,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,KAAK;SACd,CAAC;IACL,CAAC;CACH;AApBD,kDAoBC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.d.ts b/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.d.ts new file mode 100644 index 000000000..e15478fb3 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.d.ts @@ -0,0 +1,4 @@ +/** + * Parser for the `check-ignore` command - returns each file as a string array + */ +export declare const parseCheckIgnore: (text: string) => string[]; diff --git a/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.js b/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.js new file mode 100644 index 000000000..209c71031 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseCheckIgnore = void 0; +/** + * Parser for the `check-ignore` command - returns each file as a string array + */ +const parseCheckIgnore = (text) => { + return text.split(/\n/g) + .map(line => line.trim()) + .filter(file => !!file); +}; +exports.parseCheckIgnore = parseCheckIgnore; +//# sourceMappingURL=CheckIgnore.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.js.map b/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.js.map new file mode 100644 index 000000000..9ddcc3c61 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/CheckIgnore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CheckIgnore.js","sourceRoot":"","sources":["CheckIgnore.ts"],"names":[],"mappings":";;;AACA;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAY,EAAE;IACxD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;SACpB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SACxB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/CleanSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/CleanSummary.d.ts new file mode 100644 index 000000000..d49ef04a1 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/CleanSummary.d.ts @@ -0,0 +1,9 @@ +import { CleanSummary } from '../../../typings'; +export declare class CleanResponse implements CleanSummary { + readonly dryRun: boolean; + paths: string[]; + files: string[]; + folders: string[]; + constructor(dryRun: boolean); +} +export declare function cleanSummaryParser(dryRun: boolean, text: string): CleanSummary; diff --git a/Client/node_modules/simple-git/src/lib/responses/CleanSummary.js b/Client/node_modules/simple-git/src/lib/responses/CleanSummary.js new file mode 100644 index 000000000..e68f215aa --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/CleanSummary.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cleanSummaryParser = exports.CleanResponse = void 0; +const utils_1 = require("../utils"); +class CleanResponse { + constructor(dryRun) { + this.dryRun = dryRun; + this.paths = []; + this.files = []; + this.folders = []; + } +} +exports.CleanResponse = CleanResponse; +const removalRegexp = /^[a-z]+\s*/i; +const dryRunRemovalRegexp = /^[a-z]+\s+[a-z]+\s*/i; +const isFolderRegexp = /\/$/; +function cleanSummaryParser(dryRun, text) { + const summary = new CleanResponse(dryRun); + const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp; + utils_1.toLinesWithContent(text).forEach(line => { + const removed = line.replace(regexp, ''); + summary.paths.push(removed); + (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed); + }); + return summary; +} +exports.cleanSummaryParser = cleanSummaryParser; +//# sourceMappingURL=CleanSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/CleanSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/CleanSummary.js.map new file mode 100644 index 000000000..bd4138e89 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/CleanSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CleanSummary.js","sourceRoot":"","sources":["CleanSummary.ts"],"names":[],"mappings":";;;AACA,oCAA8C;AAE9C,MAAa,aAAa;IAMvB,YACmB,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;QAL3B,UAAK,GAAa,EAAE,CAAC;QACrB,UAAK,GAAa,EAAE,CAAC;QACrB,YAAO,GAAa,EAAE,CAAC;IAI3B,CAAC;CAEN;AAVD,sCAUC;AAED,MAAM,aAAa,GAAG,aAAa,CAAC;AACpC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AACnD,MAAM,cAAc,GAAG,KAAK,CAAC;AAE7B,SAAgB,kBAAkB,CAAE,MAAe,EAAE,IAAY;IAC9D,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,aAAa,CAAC;IAE5D,0BAAkB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAEzC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AAClB,CAAC;AAZD,gDAYC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/ConfigList.d.ts b/Client/node_modules/simple-git/src/lib/responses/ConfigList.d.ts new file mode 100644 index 000000000..980e19134 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/ConfigList.d.ts @@ -0,0 +1,12 @@ +import { ConfigListSummary, ConfigValues } from '../../../typings'; +export declare class ConfigList implements ConfigListSummary { + files: string[]; + values: { + [fileName: string]: ConfigValues; + }; + private _all; + get all(): ConfigValues; + addFile(file: string): ConfigValues; + addValue(file: string, key: string, value: string): void; +} +export declare function configListParser(text: string): ConfigList; diff --git a/Client/node_modules/simple-git/src/lib/responses/ConfigList.js b/Client/node_modules/simple-git/src/lib/responses/ConfigList.js new file mode 100644 index 000000000..a0befd7cb --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/ConfigList.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.configListParser = exports.ConfigList = void 0; +const utils_1 = require("../utils"); +class ConfigList { + constructor() { + this.files = []; + this.values = Object.create(null); + } + get all() { + if (!this._all) { + this._all = this.files.reduce((all, file) => { + return Object.assign(all, this.values[file]); + }, {}); + } + return this._all; + } + addFile(file) { + if (!(file in this.values)) { + const latest = utils_1.last(this.files); + this.values[file] = latest ? Object.create(this.values[latest]) : {}; + this.files.push(file); + } + return this.values[file]; + } + addValue(file, key, value) { + const values = this.addFile(file); + if (!values.hasOwnProperty(key)) { + values[key] = value; + } + else if (Array.isArray(values[key])) { + values[key].push(value); + } + else { + values[key] = [values[key], value]; + } + this._all = undefined; + } +} +exports.ConfigList = ConfigList; +function configListParser(text) { + const config = new ConfigList(); + const lines = text.split('\0'); + for (let i = 0, max = lines.length - 1; i < max;) { + const file = configFilePath(lines[i++]); + const [key, value] = utils_1.splitOn(lines[i++], '\n'); + config.addValue(file, key, value); + } + return config; +} +exports.configListParser = configListParser; +function configFilePath(filePath) { + return filePath.replace(/^(file):/, ''); +} +//# sourceMappingURL=ConfigList.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/ConfigList.js.map b/Client/node_modules/simple-git/src/lib/responses/ConfigList.js.map new file mode 100644 index 000000000..580f0d6b2 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/ConfigList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConfigList.js","sourceRoot":"","sources":["ConfigList.ts"],"names":[],"mappings":";;;AACA,oCAAyC;AAEzC,MAAa,UAAU;IAAvB;QAEU,UAAK,GAAa,EAAE,CAAC;QACrB,WAAM,GAAyC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAuC7E,CAAC;IAnCE,IAAW,GAAG;QACX,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAiB,EAAE,IAAY,EAAE,EAAE;gBAC/D,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CA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,CAAC,IAAI,CAAC,CAAC;IAE/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG;QAC/C,MAAM,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,eAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QAE/C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;KACpC;IAED,OAAO,MAAM,CAAC;AACjB,CAAC;AAZD,4CAYC;AAED,SAAS,cAAc,CAAC,QAAgB;IACrC,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/DiffSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/DiffSummary.d.ts new file mode 100644 index 000000000..16d63f0a0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/DiffSummary.d.ts @@ -0,0 +1,10 @@ +import { DiffResult, DiffResultBinaryFile, DiffResultTextFile } from '../../../typings'; +/*** + * The DiffSummary is returned as a response to getting `git().status()` + */ +export declare class DiffSummary implements DiffResult { + changed: number; + deletions: number; + insertions: number; + files: Array; +} diff --git a/Client/node_modules/simple-git/src/lib/responses/DiffSummary.js b/Client/node_modules/simple-git/src/lib/responses/DiffSummary.js new file mode 100644 index 000000000..4c3ec6085 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/DiffSummary.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DiffSummary = void 0; +/*** + * The DiffSummary is returned as a response to getting `git().status()` + */ +class DiffSummary { + constructor() { + this.changed = 0; + this.deletions = 0; + this.insertions = 0; + this.files = []; + } +} +exports.DiffSummary = DiffSummary; +//# sourceMappingURL=DiffSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/DiffSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/DiffSummary.js.map new file mode 100644 index 000000000..58ed3968e --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/DiffSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DiffSummary.js","sourceRoot":"","sources":["DiffSummary.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,WAAW;IAAxB;QACG,YAAO,GAAG,CAAC,CAAA;QACX,cAAS,GAAG,CAAC,CAAC;QACd,eAAU,GAAG,CAAC,CAAC;QAEf,UAAK,GAAqD,EAAE,CAAC;IAChE,CAAC;CAAA;AAND,kCAMC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.d.ts new file mode 100644 index 000000000..fd680a424 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.d.ts @@ -0,0 +1,9 @@ +import { FileStatusResult } from '../../../typings/response'; +export declare const fromPathRegex: RegExp; +export declare class FileStatusSummary implements FileStatusResult { + path: string; + index: string; + working_dir: string; + readonly from: string | undefined; + constructor(path: string, index: string, working_dir: string); +} diff --git a/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.js b/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.js new file mode 100644 index 000000000..cb87d783f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FileStatusSummary = exports.fromPathRegex = void 0; +exports.fromPathRegex = /^(.+) -> (.+)$/; +class FileStatusSummary { + constructor(path, index, working_dir) { + this.path = path; + this.index = index; + this.working_dir = working_dir; + if ('R' === (index + working_dir)) { + const detail = exports.fromPathRegex.exec(path) || [null, path, path]; + this.from = detail[1] || ''; + this.path = detail[2] || ''; + } + } +} +exports.FileStatusSummary = FileStatusSummary; +//# sourceMappingURL=FileStatusSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.js.map new file mode 100644 index 000000000..b5654ee40 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/FileStatusSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FileStatusSummary.js","sourceRoot":"","sources":["FileStatusSummary.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG,gBAAgB,CAAC;AAE9C,MAAa,iBAAiB;IAI3B,YACU,IAAY,EACZ,KAAa,EACb,WAAmB;QAFnB,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;QACb,gBAAW,GAAX,WAAW,CAAQ;QAE1B,IAAI,GAAG,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,EAAE;YAChC,MAAM,MAAM,GAAG,qBAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAC9D,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC5B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SAC9B;IACJ,CAAC;CACH;AAfD,8CAeC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.d.ts new file mode 100644 index 000000000..3ef910935 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.d.ts @@ -0,0 +1,11 @@ +export interface RemoteWithoutRefs { + name: string; +} +export interface RemoteWithRefs extends RemoteWithoutRefs { + refs: { + fetch: string; + push: string; + }; +} +export declare function parseGetRemotes(text: string): RemoteWithoutRefs[]; +export declare function parseGetRemotesVerbose(text: string): RemoteWithRefs[]; diff --git a/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js b/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js new file mode 100644 index 000000000..59a140a8d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseGetRemotesVerbose = exports.parseGetRemotes = void 0; +const utils_1 = require("../utils"); +function parseGetRemotes(text) { + const remotes = {}; + forEach(text, ([name]) => remotes[name] = { name }); + return Object.values(remotes); +} +exports.parseGetRemotes = parseGetRemotes; +function parseGetRemotesVerbose(text) { + const remotes = {}; + forEach(text, ([name, url, purpose]) => { + if (!remotes.hasOwnProperty(name)) { + remotes[name] = { + name: name, + refs: { fetch: '', push: '' }, + }; + } + if (purpose && url) { + remotes[name].refs[purpose.replace(/[^a-z]/g, '')] = url; + } + }); + return Object.values(remotes); +} +exports.parseGetRemotesVerbose = parseGetRemotesVerbose; +function forEach(text, handler) { + utils_1.forEachLineWithContent(text, (line) => handler(line.split(/\s+/))); +} +//# sourceMappingURL=GetRemoteSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js.map new file mode 100644 index 000000000..4a4211c14 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GetRemoteSummary.js","sourceRoot":"","sources":["GetRemoteSummary.ts"],"names":[],"mappings":";;;AAAA,oCAAkD;AAalD,SAAgB,eAAe,CAAE,IAAY;IAC1C,MAAM,OAAO,GAAwC,EAAE,CAAC;IAExD,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAND,0CAMC;AAED,SAAgB,sBAAsB,CAAE,IAAY;IACjD,MAAM,OAAO,GAAqC,EAAE,CAAC;IAErD,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE;QACpC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;YAChC,OAAO,CAAC,IAAI,CAAC,GAAG;gBACb,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;aAC/B,CAAC;SACJ;QAED,IAAI,OAAO,IAAI,GAAG,EAAE;YACjB,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAiC,CAAC,GAAG,GAAG,CAAC;SAC3F;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAjBD,wDAiBC;AAED,SAAS,OAAO,CAAC,IAAY,EAAE,OAAiC;IAC7D,8BAAsB,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/InitSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/InitSummary.d.ts new file mode 100644 index 000000000..634911f87 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/InitSummary.d.ts @@ -0,0 +1,9 @@ +import { InitResult } from '../../../typings'; +export declare class InitSummary implements InitResult { + readonly bare: boolean; + readonly path: string; + readonly existing: boolean; + readonly gitDir: string; + constructor(bare: boolean, path: string, existing: boolean, gitDir: string); +} +export declare function parseInit(bare: boolean, path: string, text: string): InitSummary; diff --git a/Client/node_modules/simple-git/src/lib/responses/InitSummary.js b/Client/node_modules/simple-git/src/lib/responses/InitSummary.js new file mode 100644 index 000000000..c449a211f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/InitSummary.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseInit = exports.InitSummary = void 0; +class InitSummary { + constructor(bare, path, existing, gitDir) { + this.bare = bare; + this.path = path; + this.existing = existing; + this.gitDir = gitDir; + } +} +exports.InitSummary = InitSummary; +const initResponseRegex = /^Init.+ repository in (.+)$/; +const reInitResponseRegex = /^Rein.+ in (.+)$/; +function parseInit(bare, path, text) { + const response = String(text).trim(); + let result; + if ((result = initResponseRegex.exec(response))) { + return new InitSummary(bare, path, false, result[1]); + } + if ((result = reInitResponseRegex.exec(response))) { + return new InitSummary(bare, path, true, result[1]); + } + let gitDir = ''; + const tokens = response.split(' '); + while (tokens.length) { + const token = tokens.shift(); + if (token === 'in') { + gitDir = tokens.join(' '); + break; + } + } + return new InitSummary(bare, path, /^re/i.test(response), gitDir); +} +exports.parseInit = parseInit; +//# sourceMappingURL=InitSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/InitSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/InitSummary.js.map new file mode 100644 index 000000000..2e3768dff --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/InitSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"InitSummary.js","sourceRoot":"","sources":["InitSummary.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IACrB,YACmB,IAAa,EACb,IAAY,EACZ,QAAiB,EACjB,MAAc;QAHd,SAAI,GAAJ,IAAI,CAAS;QACb,SAAI,GAAJ,IAAI,CAAQ;QACZ,aAAQ,GAAR,QAAQ,CAAS;QACjB,WAAM,GAAN,MAAM,CAAQ;IAC9B,CAAC;CACN;AAPD,kCAOC;AAED,MAAM,iBAAiB,GAAG,6BAA6B,CAAC;AACxD,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAE/C,SAAgB,SAAS,CAAC,IAAa,EAAE,IAAY,EAAE,IAAY;IAChE,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IACrC,IAAI,MAAM,CAAC;IAEX,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE;QAC9C,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;KACvD;IAED,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE;QAChD,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;KACtD;IAED,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC,MAAM,EAAE;QACnB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;QAC7B,IAAI,KAAK,KAAK,IAAI,EAAE;YACjB,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC1B,MAAM;SACR;KACH;IAED,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AACrE,CAAC;AAvBD,8BAuBC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/MergeSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/MergeSummary.d.ts new file mode 100644 index 000000000..519e95495 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/MergeSummary.d.ts @@ -0,0 +1,16 @@ +import { MergeConflict, MergeConflictDeletion, MergeDetail, MergeResultStatus } from '../../../typings'; +export declare class MergeSummaryConflict implements MergeConflict { + readonly reason: string; + readonly file: string | null; + readonly meta?: MergeConflictDeletion | undefined; + constructor(reason: string, file?: string | null, meta?: MergeConflictDeletion | undefined); + toString(): string; +} +export declare class MergeSummaryDetail implements MergeDetail { + conflicts: MergeConflict[]; + merges: string[]; + result: MergeResultStatus; + get failed(): boolean; + get reason(): string; + toString(): string; +} diff --git a/Client/node_modules/simple-git/src/lib/responses/MergeSummary.js b/Client/node_modules/simple-git/src/lib/responses/MergeSummary.js new file mode 100644 index 000000000..0bafee292 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/MergeSummary.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MergeSummaryDetail = exports.MergeSummaryConflict = void 0; +class MergeSummaryConflict { + constructor(reason, file = null, meta) { + this.reason = reason; + this.file = file; + this.meta = meta; + } + toString() { + return `${this.file}:${this.reason}`; + } +} +exports.MergeSummaryConflict = MergeSummaryConflict; +class MergeSummaryDetail { + constructor() { + this.conflicts = []; + this.merges = []; + this.result = 'success'; + } + get failed() { + return this.conflicts.length > 0; + } + get reason() { + return this.result; + } + toString() { + if (this.conflicts.length) { + return `CONFLICTS: ${this.conflicts.join(', ')}`; + } + return 'OK'; + } +} +exports.MergeSummaryDetail = MergeSummaryDetail; +//# sourceMappingURL=MergeSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/MergeSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/MergeSummary.js.map new file mode 100644 index 000000000..13eed55e8 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/MergeSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MergeSummary.js","sourceRoot":"","sources":["MergeSummary.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;IAC9B,YACmB,MAAc,EACd,OAAsB,IAAI,EAC1B,IAA4B;QAF5B,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAsB;QAC1B,SAAI,GAAJ,IAAI,CAAwB;IAE/C,CAAC;IAED,QAAQ;QACL,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;IACxC,CAAC;CACH;AAXD,oDAWC;AAED,MAAa,kBAAkB;IAA/B;QACU,cAAS,GAAoB,EAAE,CAAC;QAChC,WAAM,GAAa,EAAE,CAAC;QACtB,WAAM,GAAsB,SAAS,CAAC;IAiBhD,CAAC;IAfE,IAAI,MAAM;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,MAAM;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACtB,CAAC;IAED,QAAQ;QACL,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;YACxB,OAAO,cAAc,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SACnD;QAED,OAAO,IAAI,CAAC;IACf,CAAC;CACH;AApBD,gDAoBC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/PullSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/PullSummary.d.ts new file mode 100644 index 000000000..4e8109f65 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/PullSummary.d.ts @@ -0,0 +1,12 @@ +import { PullDetailFileChanges, PullDetailSummary, PullResult } from '../../../typings'; +export declare class PullSummary implements PullResult { + remoteMessages: { + all: never[]; + }; + created: never[]; + deleted: string[]; + files: string[]; + deletions: PullDetailFileChanges; + insertions: PullDetailFileChanges; + summary: PullDetailSummary; +} diff --git a/Client/node_modules/simple-git/src/lib/responses/PullSummary.js b/Client/node_modules/simple-git/src/lib/responses/PullSummary.js new file mode 100644 index 000000000..875e0dbc0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/PullSummary.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PullSummary = void 0; +class PullSummary { + constructor() { + this.remoteMessages = { + all: [], + }; + this.created = []; + this.deleted = []; + this.files = []; + this.deletions = {}; + this.insertions = {}; + this.summary = { + changes: 0, + deletions: 0, + insertions: 0, + }; + } +} +exports.PullSummary = PullSummary; +//# sourceMappingURL=PullSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/PullSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/PullSummary.js.map new file mode 100644 index 000000000..13168575b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/PullSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PullSummary.js","sourceRoot":"","sources":["PullSummary.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IAAxB;QACU,mBAAc,GAAG;YACrB,GAAG,EAAE,EAAE;SACT,CAAC;QACK,YAAO,GAAG,EAAE,CAAC;QACb,YAAO,GAAa,EAAE,CAAC;QACvB,UAAK,GAAa,EAAE,CAAC;QACrB,cAAS,GAA0B,EAAE,CAAC;QACtC,eAAU,GAA0B,EAAE,CAAC;QACvC,YAAO,GAAsB;YACjC,OAAO,EAAE,CAAC;YACV,SAAS,EAAE,CAAC;YACZ,UAAU,EAAE,CAAC;SACf,CAAC;IACL,CAAC;CAAA;AAdD,kCAcC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/StatusSummary.d.ts b/Client/node_modules/simple-git/src/lib/responses/StatusSummary.d.ts new file mode 100644 index 000000000..f619731d5 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/StatusSummary.d.ts @@ -0,0 +1,39 @@ +import { FileStatusResult, StatusResult, StatusResultRenamed } from '../../../typings'; +/** + * The StatusSummary is returned as a response to getting `git().status()` + */ +export declare class StatusSummary implements StatusResult { + not_added: string[]; + conflicted: string[]; + created: string[]; + deleted: string[]; + modified: string[]; + renamed: StatusResultRenamed[]; + /** + * All files represented as an array of objects containing the `path` and status in `index` and + * in the `working_dir`. + */ + files: FileStatusResult[]; + staged: string[]; + /** + * Number of commits ahead of the tracked branch + */ + ahead: number; + /** + *Number of commits behind the tracked branch + */ + behind: number; + /** + * Name of the current branch + */ + current: string | null; + /** + * Name of the branch being tracked + */ + tracking: string | null; + /** + * Gets whether this StatusSummary represents a clean working branch. + */ + isClean(): boolean; +} +export declare const parseStatusSummary: (text: string) => StatusResult; diff --git a/Client/node_modules/simple-git/src/lib/responses/StatusSummary.js b/Client/node_modules/simple-git/src/lib/responses/StatusSummary.js new file mode 100644 index 000000000..b8a45940f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/StatusSummary.js @@ -0,0 +1,148 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseStatusSummary = exports.StatusSummary = void 0; +const utils_1 = require("../utils"); +const FileStatusSummary_1 = require("./FileStatusSummary"); +/** + * The StatusSummary is returned as a response to getting `git().status()` + */ +class StatusSummary { + constructor() { + this.not_added = []; + this.conflicted = []; + this.created = []; + this.deleted = []; + this.modified = []; + this.renamed = []; + /** + * All files represented as an array of objects containing the `path` and status in `index` and + * in the `working_dir`. + */ + this.files = []; + this.staged = []; + /** + * Number of commits ahead of the tracked branch + */ + this.ahead = 0; + /** + *Number of commits behind the tracked branch + */ + this.behind = 0; + /** + * Name of the current branch + */ + this.current = null; + /** + * Name of the branch being tracked + */ + this.tracking = null; + } + /** + * Gets whether this StatusSummary represents a clean working branch. + */ + isClean() { + return !this.files.length; + } +} +exports.StatusSummary = StatusSummary; +var PorcelainFileStatus; +(function (PorcelainFileStatus) { + PorcelainFileStatus["ADDED"] = "A"; + PorcelainFileStatus["DELETED"] = "D"; + PorcelainFileStatus["MODIFIED"] = "M"; + PorcelainFileStatus["RENAMED"] = "R"; + PorcelainFileStatus["COPIED"] = "C"; + PorcelainFileStatus["UNMERGED"] = "U"; + PorcelainFileStatus["UNTRACKED"] = "?"; + PorcelainFileStatus["IGNORED"] = "!"; + PorcelainFileStatus["NONE"] = " "; +})(PorcelainFileStatus || (PorcelainFileStatus = {})); +function renamedFile(line) { + const detail = /^(.+) -> (.+)$/.exec(line); + if (!detail) { + return { + from: line, to: line + }; + } + return { + from: String(detail[1]), + to: String(detail[2]), + }; +} +function parser(indexX, indexY, handler) { + return [`${indexX}${indexY}`, handler]; +} +function conflicts(indexX, ...indexY) { + return indexY.map(y => parser(indexX, y, (result, file) => utils_1.append(result.conflicted, file))); +} +const parsers = new Map([ + parser(PorcelainFileStatus.NONE, PorcelainFileStatus.ADDED, (result, file) => utils_1.append(result.created, file)), + parser(PorcelainFileStatus.NONE, PorcelainFileStatus.DELETED, (result, file) => utils_1.append(result.deleted, file)), + parser(PorcelainFileStatus.NONE, PorcelainFileStatus.MODIFIED, (result, file) => utils_1.append(result.modified, file)), + parser(PorcelainFileStatus.ADDED, PorcelainFileStatus.NONE, (result, file) => utils_1.append(result.created, file) && utils_1.append(result.staged, file)), + parser(PorcelainFileStatus.ADDED, PorcelainFileStatus.MODIFIED, (result, file) => utils_1.append(result.created, file) && utils_1.append(result.staged, file) && utils_1.append(result.modified, file)), + parser(PorcelainFileStatus.DELETED, PorcelainFileStatus.NONE, (result, file) => utils_1.append(result.deleted, file) && utils_1.append(result.staged, file)), + parser(PorcelainFileStatus.MODIFIED, PorcelainFileStatus.NONE, (result, file) => utils_1.append(result.modified, file) && utils_1.append(result.staged, file)), + parser(PorcelainFileStatus.MODIFIED, PorcelainFileStatus.MODIFIED, (result, file) => utils_1.append(result.modified, file) && utils_1.append(result.staged, file)), + parser(PorcelainFileStatus.RENAMED, PorcelainFileStatus.NONE, (result, file) => { + utils_1.append(result.renamed, renamedFile(file)); + }), + parser(PorcelainFileStatus.RENAMED, PorcelainFileStatus.MODIFIED, (result, file) => { + const renamed = renamedFile(file); + utils_1.append(result.renamed, renamed); + utils_1.append(result.modified, renamed.to); + }), + parser(PorcelainFileStatus.UNTRACKED, PorcelainFileStatus.UNTRACKED, (result, file) => utils_1.append(result.not_added, file)), + ...conflicts(PorcelainFileStatus.ADDED, PorcelainFileStatus.ADDED, PorcelainFileStatus.UNMERGED), + ...conflicts(PorcelainFileStatus.DELETED, PorcelainFileStatus.DELETED, PorcelainFileStatus.UNMERGED), + ...conflicts(PorcelainFileStatus.UNMERGED, PorcelainFileStatus.ADDED, PorcelainFileStatus.DELETED, PorcelainFileStatus.UNMERGED), + ['##', (result, line) => { + const aheadReg = /ahead (\d+)/; + const behindReg = /behind (\d+)/; + const currentReg = /^(.+?(?=(?:\.{3}|\s|$)))/; + const trackingReg = /\.{3}(\S*)/; + const onEmptyBranchReg = /\son\s([\S]+)$/; + let regexResult; + regexResult = aheadReg.exec(line); + result.ahead = regexResult && +regexResult[1] || 0; + regexResult = behindReg.exec(line); + result.behind = regexResult && +regexResult[1] || 0; + regexResult = currentReg.exec(line); + result.current = regexResult && regexResult[1]; + regexResult = trackingReg.exec(line); + result.tracking = regexResult && regexResult[1]; + regexResult = onEmptyBranchReg.exec(line); + result.current = regexResult && regexResult[1] || result.current; + }] +]); +const parseStatusSummary = function (text) { + const lines = text.trim().split('\n'); + const status = new StatusSummary(); + for (let i = 0, l = lines.length; i < l; i++) { + splitLine(status, lines[i]); + } + return status; +}; +exports.parseStatusSummary = parseStatusSummary; +function splitLine(result, lineStr) { + const trimmed = lineStr.trim(); + switch (' ') { + case trimmed.charAt(2): + return data(trimmed.charAt(0), trimmed.charAt(1), trimmed.substr(3)); + case trimmed.charAt(1): + return data(PorcelainFileStatus.NONE, trimmed.charAt(0), trimmed.substr(2)); + default: + return; + } + function data(index, workingDir, path) { + const raw = `${index}${workingDir}`; + const handler = parsers.get(raw); + if (handler) { + handler(result, path); + } + if (raw !== '##') { + result.files.push(new FileStatusSummary_1.FileStatusSummary(path, index, workingDir)); + } + } +} +//# sourceMappingURL=StatusSummary.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/StatusSummary.js.map b/Client/node_modules/simple-git/src/lib/responses/StatusSummary.js.map new file mode 100644 index 000000000..93bd4be40 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/StatusSummary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StatusSummary.js","sourceRoot":"","sources":["StatusSummary.ts"],"names":[],"mappings":";;;AACA,oCAAkC;AAClC,2DAAwD;AAExD;;GAEG;AACH,MAAa,aAAa;IAA1B;QACU,cAAS,GAAa,EAAE,CAAC;QACzB,eAAU,GAAa,EAAE,CAAC;QAC1B,YAAO,GAAa,EAAE,CAAC;QACvB,YAAO,GAAa,EAAE,CAAC;QACvB,aAAQ,GAAa,EAAE,CAAC;QACxB,YAAO,GAA0B,EAAE,CAAC;QAE3C;;;WAGG;QACI,UAAK,GAAuB,EAAE,CAAC;QAC/B,WAAM,GAAa,EAAE,CAAC;QAE7B;;WAEG;QACI,UAAK,GAAG,CAAC,CAAC;QAEjB;;WAEG;QACI,WAAM,GAAG,CAAC,CAAC;QAElB;;WAEG;QACI,YAAO,GAAkB,IAAI,CAAC;QAErC;;WAEG;QACI,aAAQ,GAAkB,IAAI,CAAC;IAQzC,CAAC;IANE;;OAEG;IACI,OAAO;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;CACH;AAzCD,sCAyCC;AAED,IAAK,mBAUJ;AAVD,WAAK,mBAAmB;IACrB,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,qCAAc,CAAA;IACd,oCAAa,CAAA;IACb,mCAAY,CAAA;IACZ,qCAAc,CAAA;IACd,sCAAe,CAAA;IACf,oCAAa,CAAA;IACb,iCAAU,CAAA;AACb,CAAC,EAVI,mBAAmB,KAAnB,mBAAmB,QAUvB;AAED,SAAS,WAAW,CAAC,IAAY;IAC9B,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE3C,IAAI,CAAC,M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OAAe;IACrD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC/B,QAAQ,GAAG,EAAE;QACV,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/E;YACG,OAAO;KACZ;IAED,SAAS,IAAI,CAAC,KAAa,EAAE,UAAkB,EAAE,IAAY;QAC1D,MAAM,GAAG,GAAG,GAAG,KAAK,GAAG,UAAU,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEjC,IAAI,OAAO,EAAE;YACV,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;SACxB;QAED,IAAI,GAAG,KAAK,IAAI,EAAE;YACf,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,qCAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;SACpE;IACJ,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/TagList.d.ts b/Client/node_modules/simple-git/src/lib/responses/TagList.d.ts new file mode 100644 index 000000000..b72180de6 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/TagList.d.ts @@ -0,0 +1,7 @@ +import { TagResult } from '../../../typings'; +export declare class TagList implements TagResult { + readonly all: string[]; + readonly latest: string | undefined; + constructor(all: string[], latest: string | undefined); +} +export declare const parseTagList: (data: string, customSort?: boolean) => TagList; diff --git a/Client/node_modules/simple-git/src/lib/responses/TagList.js b/Client/node_modules/simple-git/src/lib/responses/TagList.js new file mode 100644 index 000000000..ec2ae9e05 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/TagList.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseTagList = exports.TagList = void 0; +class TagList { + constructor(all, latest) { + this.all = all; + this.latest = latest; + } +} +exports.TagList = TagList; +const parseTagList = function (data, customSort = false) { + const tags = data + .split('\n') + .map(trimmed) + .filter(Boolean); + if (!customSort) { + tags.sort(function (tagA, tagB) { + const partsA = tagA.split('.'); + const partsB = tagB.split('.'); + if (partsA.length === 1 || partsB.length === 1) { + return singleSorted(toNumber(partsA[0]), toNumber(partsB[0])); + } + for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) { + const diff = sorted(toNumber(partsA[i]), toNumber(partsB[i])); + if (diff) { + return diff; + } + } + return 0; + }); + } + const latest = customSort ? tags[0] : [...tags].reverse().find((tag) => tag.indexOf('.') >= 0); + return new TagList(tags, latest); +}; +exports.parseTagList = parseTagList; +function singleSorted(a, b) { + const aIsNum = isNaN(a); + const bIsNum = isNaN(b); + if (aIsNum !== bIsNum) { + return aIsNum ? 1 : -1; + } + return aIsNum ? sorted(a, b) : 0; +} +function sorted(a, b) { + return a === b ? 0 : a > b ? 1 : -1; +} +function trimmed(input) { + return input.trim(); +} +function toNumber(input) { + if (typeof input === 'string') { + return parseInt(input.replace(/^\D+/g, ''), 10) || 0; + } + return 0; +} +//# sourceMappingURL=TagList.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/responses/TagList.js.map b/Client/node_modules/simple-git/src/lib/responses/TagList.js.map new file mode 100644 index 000000000..63ade8d52 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/responses/TagList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TagList.js","sourceRoot":"","sources":["TagList.ts"],"names":[],"mappings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client/node_modules/simple-git/src/lib/runners/git-executor-chain.d.ts b/Client/node_modules/simple-git/src/lib/runners/git-executor-chain.d.ts new file mode 100644 index 000000000..d31bc9253 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/git-executor-chain.d.ts @@ -0,0 +1,20 @@ +import { Scheduler } from './scheduler'; +import { outputHandler, SimpleGitExecutor, SimpleGitTask } from '../types'; +export declare class GitExecutorChain implements SimpleGitExecutor { + private _executor; + private _scheduler; + private _chain; + private _queue; + get binary(): string; + get outputHandler(): outputHandler | undefined; + get cwd(): string; + get env(): import("../types").GitExecutorEnv; + constructor(_executor: SimpleGitExecutor, _scheduler: Scheduler); + push(task: SimpleGitTask): Promise; + private attemptTask; + private onFatalException; + private attemptRemoteTask; + private attemptEmptyTask; + private handleTaskData; + private gitResponse; +} diff --git a/Client/node_modules/simple-git/src/lib/runners/git-executor-chain.js b/Client/node_modules/simple-git/src/lib/runners/git-executor-chain.js new file mode 100644 index 000000000..422395a45 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/git-executor-chain.js @@ -0,0 +1,169 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GitExecutorChain = void 0; +const child_process_1 = require("child_process"); +const api_1 = require("../api"); +const task_1 = require("../tasks/task"); +const tasks_pending_queue_1 = require("./tasks-pending-queue"); +const utils_1 = require("../utils"); +class GitExecutorChain { + constructor(_executor, _scheduler) { + this._executor = _executor; + this._scheduler = _scheduler; + this._chain = Promise.resolve(); + this._queue = new tasks_pending_queue_1.TasksPendingQueue(); + } + get binary() { + return this._executor.binary; + } + get outputHandler() { + return this._executor.outputHandler; + } + get cwd() { + return this._executor.cwd; + } + get env() { + return this._executor.env; + } + push(task) { + this._queue.push(task); + return this._chain = this._chain.then(() => this.attemptTask(task)); + } + attemptTask(task) { + return __awaiter(this, void 0, void 0, function* () { + const onScheduleComplete = yield this._scheduler.next(); + const onQueueComplete = () => this._queue.complete(task); + try { + const { logger } = this._queue.attempt(task); + return yield (task_1.isEmptyTask(task) + ? this.attemptEmptyTask(task, logger) + : this.attemptRemoteTask(task, logger)); + } + catch (e) { + throw this.onFatalException(task, e); + } + finally { + onQueueComplete(); + onScheduleComplete(); + } + }); + } + onFatalException(task, e) { + const gitError = (e instanceof api_1.GitError) ? Object.assign(e, { task }) : new api_1.GitError(task, e && String(e)); + this._chain = Promise.resolve(); + this._queue.fatal(gitError); + return gitError; + } + attemptRemoteTask(task, logger) { + return __awaiter(this, void 0, void 0, function* () { + const raw = yield this.gitResponse(this.binary, task.commands, this.outputHandler, logger.step('SPAWN')); + const outputStreams = yield this.handleTaskData(task, raw, logger.step('HANDLE')); + logger(`passing response to task's parser as a %s`, task.format); + if (task_1.isBufferTask(task)) { + return utils_1.callTaskParser(task.parser, outputStreams); + } + return utils_1.callTaskParser(task.parser, outputStreams.asStrings()); + }); + } + attemptEmptyTask(task, logger) { + return __awaiter(this, void 0, void 0, function* () { + logger(`empty task bypassing child process to call to task's parser`); + return task.parser(); + }); + } + handleTaskData({ onError, concatStdErr }, { exitCode, stdOut, stdErr }, logger) { + return new Promise((done, fail) => { + logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode); + if (exitCode && stdErr.length && onError) { + logger.info(`exitCode=%s handling with custom error handler`); + logger(`concatenate stdErr to stdOut: %j`, concatStdErr); + return onError(exitCode, Buffer.concat([...(concatStdErr ? stdOut : []), ...stdErr]).toString('utf-8'), (result) => { + logger.info(`custom error handler treated as success`); + logger(`custom error returned a %s`, utils_1.objectToString(result)); + done(new utils_1.GitOutputStreams(Buffer.isBuffer(result) ? result : Buffer.from(String(result)), Buffer.concat(stdErr))); + }, fail); + } + if (exitCode && stdErr.length) { + logger.info(`exitCode=%s treated as error when then child process has written to stdErr`); + return fail(Buffer.concat(stdErr).toString('utf-8')); + } + if (concatStdErr) { + logger(`concatenating stdErr onto stdOut before processing`); + logger(`stdErr: $O`, stdErr); + stdOut.push(...stdErr); + } + logger.info(`retrieving task output complete`); + done(new utils_1.GitOutputStreams(Buffer.concat(stdOut), Buffer.concat(stdErr))); + }); + } + gitResponse(command, args, outputHandler, logger) { + return __awaiter(this, void 0, void 0, function* () { + const outputLogger = logger.sibling('output'); + const spawnOptions = { + cwd: this.cwd, + env: this.env, + windowsHide: true, + }; + return new Promise((done) => { + const stdOut = []; + const stdErr = []; + let attempted = false; + function attemptClose(exitCode, event = 'retry') { + // closing when there is content, terminate immediately + if (attempted || stdErr.length || stdOut.length) { + logger.info(`exitCode=%s event=%s`, exitCode, event); + done({ + stdOut, + stdErr, + exitCode, + }); + attempted = true; + outputLogger.destroy(); + } + // first attempt at closing but no content yet, wait briefly for the close/exit that may follow + if (!attempted) { + attempted = true; + setTimeout(() => attemptClose(exitCode, 'deferred'), 50); + logger('received %s event before content on stdOut/stdErr', event); + } + } + logger.info(`%s %o`, command, args); + logger('%O', spawnOptions); + const spawned = child_process_1.spawn(command, args, spawnOptions); + spawned.stdout.on('data', onDataReceived(stdOut, 'stdOut', logger, outputLogger.step('stdOut'))); + spawned.stderr.on('data', onDataReceived(stdErr, 'stdErr', logger, outputLogger.step('stdErr'))); + spawned.on('error', onErrorReceived(stdErr, logger)); + spawned.on('close', (code) => attemptClose(code, 'close')); + spawned.on('exit', (code) => attemptClose(code, 'exit')); + if (outputHandler) { + logger(`Passing child process stdOut/stdErr to custom outputHandler`); + outputHandler(command, spawned.stdout, spawned.stderr, [...args]); + } + }); + }); + } +} +exports.GitExecutorChain = GitExecutorChain; +function onErrorReceived(target, logger) { + return (err) => { + logger(`[ERROR] child process exception %o`, err); + target.push(Buffer.from(String(err.stack), 'ascii')); + }; +} +function onDataReceived(target, name, logger, output) { + return (buffer) => { + logger(`%s received %L bytes`, name, buffer); + output(`%B`, buffer); + target.push(buffer); + }; +} +//# sourceMappingURL=git-executor-chain.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/runners/git-executor-chain.js.map b/Client/node_modules/simple-git/src/lib/runners/git-executor-chain.js.map new file mode 100644 index 000000000..ecad1c2ce --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/git-executor-chain.js.map @@ -0,0 +1 @@ +{"version":3,"file":"git-executor-chain.js","sourceRoot":"","sources":["git-executor-chain.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAoD;AACpD,gCAAkC;AAElC,wCAAsE;AAEtE,+DAA0D;AAU1D,oCAA4E;AAE5E,MAAa,gBAAgB;IAqB1B,YAAoB,SAA4B,EAAU,UAAqB;QAA3D,cAAS,GAAT,SAAS,CAAmB;QAAU,eAAU,GAAV,UAAU,CAAW;QAnBvE,WAAM,GAAiB,OAAO,CAAC,OAAO,EAAE,CAAC;QACzC,WAAM,GAAG,IAAI,uCAAiB,EAAE,CAAC;IAmBzC,CAAC;IAjBD,IAAW,MAAM;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;IAChC,CAAC;IAED,IAAW,aAAa;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;IACvC,CAAC;IAED,IAAW,GAAG;QACX,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;IAC7B,CAAC;IAED,IAAW,GAAG;QACX,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;IAC7B,CAAC;IAKM,IAAI,CAAI,IAAsB;QAClC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEvB,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GA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AAE;QACvB,MAAM,CAAC,sBAAsB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC7C,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACtB,CAAC,CAAA;AACJ,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/runners/git-executor.d.ts b/Client/node_modules/simple-git/src/lib/runners/git-executor.d.ts new file mode 100644 index 000000000..1d25ec474 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/git-executor.d.ts @@ -0,0 +1,13 @@ +import { GitExecutorEnv, outputHandler, SimpleGitExecutor, SimpleGitTask } from '../types'; +import { Scheduler } from './scheduler'; +export declare class GitExecutor implements SimpleGitExecutor { + binary: string; + cwd: string; + private _scheduler; + private _chain; + env: GitExecutorEnv; + outputHandler?: outputHandler; + constructor(binary: string, cwd: string, _scheduler: Scheduler); + chain(): SimpleGitExecutor; + push(task: SimpleGitTask): Promise; +} diff --git a/Client/node_modules/simple-git/src/lib/runners/git-executor.js b/Client/node_modules/simple-git/src/lib/runners/git-executor.js new file mode 100644 index 000000000..417ad208c --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/git-executor.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GitExecutor = void 0; +const git_executor_chain_1 = require("./git-executor-chain"); +class GitExecutor { + constructor(binary = 'git', cwd, _scheduler) { + this.binary = binary; + this.cwd = cwd; + this._scheduler = _scheduler; + this._chain = new git_executor_chain_1.GitExecutorChain(this, this._scheduler); + } + chain() { + return new git_executor_chain_1.GitExecutorChain(this, this._scheduler); + } + push(task) { + return this._chain.push(task); + } +} +exports.GitExecutor = GitExecutor; +//# sourceMappingURL=git-executor.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/runners/git-executor.js.map b/Client/node_modules/simple-git/src/lib/runners/git-executor.js.map new file mode 100644 index 000000000..e2139b41d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/git-executor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"git-executor.js","sourceRoot":"","sources":["git-executor.ts"],"names":[],"mappings":";;;AACA,6DAAwD;AAGxD,MAAa,WAAW;IAOrB,YACU,SAAiB,KAAK,EACtB,GAAW,EACV,UAAqB;QAFtB,WAAM,GAAN,MAAM,CAAgB;QACtB,QAAG,GAAH,GAAG,CAAQ;QACV,eAAU,GAAV,UAAU,CAAW;QARxB,WAAM,GAAG,IAAI,qCAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAU7D,CAAC;IAED,KAAK;QACF,OAAO,IAAI,qCAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,CAAI,IAAsB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CAEH;AAtBD,kCAsBC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.d.ts b/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.d.ts new file mode 100644 index 000000000..4f8d69440 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.d.ts @@ -0,0 +1,2 @@ +import { SimpleGit, SimpleGitOptions } from '../../../typings'; +export declare function gitP(...args: [] | [string] | [Partial] | [string, Partial]): SimpleGit; diff --git a/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.js b/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.js new file mode 100644 index 000000000..c9923cb4f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.js @@ -0,0 +1,133 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.gitP = void 0; +const git_response_error_1 = require("../errors/git-response-error"); +const functionNamesBuilderApi = [ + 'customBinary', 'env', 'outputHandler', 'silent', +]; +const functionNamesPromiseApi = [ + 'add', + 'addAnnotatedTag', + 'addConfig', + 'addRemote', + 'addTag', + 'applyPatch', + 'binaryCatFile', + 'branch', + 'branchLocal', + 'catFile', + 'checkIgnore', + 'checkIsRepo', + 'checkout', + 'checkoutBranch', + 'checkoutLatestTag', + 'checkoutLocalBranch', + 'clean', + 'clone', + 'commit', + 'cwd', + 'deleteLocalBranch', + 'deleteLocalBranches', + 'diff', + 'diffSummary', + 'exec', + 'fetch', + 'getRemotes', + 'init', + 'listConfig', + 'listRemote', + 'log', + 'merge', + 'mergeFromTo', + 'mirror', + 'mv', + 'pull', + 'push', + 'pushTags', + 'raw', + 'rebase', + 'remote', + 'removeRemote', + 'reset', + 'revert', + 'revparse', + 'rm', + 'rmKeepLocal', + 'show', + 'stash', + 'stashList', + 'status', + 'subModule', + 'submoduleAdd', + 'submoduleInit', + 'submoduleUpdate', + 'tag', + 'tags', + 'updateServerInfo' +]; +const { gitInstanceFactory } = require('../../git-factory'); +function gitP(...args) { + let git; + let chain = Promise.resolve(); + try { + git = gitInstanceFactory(...args); + } + catch (e) { + chain = Promise.reject(e); + } + function builderReturn() { + return promiseApi; + } + function chainReturn() { + return chain; + } + const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce((api, name) => { + const isAsync = functionNamesPromiseApi.includes(name); + const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api); + const alternative = isAsync ? chainReturn : builderReturn; + Object.defineProperty(api, name, { + enumerable: false, + configurable: false, + value: git ? valid : alternative, + }); + return api; + }, {}); + return promiseApi; + function asyncWrapper(fn, git) { + return function (...args) { + if (typeof args[args.length] === 'function') { + throw new TypeError('Promise interface requires that handlers are not supplied inline, ' + + 'trailing function not allowed in call to ' + fn); + } + return chain.then(function () { + return new Promise(function (resolve, reject) { + const callback = (err, result) => { + if (err) { + return reject(toError(err)); + } + resolve(result); + }; + args.push(callback); + git[fn].apply(git, args); + }); + }); + }; + } + function syncWrapper(fn, git, api) { + return (...args) => { + git[fn](...args); + return api; + }; + } +} +exports.gitP = gitP; +function toError(error) { + if (error instanceof Error) { + return error; + } + if (typeof error === 'string') { + return new Error(error); + } + return new git_response_error_1.GitResponseError(error); +} +//# sourceMappingURL=promise-wrapped.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.js.map b/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.js.map new file mode 100644 index 000000000..4e7078caf --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/promise-wrapped.js.map @@ -0,0 +1 @@ +{"version":3,"file":"promise-wrapped.js","sourceRoot":"","sources":["promise-wrapped.ts"],"names":[],"mappings":";;;AACA,qEAAgE;AAGhE,MAAM,uBAAuB,GAAG;IAC7B,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ;CAClD,CAAC;AAEF,MAAM,uBAAuB,GAAG;IAC7B,KAAK;IACL,iBAAiB;IACjB,WAAW;IACX,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,eAAe;IACf,QAAQ;IACR,aAAa;IACb,SAAS;IACT,aAAa;IACb,aAAa;IACb,UAAU;IACV,gBAAgB;IAChB,mBAAmB;IACnB,qBAAqB;IACrB,OAAO;IACP,OAAO;IACP,QAAQ;IACR,KAAK;IACL,mBAAmB;IACnB,qBAAqB;IACrB,MAAM;IACN,aAAa;IACb,MAAM;IACN,OAAO;IACP,YAAY;IACZ,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,KAAK;IACL,OAAO;IACP,aAAa;IACb,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,UAAU;IACV,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,cAAc;IACd,OAAO;IACP,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,aAAa;IACb,MAAM;IACN,OAAO;IACP,WAAW;IACX,QAAQ;IACR,WAAW;IACX,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,KAAK;IACL,MAAM;IACN,kBAAkB;CACpB,CAAC;AAEF,MAAM,E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node_modules/simple-git/src/lib/runners/scheduler.d.ts new file mode 100644 index 000000000..eacd8706e --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/scheduler.d.ts @@ -0,0 +1,10 @@ +declare type ScheduleCompleteCallback = () => void; +export declare class Scheduler { + private concurrency; + private pending; + private running; + constructor(concurrency?: number); + private schedule; + next(): Promise; +} +export {}; diff --git a/Client/node_modules/simple-git/src/lib/runners/scheduler.js b/Client/node_modules/simple-git/src/lib/runners/scheduler.js new file mode 100644 index 000000000..3def35ff8 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/scheduler.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Scheduler = void 0; +const utils_1 = require("../utils"); +const promise_deferred_1 = require("@kwsites/promise-deferred"); +const git_logger_1 = require("../git-logger"); +const logger = git_logger_1.createLogger('', 'scheduler'); +const createScheduledTask = (() => { + let id = 0; + return () => { + id++; + const { promise, done } = promise_deferred_1.createDeferred(); + return { + promise, + done, + id, + }; + }; +})(); +class Scheduler { + constructor(concurrency = 2) { + this.concurrency = concurrency; + this.pending = []; + this.running = []; + logger(`Constructed, concurrency=%s`, concurrency); + } + schedule() { + if (!this.pending.length || this.running.length >= this.concurrency) { + logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`, this.pending.length, this.running.length, this.concurrency); + return; + } + const task = utils_1.append(this.running, this.pending.shift()); + logger(`Attempting id=%s`, task.id); + task.done(() => { + logger(`Completing id=`, task.id); + utils_1.remove(this.running, task); + this.schedule(); + }); + } + next() { + const { promise, id } = utils_1.append(this.pending, createScheduledTask()); + logger(`Scheduling id=%s`, id); + this.schedule(); + return promise; + } +} +exports.Scheduler = Scheduler; +//# sourceMappingURL=scheduler.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/runners/scheduler.js.map b/Client/node_modules/simple-git/src/lib/runners/scheduler.js.map new file mode 100644 index 000000000..7e90f93bd --- /dev/null +++ b/Client/node_modules/simple-git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AAgB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;YAClC,cAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACN,CAAC;IAED,IAAI;QACD,MAAM,EAAC,OAAO,EAAE,EAAE,EAAC,GAAG,cAAM,CAAC,IAAI,CAAC,OAAO,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAClE,MAAM,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;QAE/B,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEhB,OAAO,OAAO,CAAC;IAClB,CAAC;CACH;AA/BD,8BA+BC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.d.ts b/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.d.ts new file mode 100644 index 000000000..2ca7fc0e1 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.d.ts @@ -0,0 +1,23 @@ +import { SimpleGitTask } from '../types'; +import { OutputLogger } from '../git-logger'; +import { GitError } from '../api'; +declare type AnySimpleGitTask = SimpleGitTask; +declare type TaskInProgress = { + name: string; + logger: OutputLogger; + task: AnySimpleGitTask; +}; +export declare class TasksPendingQueue { + private logLabel; + private _queue; + constructor(logLabel?: string); + private withProgress; + private createProgress; + push(task: AnySimpleGitTask): TaskInProgress; + fatal(err: GitError): void; + complete(task: AnySimpleGitTask): void; + attempt(task: AnySimpleGitTask): TaskInProgress; + static getName(name?: string): string; + private static counter; +} +export {}; diff --git a/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js b/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js new file mode 100644 index 000000000..03d10b110 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TasksPendingQueue = void 0; +const git_logger_1 = require("../git-logger"); +const api_1 = require("../api"); +class TasksPendingQueue { + constructor(logLabel = 'GitExecutor') { + this.logLabel = logLabel; + this._queue = new Map(); + } + withProgress(task) { + return this._queue.get(task); + } + createProgress(task) { + const name = TasksPendingQueue.getName(task.commands[0]); + const logger = git_logger_1.createLogger(this.logLabel, name); + return { + task, + logger, + name, + }; + } + push(task) { + const progress = this.createProgress(task); + progress.logger('Adding task to the queue, commands = %o', task.commands); + this._queue.set(task, progress); + return progress; + } + fatal(err) { + for (const [task, { logger }] of Array.from(this._queue.entries())) { + if (task === err.task) { + logger.info(`Failed %o`, err); + logger(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`); + } + else { + logger.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`, err.message); + } + this.complete(task); + } + if (this._queue.size !== 0) { + throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`); + } + } + complete(task) { + const progress = this.withProgress(task); + if (progress) { + progress.logger.destroy(); + this._queue.delete(task); + } + } + attempt(task) { + const progress = this.withProgress(task); + if (!progress) { + throw new api_1.GitError(undefined, 'TasksPendingQueue: attempt called for an unknown task'); + } + progress.logger('Starting task'); + return progress; + } + static getName(name = 'empty') { + return `task:${name}:${++TasksPendingQueue.counter}`; + } +} +exports.TasksPendingQueue = TasksPendingQueue; +TasksPendingQueue.counter = 0; +//# sourceMappingURL=tasks-pending-queue.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js.map b/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js.map new file mode 100644 index 000000000..35f0b6de6 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tasks-pending-queue.js","sourceRoot":"","sources":["tasks-pending-queue.ts"],"names":[],"mappings":";;;AACA,8CAA2D;AAC3D,gCAAkC;AAUlC,MAAa,iBAAiB;IAI3B,YAAoB,WAAW,aAAa;QAAxB,aAAQ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AM,CAAC,IAAI,KAAK,CAAC,EAAE;YACzB,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;SAChF;IACJ,CAAC;IAED,QAAQ,CAAC,IAAsB;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,QAAQ,EAAE;YACX,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAC3B;IACJ,CAAC;IAED,OAAO,CAAC,IAAsB;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,EAAE;YACZ,MAAM,IAAI,cAAQ,CAAC,SAAS,EAAE,uDAAuD,CAAC,CAAC;SACzF;QACD,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAEjC,OAAO,QAAQ,CAAC;IACnB,CAAC;IAED,MAAM,CAAC,OAAO,CAAE,IAAI,GAAG,OAAO;QAC3B,OAAO,QAAQ,IAAI,IAAI,EAAE,iBAAiB,CAAC,OAAO,EAAE,CAAC;IACxD,CAAC;;AApEJ,8CAuEC;AADiB,yBAAO,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/task-callback.d.ts b/Client/node_modules/simple-git/src/lib/task-callback.d.ts new file mode 100644 index 000000000..dda89af48 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/task-callback.d.ts @@ -0,0 +1,2 @@ +import { SimpleGitTask, SimpleGitTaskCallback } from './types'; +export declare function taskCallback(task: SimpleGitTask, response: Promise, callback?: SimpleGitTaskCallback): void; diff --git a/Client/node_modules/simple-git/src/lib/task-callback.js b/Client/node_modules/simple-git/src/lib/task-callback.js new file mode 100644 index 000000000..e98633dc0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/task-callback.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.taskCallback = void 0; +const api_1 = require("./api"); +const utils_1 = require("./utils"); +function taskCallback(task, response, callback = utils_1.NOOP) { + const onSuccess = (data) => { + callback(null, data); + }; + const onError = (err) => { + if ((err === null || err === void 0 ? void 0 : err.task) === task) { + if (err instanceof api_1.GitResponseError) { + return callback(addDeprecationNoticeToError(err)); + } + callback(err); + } + }; + response.then(onSuccess, onError); +} +exports.taskCallback = taskCallback; +function addDeprecationNoticeToError(err) { + let log = (name) => { + console.warn(`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`); + log = utils_1.NOOP; + }; + return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {})); + function descriptorReducer(all, name) { + if (name in err) { + return all; + } + all[name] = { + enumerable: false, + configurable: false, + get() { + log(name); + return err.git[name]; + }, + }; + return all; + } +} +//# sourceMappingURL=task-callback.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/task-callback.js.map b/Client/node_modules/simple-git/src/lib/task-callback.js.map new file mode 100644 index 000000000..44841b522 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/task-callback.js.map @@ -0,0 +1 @@ +{"version":3,"file":"task-callback.js","sourceRoot":"","sources":["task-callback.ts"],"names":[],"mappings":";;;AAAA,+BAAmD;AAEnD,mCAA+B;AAE/B,SAAgB,YAAY,CAAI,IAAsB,EAAE,QAAoB,EAAE,WAAqC,YAAI;IAEpH,MAAM,SAAS,GAAG,CAAC,IAAO,EAAE,EAAE;QAC3B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,CAAC,GAAgC,EAAE,EAAE;QAClD,IAAI,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,MAAK,IAAI,EAAE;YACrB,IAAI,GAAG,YAAY,sBAAgB,EAAE;gBAClC,OAAO,QAAQ,CAAC,2BAA2B,CAAC,GAAG,CAAC,CAAC,CAAC;aACpD;YACD,QAAQ,CAAC,GAAG,CAAC,CAAC;SAChB;IACJ,CAAC,CAAC;IAEF,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAErC,CAAC;AAjBD,oCAiBC;AAED,SAAS,2BAA2B,CAAE,GAAqB;IACxD,IAAI,GAAG,GAAG,CAAC,IAAY,EAAE,EAAE;QACxB,OAAO,CAAC,IAAI,CAAC,6DAA6D,IAAI,mCAAmC,IAAI,iDAAiD,CAAC,CAAC;QACxK,GAAG,GAAG,YAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,CAAC;IAE7F,SAAS,iBAAiB,CAAC,GAA0B,EAAE,IAAY;QAChE,IAAI,IAAI,IAAI,GAAG,EAAE;YACd,OAAO,GAAG,CAAC;SACb;QAED,GAAG,CAAC,IAAI,CAAC,GAAG;YACT,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,KAAK;YACnB,GAAG;gBACA,GAAG,CAAC,IAAI,CAAC,CAAC;gBACV,OAAO,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;SACH,CAAC;QAEF,OAAO,GAAG,CAAC;IACd,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/apply-patch.d.ts b/Client/node_modules/simple-git/src/lib/tasks/apply-patch.d.ts new file mode 100644 index 000000000..c1e155139 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/apply-patch.d.ts @@ -0,0 +1,3 @@ +import { OptionFlags, Options, StringTask } from '../types'; +export declare type ApplyOptions = Options & OptionFlags<'--stat' | '--numstat' | '--summary' | '--check' | '--index' | '--intent-to-add' | '--3way' | '--apply' | '--no-add' | '-R' | '--reverse' | '--allow-binary-replacement' | '--binary' | '--reject' | '-z' | '--inaccurate-eof' | '--recount' | '--cached' | '--ignore-space-change' | '--ignore-whitespace' | '--verbose' | '--unsafe-paths'> & OptionFlags<'--whitespace', 'nowarn' | 'warn' | 'fix' | 'error' | 'error-all'> & OptionFlags<'--build-fake-ancestor' | '--exclude' | '--include' | '--directory', string> & OptionFlags<'-p' | '-C', number>; +export declare function applyPatchTask(patches: string[], customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/apply-patch.js b/Client/node_modules/simple-git/src/lib/tasks/apply-patch.js new file mode 100644 index 000000000..078b86d55 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/apply-patch.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.applyPatchTask = void 0; +const task_1 = require("./task"); +function applyPatchTask(patches, customArgs) { + return task_1.straightThroughStringTask(['apply', ...customArgs, ...patches]); +} +exports.applyPatchTask = applyPatchTask; +//# sourceMappingURL=apply-patch.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/apply-patch.js.map b/Client/node_modules/simple-git/src/lib/tasks/apply-patch.js.map new file mode 100644 index 000000000..04b89d4a0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/apply-patch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"apply-patch.js","sourceRoot":"","sources":["apply-patch.ts"],"names":[],"mappings":";;;AAAA,iCAAmD;AAkCnD,SAAgB,cAAc,CAAC,OAAiB,EAAE,UAAoB;IACnE,OAAO,gCAAyB,CAAC,CAAC,OAAO,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;AAC1E,CAAC;AAFD,wCAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/branch.d.ts b/Client/node_modules/simple-git/src/lib/tasks/branch.d.ts new file mode 100644 index 000000000..157b2aebd --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/branch.d.ts @@ -0,0 +1,7 @@ +import { BranchMultiDeleteResult, BranchSingleDeleteResult, BranchSummary } from '../../../typings'; +import { StringTask } from '../types'; +export declare function containsDeleteBranchCommand(commands: string[]): boolean; +export declare function branchTask(customArgs: string[]): StringTask; +export declare function branchLocalTask(): StringTask; +export declare function deleteBranchesTask(branches: string[], forceDelete?: boolean): StringTask; +export declare function deleteBranchTask(branch: string, forceDelete?: boolean): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/branch.js b/Client/node_modules/simple-git/src/lib/tasks/branch.js new file mode 100644 index 000000000..a7e002620 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/branch.js @@ -0,0 +1,77 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.deleteBranchTask = exports.deleteBranchesTask = exports.branchLocalTask = exports.branchTask = exports.containsDeleteBranchCommand = void 0; +const git_response_error_1 = require("../errors/git-response-error"); +const parse_branch_delete_1 = require("../parsers/parse-branch-delete"); +const parse_branch_1 = require("../parsers/parse-branch"); +function containsDeleteBranchCommand(commands) { + const deleteCommands = ['-d', '-D', '--delete']; + return commands.some(command => deleteCommands.includes(command)); +} +exports.containsDeleteBranchCommand = containsDeleteBranchCommand; +function branchTask(customArgs) { + const isDelete = containsDeleteBranchCommand(customArgs); + const commands = ['branch', ...customArgs]; + if (commands.length === 1) { + commands.push('-a'); + } + if (!commands.includes('-v')) { + commands.splice(1, 0, '-v'); + } + return { + format: 'utf-8', + commands, + parser(stdOut, stdErr) { + if (isDelete) { + return parse_branch_delete_1.parseBranchDeletions(stdOut, stdErr).all[0]; + } + return parse_branch_1.parseBranchSummary(stdOut); + }, + }; +} +exports.branchTask = branchTask; +function branchLocalTask() { + const parser = parse_branch_1.parseBranchSummary; + return { + format: 'utf-8', + commands: ['branch', '-v'], + parser, + }; +} +exports.branchLocalTask = branchLocalTask; +function deleteBranchesTask(branches, forceDelete = false) { + return { + format: 'utf-8', + commands: ['branch', '-v', forceDelete ? '-D' : '-d', ...branches], + parser(stdOut, stdErr) { + return parse_branch_delete_1.parseBranchDeletions(stdOut, stdErr); + }, + onError(exitCode, error, done, fail) { + if (!parse_branch_delete_1.hasBranchDeletionError(error, exitCode)) { + return fail(error); + } + done(error); + }, + concatStdErr: true, + }; +} +exports.deleteBranchesTask = deleteBranchesTask; +function deleteBranchTask(branch, forceDelete = false) { + const task = { + format: 'utf-8', + commands: ['branch', '-v', forceDelete ? '-D' : '-d', branch], + parser(stdOut, stdErr) { + return parse_branch_delete_1.parseBranchDeletions(stdOut, stdErr).branches[branch]; + }, + onError(exitCode, error, _, fail) { + if (!parse_branch_delete_1.hasBranchDeletionError(error, exitCode)) { + return fail(error); + } + throw new git_response_error_1.GitResponseError(task.parser(error, ''), error); + }, + concatStdErr: true, + }; + return task; +} +exports.deleteBranchTask = deleteBranchTask; +//# sourceMappingURL=branch.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/branch.js.map b/Client/node_modules/simple-git/src/lib/tasks/branch.js.map new file mode 100644 index 000000000..3dbf7a8e0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/branch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"branch.js","sourceRoot":"","sources":["branch.ts"],"names":[],"mappings":";;;AAEA,qEAAgE;AAChE,wEAA8F;AAC9F,0DAA6D;AAE7D,SAAgB,2BAA2B,CAAC,QAAkB;IAC3D,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAChD,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC;AAHD,kEAGC;AAED,SAAgB,UAAU,CAAC,UAAoB;IAC5C,MAAM,QAAQ,GAAG,2BAA2B,CAAC,UAAU,CAAC,CA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,EAAE,QAAQ,CAAC,EAAE;gBAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;aACrB;YAED,IAAI,CAAC,KAAK,CAAC,CAAC;QACf,CAAC;QACD,YAAY,EAAE,IAAI;KACpB,CAAA;AACJ,CAAC;AAhBD,gDAgBC;AAED,SAAgB,gBAAgB,CAAC,MAAc,EAAE,WAAW,GAAG,KAAK;IACjE,MAAM,IAAI,GAAyC;QAChD,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC;QAC7D,MAAM,CAAC,MAAM,EAAE,MAAM;YAClB,OAAO,0CAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAE,CAAC;QACjE,CAAC;QACD,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI;YAC7B,IAAI,CAAC,4CAAsB,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE;gBAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;aACrB;YAED,MAAM,IAAI,qCAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;QAC7D,CAAC;QACD,YAAY,EAAE,IAAI;KACpB,CAAC;IAEF,OAAO,IAAI,CAAC;AACf,CAAC;AAlBD,4CAkBC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.d.ts b/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.d.ts new file mode 100644 index 000000000..580846fac --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.d.ts @@ -0,0 +1,9 @@ +import { Maybe, StringTask } from '../types'; +export declare enum CheckRepoActions { + BARE = "bare", + IN_TREE = "tree", + IS_REPO_ROOT = "root" +} +export declare function checkIsRepoTask(action: Maybe): StringTask; +export declare function checkIsRepoRootTask(): StringTask; +export declare function checkIsBareRepoTask(): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.js b/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.js new file mode 100644 index 000000000..b503a354d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkIsBareRepoTask = exports.checkIsRepoRootTask = exports.checkIsRepoTask = exports.CheckRepoActions = void 0; +const utils_1 = require("../utils"); +var CheckRepoActions; +(function (CheckRepoActions) { + CheckRepoActions["BARE"] = "bare"; + CheckRepoActions["IN_TREE"] = "tree"; + CheckRepoActions["IS_REPO_ROOT"] = "root"; +})(CheckRepoActions = exports.CheckRepoActions || (exports.CheckRepoActions = {})); +const onError = (exitCode, stdErr, done, fail) => { + if (exitCode === utils_1.ExitCodes.UNCLEAN && isNotRepoMessage(stdErr)) { + return done('false'); + } + fail(stdErr); +}; +const parser = (text) => { + return text.trim() === 'true'; +}; +function checkIsRepoTask(action) { + switch (action) { + case CheckRepoActions.BARE: + return checkIsBareRepoTask(); + case CheckRepoActions.IS_REPO_ROOT: + return checkIsRepoRootTask(); + } + const commands = ['rev-parse', '--is-inside-work-tree']; + return { + commands, + format: 'utf-8', + onError, + parser, + }; +} +exports.checkIsRepoTask = checkIsRepoTask; +function checkIsRepoRootTask() { + const commands = ['rev-parse', '--git-dir']; + return { + commands, + format: 'utf-8', + onError, + parser(path) { + return /^\.(git)?$/.test(path.trim()); + }, + }; +} +exports.checkIsRepoRootTask = checkIsRepoRootTask; +function checkIsBareRepoTask() { + const commands = ['rev-parse', '--is-bare-repository']; + return { + commands, + format: 'utf-8', + onError, + parser, + }; +} +exports.checkIsBareRepoTask = checkIsBareRepoTask; +function isNotRepoMessage(message) { + return /(Not a git repository|Kein Git-Repository)/i.test(message); +} +//# sourceMappingURL=check-is-repo.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.js.map b/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.js.map new file mode 100644 index 000000000..b6a4f4c53 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/check-is-repo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"check-is-repo.js","sourceRoot":"","sources":["check-is-repo.ts"],"names":[],"mappings":";;;AAAA,oCAAqC;AAGrC,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACzB,iCAAa,CAAA;IACb,oCAAgB,CAAA;IAChB,yCAAqB,CAAA;AACxB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,MAAM,OAAO,GAAmC,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAC9E,IAAI,QAAQ,KAAK,iBAAS,CAAC,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;KACvB;IAED,IAAI,CAAC,MAAM,CAAC,CAAC;AAChB,CAAC,CAAA;AAED,MAAM,MAAM,GAAkC,CAAC,IAAI,EAAE,EAAE;IACpD,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,MAAM,CAAC;AACjC,CAAC,CAAA;AAED,SAAgB,eAAe,CAAC,MAA+B;IAC5D,QAAQ,MAAM,EAAE;QACb,KAAK,gBAAgB,CAAC,IAAI;YACvB,OAAO,mBAAmB,EAAE,CAAC;QAChC,KAAK,gBAAgB,CAAC,YAAY;YAC/B,OAAO,mBAAmB,EAAE,CAAC;KAClC;IAED,MAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC;IAExD,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,OAAO;QACP,MAAM;KACR,CAAA;AACJ,CAAC;AAhBD,0CAgBC;AAGD,SAAgB,mBAAmB;IAChC,MAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAE5C,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,OAAO;QACP,MAAM,CAAC,IAAI;YACR,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;KACH,CAAA;AACJ,CAAC;AAXD,kDAWC;AAGD,SAAgB,mBAAmB;IAChC,MAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;IAEvD,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,OAAO;QACP,MAAM;KACR,CAAA;AACJ,CAAC;AATD,kDASC;AAGD,SAAS,gBAAgB,CAAC,OAAe;IACtC,OAAO,6CAA6C,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACtE,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/clean.d.ts b/Client/node_modules/simple-git/src/lib/tasks/clean.d.ts new file mode 100644 index 000000000..f87e593d7 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/clean.d.ts @@ -0,0 +1,25 @@ +import { CleanSummary } from '../../../typings'; +import { StringTask } from '../types'; +export declare const CONFIG_ERROR_INTERACTIVE_MODE = "Git clean interactive mode is not supported"; +export declare const CONFIG_ERROR_MODE_REQUIRED = "Git clean mode parameter (\"n\" or \"f\") is required"; +export declare const CONFIG_ERROR_UNKNOWN_OPTION = "Git clean unknown option found in: "; +/** + * All supported option switches available for use in a `git.clean` operation + */ +export declare enum CleanOptions { + DRY_RUN = "n", + FORCE = "f", + IGNORED_INCLUDED = "x", + IGNORED_ONLY = "X", + EXCLUDING = "e", + QUIET = "q", + RECURSIVE = "d" +} +/** + * The two modes `git.clean` can run in - one of these must be supplied in order + * for the command to not throw a `TaskConfigurationError` + */ +export declare type CleanMode = CleanOptions.FORCE | CleanOptions.DRY_RUN; +export declare function cleanWithOptionsTask(mode: CleanMode | string, customArgs: string[]): import("./task").EmptyTask | StringTask; +export declare function cleanTask(mode: CleanMode, customArgs: string[]): StringTask; +export declare function isCleanOptionsArray(input: string[]): input is CleanOptions[]; diff --git a/Client/node_modules/simple-git/src/lib/tasks/clean.js b/Client/node_modules/simple-git/src/lib/tasks/clean.js new file mode 100644 index 000000000..3826e1783 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/clean.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isCleanOptionsArray = exports.cleanTask = exports.cleanWithOptionsTask = exports.CleanOptions = exports.CONFIG_ERROR_UNKNOWN_OPTION = exports.CONFIG_ERROR_MODE_REQUIRED = exports.CONFIG_ERROR_INTERACTIVE_MODE = void 0; +const CleanSummary_1 = require("../responses/CleanSummary"); +const utils_1 = require("../utils"); +const task_1 = require("./task"); +exports.CONFIG_ERROR_INTERACTIVE_MODE = 'Git clean interactive mode is not supported'; +exports.CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter ("n" or "f") is required'; +exports.CONFIG_ERROR_UNKNOWN_OPTION = 'Git clean unknown option found in: '; +/** + * All supported option switches available for use in a `git.clean` operation + */ +var CleanOptions; +(function (CleanOptions) { + CleanOptions["DRY_RUN"] = "n"; + CleanOptions["FORCE"] = "f"; + CleanOptions["IGNORED_INCLUDED"] = "x"; + CleanOptions["IGNORED_ONLY"] = "X"; + CleanOptions["EXCLUDING"] = "e"; + CleanOptions["QUIET"] = "q"; + CleanOptions["RECURSIVE"] = "d"; +})(CleanOptions = exports.CleanOptions || (exports.CleanOptions = {})); +const CleanOptionValues = new Set(['i', ...utils_1.asStringArray(Object.values(CleanOptions))]); +function cleanWithOptionsTask(mode, customArgs) { + const { cleanMode, options, valid } = getCleanOptions(mode); + if (!cleanMode) { + return task_1.configurationErrorTask(exports.CONFIG_ERROR_MODE_REQUIRED); + } + if (!valid.options) { + return task_1.configurationErrorTask(exports.CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode)); + } + options.push(...customArgs); + if (options.some(isInteractiveMode)) { + return task_1.configurationErrorTask(exports.CONFIG_ERROR_INTERACTIVE_MODE); + } + return cleanTask(cleanMode, options); +} +exports.cleanWithOptionsTask = cleanWithOptionsTask; +function cleanTask(mode, customArgs) { + const commands = ['clean', `-${mode}`, ...customArgs]; + return { + commands, + format: 'utf-8', + parser(text) { + return CleanSummary_1.cleanSummaryParser(mode === CleanOptions.DRY_RUN, text); + } + }; +} +exports.cleanTask = cleanTask; +function isCleanOptionsArray(input) { + return Array.isArray(input) && input.every(test => CleanOptionValues.has(test)); +} +exports.isCleanOptionsArray = isCleanOptionsArray; +function getCleanOptions(input) { + let cleanMode; + let options = []; + let valid = { cleanMode: false, options: true }; + input.replace(/[^a-z]i/g, '').split('').forEach(char => { + if (isCleanMode(char)) { + cleanMode = char; + valid.cleanMode = true; + } + else { + valid.options = valid.options && isKnownOption(options[options.length] = (`-${char}`)); + } + }); + return { + cleanMode, + options, + valid, + }; +} +function isCleanMode(cleanMode) { + return cleanMode === CleanOptions.FORCE || cleanMode === CleanOptions.DRY_RUN; +} +function isKnownOption(option) { + return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1)); +} +function isInteractiveMode(option) { + if (/^-[^\-]/.test(option)) { + return option.indexOf('i') > 0; + } + return option === '--interactive'; +} +//# sourceMappingURL=clean.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/clean.js.map b/Client/node_modules/simple-git/src/lib/tasks/clean.js.map new file mode 100644 index 000000000..a8fc6fe81 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/clean.js.map @@ -0,0 +1 @@ +{"version":3,"file":"clean.js","sourceRoot":"","sources":["clean.ts"],"names":[],"mappings":";;;AACA,4DAA+D;AAE/D,oCAAyC;AACzC,iCAAgD;AAEnC,QAAA,6BAA6B,GAAG,6CAA6C,CAAC;AAC9E,QAAA,0BAA0B,GAAG,mDAAmD,CAAC;AACjF,QAAA,2BAA2B,G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AM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACtC,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACzB,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACjC;IAED,OAAO,MAAM,KAAK,eAAe,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/clone.d.ts b/Client/node_modules/simple-git/src/lib/tasks/clone.d.ts new file mode 100644 index 000000000..2662ece15 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/clone.d.ts @@ -0,0 +1,4 @@ +import { OptionFlags, Options, StringTask } from '../types'; +export declare type CloneOptions = Options & OptionFlags<'--bare' | '--dissociate' | '--mirror' | '--no-checkout' | '--no-remote-submodules' | '--no-shallow-submodules' | '--no-single-branch' | '--no-tags' | '--remote-submodules' | '--single-branch' | '--shallow-submodules' | '--verbose'> & OptionFlags<'--depth' | '-j' | '--jobs', number> & OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>; +export declare function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask; +export declare function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/clone.js b/Client/node_modules/simple-git/src/lib/tasks/clone.js new file mode 100644 index 000000000..afb3acdfb --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/clone.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cloneMirrorTask = exports.cloneTask = void 0; +const task_1 = require("./task"); +const utils_1 = require("../utils"); +function cloneTask(repo, directory, customArgs) { + const commands = ['clone', ...customArgs]; + if (typeof repo === 'string') { + commands.push(repo); + } + if (typeof directory === 'string') { + commands.push(directory); + } + return task_1.straightThroughStringTask(commands); +} +exports.cloneTask = cloneTask; +function cloneMirrorTask(repo, directory, customArgs) { + utils_1.append(customArgs, '--mirror'); + return cloneTask(repo, directory, customArgs); +} +exports.cloneMirrorTask = cloneMirrorTask; +//# sourceMappingURL=clone.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/clone.js.map b/Client/node_modules/simple-git/src/lib/tasks/clone.js.map new file mode 100644 index 000000000..b6a1fef21 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/clone.js.map @@ -0,0 +1 @@ +{"version":3,"file":"clone.js","sourceRoot":"","sources":["clone.ts"],"names":[],"mappings":";;;AAAA,iCAAmD;AAEnD,oCAAkC;AAoBlC,SAAgB,SAAS,CAAC,IAAwB,EAAE,SAA6B,EAAE,UAAoB;IACpG,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC3B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACtB;IACD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QAChC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC3B;IAED,OAAO,gCAAyB,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAVD,8BAUC;AAED,SAAgB,eAAe,CAAC,IAAwB,EAAE,SAA6B,EAAE,UAAoB;IAC1G,cAAM,CAAC,UAAU,EAAC,UAAU,CAAC,CAAC;IAE9B,OAAO,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACjD,CAAC;AAJD,0CAIC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/commit.d.ts b/Client/node_modules/simple-git/src/lib/tasks/commit.d.ts new file mode 100644 index 000000000..a84d2f5ad --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/commit.d.ts @@ -0,0 +1,3 @@ +import { CommitResult } from '../../../typings'; +import { StringTask } from '../types'; +export declare function commitTask(message: string[], files: string[], customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/commit.js b/Client/node_modules/simple-git/src/lib/tasks/commit.js new file mode 100644 index 000000000..4451b4081 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/commit.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.commitTask = void 0; +const parse_commit_1 = require("../parsers/parse-commit"); +function commitTask(message, files, customArgs) { + const commands = ['commit']; + message.forEach((m) => commands.push('-m', m)); + commands.push(...files, ...customArgs); + return { + commands, + format: 'utf-8', + parser: parse_commit_1.parseCommitResult, + }; +} +exports.commitTask = commitTask; +//# sourceMappingURL=commit.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/commit.js.map b/Client/node_modules/simple-git/src/lib/tasks/commit.js.map new file mode 100644 index 000000000..13fcae6b5 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/commit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"commit.js","sourceRoot":"","sources":["commit.ts"],"names":[],"mappings":";;;AACA,0DAA4D;AAG5D,SAAgB,UAAU,CAAC,OAAiB,EAAE,KAAe,EAAE,UAAoB;IAChF,MAAM,QAAQ,GAAa,CAAC,QAAQ,CAAC,CAAC;IAEtC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAE/C,QAAQ,CAAC,IAAI,CACV,GAAG,KAAK,EACR,GAAG,UAAU,CACf,CAAC;IAEF,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,gCAAiB;KAC3B,CAAA;AACJ,CAAC;AAfD,gCAeC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/config.d.ts b/Client/node_modules/simple-git/src/lib/tasks/config.d.ts new file mode 100644 index 000000000..15c2a0c24 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/config.d.ts @@ -0,0 +1,4 @@ +import { ConfigListSummary } from '../../../typings'; +import { StringTask } from '../types'; +export declare function addConfigTask(key: string, value: string, append?: boolean): StringTask; +export declare function listConfigTask(): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/config.js b/Client/node_modules/simple-git/src/lib/tasks/config.js new file mode 100644 index 000000000..7ca03bf1b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/config.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.listConfigTask = exports.addConfigTask = void 0; +const ConfigList_1 = require("../responses/ConfigList"); +function addConfigTask(key, value, append = false) { + const commands = ['config', '--local']; + if (append) { + commands.push('--add'); + } + commands.push(key, value); + return { + commands, + format: 'utf-8', + parser(text) { + return text; + } + }; +} +exports.addConfigTask = addConfigTask; +function listConfigTask() { + return { + commands: ['config', '--list', '--show-origin', '--null'], + format: 'utf-8', + parser(text) { + return ConfigList_1.configListParser(text); + }, + }; +} +exports.listConfigTask = listConfigTask; +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/config.js.map b/Client/node_modules/simple-git/src/lib/tasks/config.js.map new file mode 100644 index 000000000..41ad8e044 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["config.ts"],"names":[],"mappings":";;;AAEA,wDAA2D;AAE3D,SAAgB,aAAa,CAAC,GAAW,EAAE,KAAa,EAAE,MAAM,GAAG,KAAK;IACrE,MAAM,QAAQ,GAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAEjD,IAAI,MAAM,EAAE;QACT,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACzB;IAED,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAE1B,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,MAAM,CAAC,IAAY;YAChB,OAAO,IAAI,CAAC;QACf,CAAC;KACH,CAAA;AACJ,CAAC;AAhBD,sCAgBC;AAED,SAAgB,cAAc;IAC3B,OAAO;QACJ,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,CAAC;QACzD,MAAM,EAAE,OAAO;QACf,MAAM,CAAC,IAAY;YAChB,OAAO,6BAAgB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;KACH,CAAA;AACJ,CAAC;AARD,wCAQC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/diff.d.ts b/Client/node_modules/simple-git/src/lib/tasks/diff.d.ts new file mode 100644 index 000000000..c1e37aae8 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/diff.d.ts @@ -0,0 +1,3 @@ +import { StringTask } from '../types'; +import { DiffResult } from '../../../typings'; +export declare function diffSummaryTask(customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/diff.js b/Client/node_modules/simple-git/src/lib/tasks/diff.js new file mode 100644 index 000000000..cda5ce2c6 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/diff.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.diffSummaryTask = void 0; +const parse_diff_summary_1 = require("../parsers/parse-diff-summary"); +function diffSummaryTask(customArgs) { + return { + commands: ['diff', '--stat=4096', ...customArgs], + format: 'utf-8', + parser(stdOut) { + return parse_diff_summary_1.parseDiffResult(stdOut); + } + }; +} +exports.diffSummaryTask = diffSummaryTask; +//# sourceMappingURL=diff.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/diff.js.map b/Client/node_modules/simple-git/src/lib/tasks/diff.js.map new file mode 100644 index 000000000..f18167c80 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/diff.js.map @@ -0,0 +1 @@ +{"version":3,"file":"diff.js","sourceRoot":"","sources":["diff.ts"],"names":[],"mappings":";;;AAEA,sEAAgE;AAEhE,SAAgB,eAAe,CAAC,UAAoB;IACjD,OAAO;QACJ,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC;QAChD,MAAM,EAAE,OAAO;QACf,MAAM,CAAE,MAAM;YACX,OAAO,oCAAe,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;KACH,CAAA;AACJ,CAAC;AARD,0CAQC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/fetch.d.ts b/Client/node_modules/simple-git/src/lib/tasks/fetch.d.ts new file mode 100644 index 000000000..db4626ddd --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/fetch.d.ts @@ -0,0 +1,3 @@ +import { FetchResult } from '../../../typings'; +import { StringTask } from '../types'; +export declare function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/fetch.js b/Client/node_modules/simple-git/src/lib/tasks/fetch.js new file mode 100644 index 000000000..c4b2753ef --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/fetch.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fetchTask = void 0; +const parse_fetch_1 = require("../parsers/parse-fetch"); +function fetchTask(remote, branch, customArgs) { + const commands = ['fetch', ...customArgs]; + if (remote && branch) { + commands.push(remote, branch); + } + return { + commands, + format: 'utf-8', + parser: parse_fetch_1.parseFetchResult, + }; +} +exports.fetchTask = fetchTask; +//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/fetch.js.map b/Client/node_modules/simple-git/src/lib/tasks/fetch.js.map new file mode 100644 index 000000000..af3c294bc --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/fetch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fetch.js","sourceRoot":"","sources":["fetch.ts"],"names":[],"mappings":";;;AACA,wDAA0D;AAG1D,SAAgB,SAAS,CAAC,MAAc,EAAE,MAAc,EAAE,UAAoB;IAC3E,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;IAC1C,IAAI,MAAM,IAAI,MAAM,EAAE;QACnB,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAChC;IAED,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,8BAAgB;KAC1B,CAAA;AACJ,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/hash-object.d.ts b/Client/node_modules/simple-git/src/lib/tasks/hash-object.d.ts new file mode 100644 index 000000000..cedf3e09b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/hash-object.d.ts @@ -0,0 +1,5 @@ +import { StringTask } from '../types'; +/** + * Task used by `git.hashObject` + */ +export declare function hashObjectTask(filePath: string, write: boolean): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/hash-object.js b/Client/node_modules/simple-git/src/lib/tasks/hash-object.js new file mode 100644 index 000000000..ba8895fa0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/hash-object.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hashObjectTask = void 0; +const task_1 = require("./task"); +/** + * Task used by `git.hashObject` + */ +function hashObjectTask(filePath, write) { + const commands = ['hash-object', filePath]; + if (write) { + commands.push('-w'); + } + return task_1.straightThroughStringTask(commands, true); +} +exports.hashObjectTask = hashObjectTask; +//# sourceMappingURL=hash-object.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/hash-object.js.map b/Client/node_modules/simple-git/src/lib/tasks/hash-object.js.map new file mode 100644 index 000000000..14ac34d7b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/hash-object.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hash-object.js","sourceRoot":"","sources":["hash-object.ts"],"names":[],"mappings":";;;AAAA,iCAAmD;AAGnD;;GAEG;AACH,SAAgB,cAAc,CAAC,QAAgB,EAAE,KAAc;IAC5D,MAAM,QAAQ,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC3C,IAAI,KAAK,EAAE;QACR,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACtB;IAED,OAAO,gCAAyB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC;AAPD,wCAOC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/init.d.ts b/Client/node_modules/simple-git/src/lib/tasks/init.d.ts new file mode 100644 index 000000000..ca7f12655 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/init.d.ts @@ -0,0 +1,3 @@ +import { InitResult } from '../../../typings'; +import { StringTask } from '../types'; +export declare function initTask(bare: boolean | undefined, path: string, customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/init.js b/Client/node_modules/simple-git/src/lib/tasks/init.js new file mode 100644 index 000000000..8e6c8306d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/init.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initTask = void 0; +const InitSummary_1 = require("../responses/InitSummary"); +const bareCommand = '--bare'; +function hasBareCommand(command) { + return command.includes(bareCommand); +} +function initTask(bare = false, path, customArgs) { + const commands = ['init', ...customArgs]; + if (bare && !hasBareCommand(commands)) { + commands.splice(1, 0, bareCommand); + } + return { + commands, + concatStdErr: false, + format: 'utf-8', + parser(text) { + return InitSummary_1.parseInit(commands.includes('--bare'), path, text); + } + }; +} +exports.initTask = initTask; +//# sourceMappingURL=init.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/init.js.map b/Client/node_modules/simple-git/src/lib/tasks/init.js.map new file mode 100644 index 000000000..93f97c6ab --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/init.js.map @@ -0,0 +1 @@ +{"version":3,"file":"init.js","sourceRoot":"","sources":["init.ts"],"names":[],"mappings":";;;AACA,0DAAqD;AAGrD,MAAM,WAAW,GAAG,QAAQ,CAAC;AAE7B,SAAS,cAAc,CAAC,OAAiB;IACtC,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAED,SAAgB,QAAQ,CAAC,IAAI,GAAG,KAAK,EAAE,IAAY,EAAE,UAAoB;IACtE,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC;IACzC,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACpC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC;KACrC;IAED,OAAO;QACJ,QAAQ;QACR,YAAY,EAAE,KAAK;QACnB,MAAM,EAAE,OAAO;QACf,MAAM,CAAC,IAAY;YAChB,OAAO,uBAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7D,CAAC;KACH,CAAA;AACJ,CAAC;AAdD,4BAcC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/log.d.ts b/Client/node_modules/simple-git/src/lib/tasks/log.d.ts new file mode 100644 index 000000000..826c3001a --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/log.d.ts @@ -0,0 +1,28 @@ +import { Options, StringTask } from '../types'; +import { LogResult } from '../../../typings'; +export interface DefaultLogFields { + hash: string; + date: string; + message: string; + refs: string; + body: string; + author_name: string; + author_email: string; +} +export declare type LogOptions = { + file?: string; + format?: T; + from?: string; + maxCount?: number; + multiLine?: boolean; + splitter?: string; + strictDate?: boolean; + symmetric?: boolean; + to?: string; +}; +export declare function parseLogOptions(opt?: LogOptions, customArgs?: string[]): { + fields: string[]; + splitter: string; + commands: string[]; +}; +export declare function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask>; diff --git a/Client/node_modules/simple-git/src/lib/tasks/log.js b/Client/node_modules/simple-git/src/lib/tasks/log.js new file mode 100644 index 000000000..16defcf36 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/log.js @@ -0,0 +1,88 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.logTask = exports.parseLogOptions = void 0; +const parse_list_log_summary_1 = require("../parsers/parse-list-log-summary"); +const utils_1 = require("../utils"); +var excludeOptions; +(function (excludeOptions) { + excludeOptions[excludeOptions["--pretty"] = 0] = "--pretty"; + excludeOptions[excludeOptions["max-count"] = 1] = "max-count"; + excludeOptions[excludeOptions["maxCount"] = 2] = "maxCount"; + excludeOptions[excludeOptions["n"] = 3] = "n"; + excludeOptions[excludeOptions["file"] = 4] = "file"; + excludeOptions[excludeOptions["format"] = 5] = "format"; + excludeOptions[excludeOptions["from"] = 6] = "from"; + excludeOptions[excludeOptions["to"] = 7] = "to"; + excludeOptions[excludeOptions["splitter"] = 8] = "splitter"; + excludeOptions[excludeOptions["symmetric"] = 9] = "symmetric"; + excludeOptions[excludeOptions["multiLine"] = 10] = "multiLine"; + excludeOptions[excludeOptions["strictDate"] = 11] = "strictDate"; +})(excludeOptions || (excludeOptions = {})); +function prettyFormat(format, splitter) { + const fields = []; + const formatStr = []; + Object.keys(format).forEach((field) => { + fields.push(field); + formatStr.push(String(format[field])); + }); + return [ + fields, formatStr.join(splitter) + ]; +} +function userOptions(input) { + const output = Object.assign({}, input); + Object.keys(input).forEach(key => { + if (key in excludeOptions) { + delete output[key]; + } + }); + return output; +} +function parseLogOptions(opt = {}, customArgs = []) { + const splitter = opt.splitter || parse_list_log_summary_1.SPLITTER; + const format = opt.format || { + hash: '%H', + date: opt.strictDate === false ? '%ai' : '%aI', + message: '%s', + refs: '%D', + body: opt.multiLine ? '%B' : '%b', + author_name: '%aN', + author_email: '%ae' + }; + const [fields, formatStr] = prettyFormat(format, splitter); + const suffix = []; + const command = [ + `--pretty=format:${parse_list_log_summary_1.START_BOUNDARY}${formatStr}${parse_list_log_summary_1.COMMIT_BOUNDARY}`, + ...customArgs, + ]; + const maxCount = opt.n || opt['max-count'] || opt.maxCount; + if (maxCount) { + command.push(`--max-count=${maxCount}`); + } + if (opt.from && opt.to) { + const rangeOperator = (opt.symmetric !== false) ? '...' : '..'; + suffix.push(`${opt.from}${rangeOperator}${opt.to}`); + } + if (opt.file) { + suffix.push('--follow', opt.file); + } + utils_1.appendTaskOptions(userOptions(opt), command); + return { + fields, + splitter, + commands: [ + ...command, + ...suffix, + ], + }; +} +exports.parseLogOptions = parseLogOptions; +function logTask(splitter, fields, customArgs) { + return { + commands: ['log', ...customArgs], + format: 'utf-8', + parser: parse_list_log_summary_1.createListLogSummaryParser(splitter, fields), + }; +} +exports.logTask = logTask; +//# sourceMappingURL=log.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/log.js.map b/Client/node_modules/simple-git/src/lib/tasks/log.js.map new file mode 100644 index 000000000..a3ae0e171 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/log.js.map @@ -0,0 +1 @@ +{"version":3,"file":"log.js","sourceRoot":"","sources":["log.ts"],"names":[],"mappings":";;;AAEA,8EAK2C;AAC3C,oCAA6C;AAE7C,IAAK,cAaJ;AAbD,WAAK,cAAc;IAChB,2DAAU,CAAA;IACV,6DAAW,CAAA;IACX,2DAAU,CAAA;IACV,6CAAG,CAAA;IACH,mDAAM,CAAA;IACN,uDAAQ,CAAA;IACR,mDAAM,CAAA;IACN,+CAAI,CAAA;IACJ,2DAAU,CAAA;IACV,6DAAW,CAAA;IACX,8DAAW,CAAA;IACX,gEAAY,CAAA;AACf,CAAC,EAbI,cAAc,KAAd,cAAc,QAalB;AAwBD,SAAS,YAAY,CAAC,MAAyC,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CAAC;AAND,0BAMC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/merge.d.ts b/Client/node_modules/simple-git/src/lib/tasks/merge.d.ts new file mode 100644 index 000000000..663e80be5 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/merge.d.ts @@ -0,0 +1,4 @@ +import { MergeResult } from '../../../typings'; +import { StringTask } from '../types'; +import { EmptyTask } from './task'; +export declare function mergeTask(customArgs: string[]): EmptyTask | StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/merge.js b/Client/node_modules/simple-git/src/lib/tasks/merge.js new file mode 100644 index 000000000..8194a0363 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/merge.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeTask = void 0; +const api_1 = require("../api"); +const parse_merge_1 = require("../parsers/parse-merge"); +const task_1 = require("./task"); +function mergeTask(customArgs) { + if (!customArgs.length) { + return task_1.configurationErrorTask('Git.merge requires at least one option'); + } + return { + commands: ['merge', ...customArgs], + format: 'utf-8', + parser(stdOut, stdErr) { + const merge = parse_merge_1.parseMergeResult(stdOut, stdErr); + if (merge.failed) { + throw new api_1.GitResponseError(merge); + } + return merge; + } + }; +} +exports.mergeTask = mergeTask; +//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/merge.js.map b/Client/node_modules/simple-git/src/lib/tasks/merge.js.map new file mode 100644 index 000000000..213252781 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/merge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.js","sourceRoot":"","sources":["merge.ts"],"names":[],"mappings":";;;AACA,gCAA0C;AAC1C,wDAA0D;AAE1D,iCAA2D;AAE3D,SAAgB,SAAS,CAAC,UAAoB;IAC3C,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;QACrB,OAAO,6BAAsB,CAAC,wCAAwC,CAAC,CAAC;KAC1E;IAED,OAAO;QACJ,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC;QAClC,MAAM,EAAE,OAAO;QACf,MAAM,CAAC,MAAM,EAAE,MAAM;YAClB,MAAM,KAAK,GAAG,8BAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC/C,IAAI,KAAK,CAAC,MAAM,EAAE;gBACf,MAAM,IAAI,sBAAgB,CAAC,KAAK,CAAC,CAAC;aACpC;YAED,OAAO,KAAK,CAAC;QAChB,CAAC;KACH,CAAA;AACJ,CAAC;AAjBD,8BAiBC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/move.d.ts b/Client/node_modules/simple-git/src/lib/tasks/move.d.ts new file mode 100644 index 000000000..75ae9af88 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/move.d.ts @@ -0,0 +1,3 @@ +import { MoveResult } from '../../../typings'; +import { StringTask } from '../types'; +export declare function moveTask(from: string | string[], to: string): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/move.js b/Client/node_modules/simple-git/src/lib/tasks/move.js new file mode 100644 index 000000000..8f7406cfa --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/move.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.moveTask = void 0; +const parse_move_1 = require("../parsers/parse-move"); +const utils_1 = require("../utils"); +function moveTask(from, to) { + return { + commands: ['mv', '-v', ...utils_1.asArray(from), to], + format: 'utf-8', + parser: parse_move_1.parseMoveResult, + }; +} +exports.moveTask = moveTask; +//# sourceMappingURL=move.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/move.js.map b/Client/node_modules/simple-git/src/lib/tasks/move.js.map new file mode 100644 index 000000000..498dd964d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/move.js.map @@ -0,0 +1 @@ +{"version":3,"file":"move.js","sourceRoot":"","sources":["move.ts"],"names":[],"mappings":";;;AACA,sDAAwD;AAExD,oCAAmC;AAEnC,SAAgB,QAAQ,CAAC,IAAuB,EAAE,EAAU;IACzD,OAAO;QACJ,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,eAAO,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QAC5C,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,4BAAe;KACzB,CAAC;AACL,CAAC;AAND,4BAMC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/pull.d.ts b/Client/node_modules/simple-git/src/lib/tasks/pull.d.ts new file mode 100644 index 000000000..c08062fe6 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/pull.d.ts @@ -0,0 +1,3 @@ +import { PullResult } from '../../../typings'; +import { Maybe, StringTask } from '../types'; +export declare function pullTask(remote: Maybe, branch: Maybe, customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/pull.js b/Client/node_modules/simple-git/src/lib/tasks/pull.js new file mode 100644 index 000000000..e34b6f782 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/pull.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pullTask = void 0; +const parse_pull_1 = require("../parsers/parse-pull"); +function pullTask(remote, branch, customArgs) { + const commands = ['pull', ...customArgs]; + if (remote && branch) { + commands.splice(1, 0, remote, branch); + } + return { + commands, + format: 'utf-8', + parser(stdOut, stdErr) { + return parse_pull_1.parsePullResult(stdOut, stdErr); + } + }; +} +exports.pullTask = pullTask; +//# sourceMappingURL=pull.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/pull.js.map b/Client/node_modules/simple-git/src/lib/tasks/pull.js.map new file mode 100644 index 000000000..f2d792d89 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/pull.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pull.js","sourceRoot":"","sources":["pull.ts"],"names":[],"mappings":";;;AACA,sDAAwD;AAGxD,SAAgB,QAAQ,CAAC,MAAqB,EAAE,MAAqB,EAAE,UAAoB;IACxF,MAAM,QAAQ,GAAa,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC;IACnD,IAAI,MAAM,IAAI,MAAM,EAAE;QACnB,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;KACxC;IAED,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,MAAM,CAAC,MAAM,EAAE,MAAM;YAClB,OAAO,4BAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC1C,CAAC;KACH,CAAA;AACJ,CAAC;AAbD,4BAaC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/push.d.ts b/Client/node_modules/simple-git/src/lib/tasks/push.d.ts new file mode 100644 index 000000000..4d18c7104 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/push.d.ts @@ -0,0 +1,9 @@ +import { PushResult } from '../../../typings'; +import { StringTask } from '../types'; +declare type PushRef = { + remote?: string; + branch?: string; +}; +export declare function pushTagsTask(ref: PushRef | undefined, customArgs: string[]): StringTask; +export declare function pushTask(ref: PushRef | undefined, customArgs: string[]): StringTask; +export {}; diff --git a/Client/node_modules/simple-git/src/lib/tasks/push.js b/Client/node_modules/simple-git/src/lib/tasks/push.js new file mode 100644 index 000000000..9f3e107db --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/push.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pushTask = exports.pushTagsTask = void 0; +const parse_push_1 = require("../parsers/parse-push"); +const utils_1 = require("../utils"); +function pushTagsTask(ref = {}, customArgs) { + utils_1.append(customArgs, '--tags'); + return pushTask(ref, customArgs); +} +exports.pushTagsTask = pushTagsTask; +function pushTask(ref = {}, customArgs) { + const commands = ['push', ...customArgs]; + if (ref.branch) { + commands.splice(1, 0, ref.branch); + } + if (ref.remote) { + commands.splice(1, 0, ref.remote); + } + utils_1.remove(commands, '-v'); + utils_1.append(commands, '--verbose'); + utils_1.append(commands, '--porcelain'); + return { + commands, + format: 'utf-8', + parser: parse_push_1.parsePushResult, + }; +} +exports.pushTask = pushTask; +//# sourceMappingURL=push.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/push.js.map b/Client/node_modules/simple-git/src/lib/tasks/push.js.map new file mode 100644 index 000000000..a10db707c --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/push.js.map @@ -0,0 +1 @@ +{"version":3,"file":"push.js","sourceRoot":"","sources":["push.ts"],"names":[],"mappings":";;;AACA,sDAAkE;AAElE,oCAA0C;AAI1C,SAAgB,YAAY,CAAC,MAAe,EAAE,EAAE,UAAoB;IACjE,cAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC7B,OAAO,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACpC,CAAC;AAHD,oCAGC;AAED,SAAgB,QAAQ,CAAC,MAAe,EAAE,EAAE,UAAoB;IAC7D,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC;IACzC,IAAI,GAAG,CAAC,MAAM,EAAE;QACb,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;KACpC;IACD,IAAI,GAAG,CAAC,MAAM,EAAE;QACb,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;KACpC;IAED,cAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvB,cAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC9B,cAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAEhC,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,MAAM,EAAN,4BAAM;KACR,CAAC;AACL,CAAC;AAlBD,4BAkBC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/remote.d.ts b/Client/node_modules/simple-git/src/lib/tasks/remote.d.ts new file mode 100644 index 000000000..fbaae7a56 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/remote.d.ts @@ -0,0 +1,6 @@ +import { StringTask } from '../types'; +export declare function addRemoteTask(remoteName: string, remoteRepo: string, customArgs?: string[]): StringTask; +export declare function getRemotesTask(verbose: boolean): StringTask; +export declare function listRemotesTask(customArgs?: string[]): StringTask; +export declare function remoteTask(customArgs?: string[]): StringTask; +export declare function removeRemoteTask(remoteName: string): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/remote.js b/Client/node_modules/simple-git/src/lib/tasks/remote.js new file mode 100644 index 000000000..1d8b39f51 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/remote.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.removeRemoteTask = exports.remoteTask = exports.listRemotesTask = exports.getRemotesTask = exports.addRemoteTask = void 0; +const GetRemoteSummary_1 = require("../responses/GetRemoteSummary"); +const task_1 = require("./task"); +function addRemoteTask(remoteName, remoteRepo, customArgs = []) { + return task_1.straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]); +} +exports.addRemoteTask = addRemoteTask; +function getRemotesTask(verbose) { + const commands = ['remote']; + if (verbose) { + commands.push('-v'); + } + return { + commands, + format: 'utf-8', + parser: verbose ? GetRemoteSummary_1.parseGetRemotesVerbose : GetRemoteSummary_1.parseGetRemotes, + }; +} +exports.getRemotesTask = getRemotesTask; +function listRemotesTask(customArgs = []) { + const commands = [...customArgs]; + if (commands[0] !== 'ls-remote') { + commands.unshift('ls-remote'); + } + return task_1.straightThroughStringTask(commands); +} +exports.listRemotesTask = listRemotesTask; +function remoteTask(customArgs = []) { + const commands = [...customArgs]; + if (commands[0] !== 'remote') { + commands.unshift('remote'); + } + return task_1.straightThroughStringTask(commands); +} +exports.remoteTask = remoteTask; +function removeRemoteTask(remoteName) { + return task_1.straightThroughStringTask(['remote', 'remove', remoteName]); +} +exports.removeRemoteTask = removeRemoteTask; +//# sourceMappingURL=remote.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/remote.js.map b/Client/node_modules/simple-git/src/lib/tasks/remote.js.map new file mode 100644 index 000000000..0e4698dc9 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/remote.js.map @@ -0,0 +1 @@ +{"version":3,"file":"remote.js","sourceRoot":"","sources":["remote.ts"],"names":[],"mappings":";;;AAAA,oEAAwF;AAExF,iCAAmD;AAEnD,SAAgB,aAAa,CAAC,UAAkB,EAAE,UAAkB,EAAE,aAAuB,EAAE;IAC5F,OAAO,gCAAyB,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAC9F,CAAC;AAFD,sCAEC;AAED,SAAgB,cAAc,CAAC,OAAgB;IAC5C,MAAM,QAAQ,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5B,IAAI,OAAO,EAAE;QACV,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACtB;IAED,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,yCAAsB,CAAC,CAAC,CAAC,kCAAe;KAC5D,CAAC;AACL,CAAC;AAXD,wCAWC;AAED,SAAgB,eAAe,CAAC,aAAuB,EAAE;IACtD,MAAM,QAAQ,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,WAAW,EAAE;QAC9B,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;KAChC;IAED,OAAO,gCAAyB,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAPD,0CAOC;AAED,SAAgB,UAAU,CAAC,aAAuB,EAAE;IACjD,MAAM,QAAQ,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;QAC3B,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,OAAO,gCAAyB,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAPD,gCAOC;AAED,SAAgB,gBAAgB,CAAC,UAAkB;IAChD,OAAO,gCAAyB,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AACtE,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/reset.d.ts b/Client/node_modules/simple-git/src/lib/tasks/reset.d.ts new file mode 100644 index 000000000..468fe8767 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/reset.d.ts @@ -0,0 +1,11 @@ +import { Maybe, OptionFlags, Options } from '../types'; +export declare enum ResetMode { + MIXED = "mixed", + SOFT = "soft", + HARD = "hard", + MERGE = "merge", + KEEP = "keep" +} +export declare type ResetOptions = Options & OptionFlags<'-q' | '--quiet' | '--no-quiet' | '--pathspec-from-nul'> & OptionFlags<'--pathspec-from-file', string>; +export declare function resetTask(mode: Maybe, customArgs: string[]): import("../types").StringTask; +export declare function getResetMode(mode: ResetMode | any): Maybe; diff --git a/Client/node_modules/simple-git/src/lib/tasks/reset.js b/Client/node_modules/simple-git/src/lib/tasks/reset.js new file mode 100644 index 000000000..7f345bc3a --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/reset.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getResetMode = exports.resetTask = exports.ResetMode = void 0; +const task_1 = require("./task"); +var ResetMode; +(function (ResetMode) { + ResetMode["MIXED"] = "mixed"; + ResetMode["SOFT"] = "soft"; + ResetMode["HARD"] = "hard"; + ResetMode["MERGE"] = "merge"; + ResetMode["KEEP"] = "keep"; +})(ResetMode = exports.ResetMode || (exports.ResetMode = {})); +const ResetModes = Array.from(Object.values(ResetMode)); +function resetTask(mode, customArgs) { + const commands = ['reset']; + if (isValidResetMode(mode)) { + commands.push(`--${mode}`); + } + commands.push(...customArgs); + return task_1.straightThroughStringTask(commands); +} +exports.resetTask = resetTask; +function getResetMode(mode) { + if (isValidResetMode(mode)) { + return mode; + } + switch (typeof mode) { + case 'string': + case 'undefined': + return ResetMode.SOFT; + } + return; +} +exports.getResetMode = getResetMode; +function isValidResetMode(mode) { + return ResetModes.includes(mode); +} +//# sourceMappingURL=reset.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/reset.js.map b/Client/node_modules/simple-git/src/lib/tasks/reset.js.map new file mode 100644 index 000000000..3c6e42b85 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/reset.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reset.js","sourceRoot":"","sources":["reset.ts"],"names":[],"mappings":";;;AAAA,iCAAmD;AAGnD,IAAY,SAMX;AAND,WAAY,SAAS;IAClB,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,0BAAa,CAAA;AAChB,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB;AAED,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;AAMxD,SAAgB,SAAS,CAAC,IAAsB,EAAE,UAAoB;IACnE,MAAM,QAAQ,GAAa,CAAC,OAAO,CAAC,CAAC;IACrC,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACzB,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;KAC7B;IACD,QAAQ,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;IAE7B,OAAO,gCAAyB,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC;AARD,8BAQC;AAED,SAAgB,YAAY,CAAC,IAAqB;IAC/C,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACzB,OAAO,IAAI,CAAC;KACd;IAED,QAAQ,OAAO,IAAI,EAAE;QAClB,KAAK,QAAQ,CAAC;QACd,KAAK,WAAW;YACb,OAAO,SAAS,CAAC,IAAI,CAAC;KAC3B;IAED,OAAO;AACV,CAAC;AAZD,oCAYC;AAED,SAAS,gBAAgB,CAAC,IAAqB;IAC5C,OAAO,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/stash-list.d.ts b/Client/node_modules/simple-git/src/lib/tasks/stash-list.d.ts new file mode 100644 index 000000000..5bf9a9c5e --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/stash-list.d.ts @@ -0,0 +1,3 @@ +import { LogOptions, LogResult } from '../../../typings'; +import { StringTask } from '../types'; +export declare function stashListTask(opt: LogOptions | undefined, customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/stash-list.js b/Client/node_modules/simple-git/src/lib/tasks/stash-list.js new file mode 100644 index 000000000..b5120fedb --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/stash-list.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stashListTask = void 0; +const parse_list_log_summary_1 = require("../parsers/parse-list-log-summary"); +const log_1 = require("./log"); +function stashListTask(opt = {}, customArgs) { + const options = log_1.parseLogOptions(opt); + const parser = parse_list_log_summary_1.createListLogSummaryParser(options.splitter, options.fields); + return { + commands: ['stash', 'list', ...options.commands, ...customArgs], + format: 'utf-8', + parser, + }; +} +exports.stashListTask = stashListTask; +//# sourceMappingURL=stash-list.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/stash-list.js.map b/Client/node_modules/simple-git/src/lib/tasks/stash-list.js.map new file mode 100644 index 000000000..5d8c8012b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/stash-list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stash-list.js","sourceRoot":"","sources":["stash-list.ts"],"names":[],"mappings":";;;AACA,8EAA+E;AAE/E,+BAAwC;AAExC,SAAgB,aAAa,CAAC,MAAkB,EAAE,EAAE,UAAoB;IACrE,MAAM,OAAO,GAAG,qBAAe,CAAM,GAAG,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,mDAA0B,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAE5E,OAAO;QACJ,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,GAAG,UAAU,CAAC;QAC/D,MAAM,EAAE,OAAO;QACf,MAAM;KACR,CAAC;AACL,CAAC;AATD,sCASC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/status.d.ts b/Client/node_modules/simple-git/src/lib/tasks/status.d.ts new file mode 100644 index 000000000..45fec0f9b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/status.d.ts @@ -0,0 +1,3 @@ +import { StatusResult } from '../../../typings'; +import { StringTask } from '../types'; +export declare function statusTask(customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/status.js b/Client/node_modules/simple-git/src/lib/tasks/status.js new file mode 100644 index 000000000..b914816da --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/status.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.statusTask = void 0; +const StatusSummary_1 = require("../responses/StatusSummary"); +function statusTask(customArgs) { + return { + format: 'utf-8', + commands: ['status', '--porcelain', '-b', '-u', ...customArgs], + parser(text) { + return StatusSummary_1.parseStatusSummary(text); + } + }; +} +exports.statusTask = statusTask; +//# sourceMappingURL=status.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/status.js.map b/Client/node_modules/simple-git/src/lib/tasks/status.js.map new file mode 100644 index 000000000..053779da0 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/status.js.map @@ -0,0 +1 @@ +{"version":3,"file":"status.js","sourceRoot":"","sources":["status.ts"],"names":[],"mappings":";;;AACA,8DAAgE;AAGhE,SAAgB,UAAU,CAAC,UAAoB;IAC5C,OAAO;QACJ,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;QAC9D,MAAM,CAAC,IAAY;YAChB,OAAO,kCAAkB,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;KACH,CAAA;AACJ,CAAC;AARD,gCAQC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/sub-module.d.ts b/Client/node_modules/simple-git/src/lib/tasks/sub-module.d.ts new file mode 100644 index 000000000..ac4f6f8ad --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/sub-module.d.ts @@ -0,0 +1,5 @@ +import { StringTask } from '../types'; +export declare function addSubModuleTask(repo: string, path: string): StringTask; +export declare function initSubModuleTask(customArgs: string[]): StringTask; +export declare function subModuleTask(customArgs: string[]): StringTask; +export declare function updateSubModuleTask(customArgs: string[]): StringTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/sub-module.js b/Client/node_modules/simple-git/src/lib/tasks/sub-module.js new file mode 100644 index 000000000..141547799 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/sub-module.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.updateSubModuleTask = exports.subModuleTask = exports.initSubModuleTask = exports.addSubModuleTask = void 0; +const task_1 = require("./task"); +function addSubModuleTask(repo, path) { + return subModuleTask(['add', repo, path]); +} +exports.addSubModuleTask = addSubModuleTask; +function initSubModuleTask(customArgs) { + return subModuleTask(['init', ...customArgs]); +} +exports.initSubModuleTask = initSubModuleTask; +function subModuleTask(customArgs) { + const commands = [...customArgs]; + if (commands[0] !== 'submodule') { + commands.unshift('submodule'); + } + return task_1.straightThroughStringTask(commands); +} +exports.subModuleTask = subModuleTask; +function updateSubModuleTask(customArgs) { + return subModuleTask(['update', ...customArgs]); +} +exports.updateSubModuleTask = updateSubModuleTask; +//# sourceMappingURL=sub-module.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/sub-module.js.map b/Client/node_modules/simple-git/src/lib/tasks/sub-module.js.map new file mode 100644 index 000000000..82f45c9b7 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/sub-module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sub-module.js","sourceRoot":"","sources":["sub-module.ts"],"names":[],"mappings":";;;AACA,iCAAmD;AAEnD,SAAgB,gBAAgB,CAAC,IAAY,EAAE,IAAY;IACxD,OAAO,aAAa,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAC7C,CAAC;AAFD,4CAEC;AAED,SAAgB,iBAAiB,CAAC,UAAoB;IACnD,OAAO,aAAa,CAAC,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC;AACjD,CAAC;AAFD,8CAEC;AAED,SAAgB,aAAa,CAAC,UAAoB;IAC/C,MAAM,QAAQ,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,WAAW,EAAE;QAC9B,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;KAChC;IAED,OAAO,gCAAyB,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAPD,sCAOC;AAED,SAAgB,mBAAmB,CAAC,UAAoB;IACrD,OAAO,aAAa,CAAC,CAAC,QAAQ,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC;AACnD,CAAC;AAFD,kDAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/tag.d.ts b/Client/node_modules/simple-git/src/lib/tasks/tag.d.ts new file mode 100644 index 000000000..b1dbb312a --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/tag.d.ts @@ -0,0 +1,18 @@ +import { TagResult } from '../../../typings'; +import { StringTask } from '../types'; +/** + * Task used by `git.tags` + */ +export declare function tagListTask(customArgs?: string[]): StringTask; +/** + * Task used by `git.addTag` + */ +export declare function addTagTask(name: string): StringTask<{ + name: string; +}>; +/** + * Task used by `git.addTag` + */ +export declare function addAnnotatedTagTask(name: string, tagMessage: string): StringTask<{ + name: string; +}>; diff --git a/Client/node_modules/simple-git/src/lib/tasks/tag.js b/Client/node_modules/simple-git/src/lib/tasks/tag.js new file mode 100644 index 000000000..83cdf2b13 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/tag.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.addAnnotatedTagTask = exports.addTagTask = exports.tagListTask = void 0; +const TagList_1 = require("../responses/TagList"); +/** + * Task used by `git.tags` + */ +function tagListTask(customArgs = []) { + const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option)); + return { + format: 'utf-8', + commands: ['tag', '-l', ...customArgs], + parser(text) { + return TagList_1.parseTagList(text, hasCustomSort); + }, + }; +} +exports.tagListTask = tagListTask; +/** + * Task used by `git.addTag` + */ +function addTagTask(name) { + return { + format: 'utf-8', + commands: ['tag', name], + parser() { + return { name }; + } + }; +} +exports.addTagTask = addTagTask; +/** + * Task used by `git.addTag` + */ +function addAnnotatedTagTask(name, tagMessage) { + return { + format: 'utf-8', + commands: ['tag', '-a', '-m', tagMessage, name], + parser() { + return { name }; + } + }; +} +exports.addAnnotatedTagTask = addAnnotatedTagTask; +//# sourceMappingURL=tag.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/tag.js.map b/Client/node_modules/simple-git/src/lib/tasks/tag.js.map new file mode 100644 index 000000000..837b9021f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/tag.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tag.js","sourceRoot":"","sources":["tag.ts"],"names":[],"mappings":";;;AACA,kDAAoD;AAGpD;;GAEG;AACH,SAAgB,WAAW,CAAE,aAAuB,EAAE;IACnD,MAAM,aAAa,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3E,OAAO;QACJ,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;QACtC,MAAM,CAAE,IAAY;YACjB,OAAO,sBAAY,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAC5C,CAAC;KACH,CAAA;AACJ,CAAC;AAVD,kCAUC;AAED;;GAEG;AACH,SAAgB,UAAU,CAAE,IAAY;IACrC,OAAO;QACJ,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;QACvB,MAAM;YACH,OAAO,EAAC,IAAI,EAAC,CAAC;QACjB,CAAC;KACH,CAAA;AACJ,CAAC;AARD,gCAQC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CAAE,IAAY,EAAE,UAAkB;IAClE,OAAO;QACJ,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC;QAC/C,MAAM;YACH,OAAO,EAAC,IAAI,EAAC,CAAC;QACjB,CAAC;KACH,CAAA;AACJ,CAAC;AARD,kDAQC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/task.d.ts b/Client/node_modules/simple-git/src/lib/tasks/task.d.ts new file mode 100644 index 000000000..9ce9a2566 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/task.d.ts @@ -0,0 +1,11 @@ +import { BufferTask, EmptyTaskParser, SimpleGitTask, SimpleGitTaskConfiguration, StringTask } from '../types'; +export declare const EMPTY_COMMANDS: []; +export declare type EmptyTask = SimpleGitTaskConfiguration & { + commands: typeof EMPTY_COMMANDS; + parser: EmptyTaskParser; +}; +export declare function adhocExecTask(parser: () => R): StringTask; +export declare function configurationErrorTask(error: Error | string): EmptyTask; +export declare function straightThroughStringTask(commands: string[], trimmed?: boolean): StringTask; +export declare function isBufferTask(task: SimpleGitTask): task is BufferTask; +export declare function isEmptyTask(task: SimpleGitTask): task is EmptyTask; diff --git a/Client/node_modules/simple-git/src/lib/tasks/task.js b/Client/node_modules/simple-git/src/lib/tasks/task.js new file mode 100644 index 000000000..8c36e998e --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/task.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEmptyTask = exports.isBufferTask = exports.straightThroughStringTask = exports.configurationErrorTask = exports.adhocExecTask = exports.EMPTY_COMMANDS = void 0; +const task_configuration_error_1 = require("../errors/task-configuration-error"); +exports.EMPTY_COMMANDS = []; +function adhocExecTask(parser) { + return { + commands: exports.EMPTY_COMMANDS, + format: 'utf-8', + parser, + }; +} +exports.adhocExecTask = adhocExecTask; +function configurationErrorTask(error) { + return { + commands: exports.EMPTY_COMMANDS, + format: 'utf-8', + parser() { + throw typeof error === 'string' ? new task_configuration_error_1.TaskConfigurationError(error) : error; + } + }; +} +exports.configurationErrorTask = configurationErrorTask; +function straightThroughStringTask(commands, trimmed = false) { + return { + commands, + format: 'utf-8', + parser(text) { + return trimmed ? String(text).trim() : text; + }, + }; +} +exports.straightThroughStringTask = straightThroughStringTask; +function isBufferTask(task) { + return task.format === 'buffer'; +} +exports.isBufferTask = isBufferTask; +function isEmptyTask(task) { + return !task.commands.length; +} +exports.isEmptyTask = isEmptyTask; +//# sourceMappingURL=task.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/tasks/task.js.map b/Client/node_modules/simple-git/src/lib/tasks/task.js.map new file mode 100644 index 000000000..a5e7388e6 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/tasks/task.js.map @@ -0,0 +1 @@ +{"version":3,"file":"task.js","sourceRoot":"","sources":["task.ts"],"names":[],"mappings":";;;AAAA,iFAA4E;AAG/D,QAAA,cAAc,GAAO,EAAE,CAAC;AAQrC,SAAgB,aAAa,CAAI,MAAe;IAC7C,OAAO;QACJ,QAAQ,EAAE,sBAAc;QACxB,MAAM,EAAE,OAAO;QACf,MAAM;KACR,CAAA;AACJ,CAAC;AAND,sCAMC;AAED,SAAgB,sBAAsB,CAAC,KAAqB;IACzD,OAAO;QACJ,QAAQ,EAAE,sBAAc;QACxB,MAAM,EAAE,OAAO;QACf,MAAM;YACH,MAAM,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,iDAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC/E,CAAC;KACH,CAAA;AACJ,CAAC;AARD,wDAQC;AAED,SAAgB,yBAAyB,CAAC,QAAkB,EAAE,OAAO,GAAG,KAAK;IAC1E,OAAO;QACJ,QAAQ;QACR,MAAM,EAAE,OAAO;QACf,MAAM,CAAC,IAAI;YACR,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/C,CAAC;KACH,CAAA;AACJ,CAAC;AARD,8DAQC;AAED,SAAgB,YAAY,CAAI,IAAsB;IACnD,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC;AACnC,CAAC;AAFD,oCAEC;AAED,SAAgB,WAAW,CAAI,IAAsB;IAClD,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;AAChC,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/types/handlers.d.ts b/Client/node_modules/simple-git/src/lib/types/handlers.d.ts new file mode 100644 index 000000000..5716db1ec --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/handlers.d.ts @@ -0,0 +1,9 @@ +import { GitError } from '../errors/git-error'; +/** + * The node-style callback to a task accepts either two arguments with the first as a null + * and the second as the data, or just one argument which is an error. + */ +export interface SimpleGitTaskCallback { + (err: null, data: T): void; + (err: E): void; +} diff --git a/Client/node_modules/simple-git/src/lib/types/handlers.js b/Client/node_modules/simple-git/src/lib/types/handlers.js new file mode 100644 index 000000000..c67b49c6e --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/handlers.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=handlers.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/types/handlers.js.map b/Client/node_modules/simple-git/src/lib/types/handlers.js.map new file mode 100644 index 000000000..11994ec2d --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/handlers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"handlers.js","sourceRoot":"","sources":["handlers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/types/index.d.ts b/Client/node_modules/simple-git/src/lib/types/index.d.ts new file mode 100644 index 000000000..f269ff8bd --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/index.d.ts @@ -0,0 +1,56 @@ +/// +import { SimpleGitTask } from './tasks'; +export * from './handlers'; +export * from './tasks'; +/** + * Most tasks accept custom options as an array of strings as well as the + * options object. Unless the task is explicitly documented as such, the + * tasks will not accept both formats at the same time, preferring whichever + * appears last in the arguments. + */ +export declare type TaskOptions = string[] | O; +/** + * Options supplied in most tasks as an optional trailing object + */ +export declare type OptionsValues = null | string | number; +export declare type Options = Record; +export declare type OptionFlags = Partial>; +/** + * A function called by the executor immediately after creating a child + * process. Allows the calling application to implement custom handling of + * the incoming stream of data from the `git`. + */ +export declare type outputHandler = (command: string, stdout: NodeJS.ReadableStream, stderr: NodeJS.ReadableStream, args: string[]) => void; +/** + * Environment variables to be passed into the child process. + */ +export declare type GitExecutorEnv = NodeJS.ProcessEnv | undefined; +/** + * Public interface of the Executor + */ +export interface SimpleGitExecutor { + env: GitExecutorEnv; + outputHandler?: outputHandler; + binary: string; + cwd: string; + push(task: SimpleGitTask): Promise; +} +/** + * The resulting output from running the git child process + */ +export interface GitExecutorResult { + stdOut: Buffer[]; + stdErr: Buffer[]; + exitCode: number; +} +/** + * Optional configuration settings to be passed to the `simpleGit` + * builder. + */ +export interface SimpleGitOptions { + baseDir: string; + binary: string; + maxConcurrentProcesses: number; +} +export declare type Maybe = T | undefined; +export declare type Primitives = string | number | boolean; diff --git a/Client/node_modules/simple-git/src/lib/types/index.js b/Client/node_modules/simple-git/src/lib/types/index.js new file mode 100644 index 000000000..f8d0edad3 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/index.js @@ -0,0 +1,15 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./handlers"), exports); +__exportStar(require("./tasks"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/types/index.js.map b/Client/node_modules/simple-git/src/lib/types/index.js.map new file mode 100644 index 000000000..bc5dca09f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6CAA2B;AAC3B,0CAAwB"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/types/tasks.d.ts b/Client/node_modules/simple-git/src/lib/types/tasks.d.ts new file mode 100644 index 000000000..da4a59c15 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/tasks.d.ts @@ -0,0 +1,25 @@ +/// +import { EmptyTask } from '../tasks/task'; +export declare type TaskResponseFormat = Buffer | string; +export interface TaskParser { + (stdOut: INPUT, stdErr: INPUT): RESPONSE; +} +export interface EmptyTaskParser { + (): RESPONSE; +} +export interface SimpleGitTaskConfiguration { + commands: string[]; + format: FORMAT; + parser: TaskParser; + onError?: (exitCode: number, error: string, done: (result: INPUT) => void, fail: (error: string) => void) => void; + /** + * @deprecated + * Use of `concatStdErr` is now deprecated, to be removed by v2.50.0 (or on upgrading to v3). + * Instead, use the `stdErr` argument supplied to the `parser` + */ + concatStdErr?: boolean; +} +export declare type StringTask = SimpleGitTaskConfiguration; +export declare type BufferTask = SimpleGitTaskConfiguration; +export declare type RunnableTask = StringTask | BufferTask; +export declare type SimpleGitTask = RunnableTask | EmptyTask; diff --git a/Client/node_modules/simple-git/src/lib/types/tasks.js b/Client/node_modules/simple-git/src/lib/types/tasks.js new file mode 100644 index 000000000..5e36badf2 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/tasks.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=tasks.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/types/tasks.js.map b/Client/node_modules/simple-git/src/lib/types/tasks.js.map new file mode 100644 index 000000000..e70f4979b --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/types/tasks.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tasks.js","sourceRoot":"","sources":["tasks.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/argument-filters.d.ts b/Client/node_modules/simple-git/src/lib/utils/argument-filters.d.ts new file mode 100644 index 000000000..6be6925d9 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/argument-filters.d.ts @@ -0,0 +1,16 @@ +import { Options, Primitives } from '../types'; +export interface ArgumentFilterPredicate { + (input: any): input is T; +} +export declare function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined; +export declare function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T; +export declare const filterArray: ArgumentFilterPredicate>; +export declare function filterPrimitives(input: unknown, omit?: Array<'boolean' | 'string' | 'number'>): input is Primitives; +export declare const filterString: ArgumentFilterPredicate; +export declare const filterStringArray: ArgumentFilterPredicate; +export declare const filterStringOrStringArray: ArgumentFilterPredicate; +export declare function filterPlainObject(input: T | unknown): input is T; +export declare function filterFunction(input: unknown): input is Function; +export declare const filterHasLength: ArgumentFilterPredicate<{ + length: number; +}>; diff --git a/Client/node_modules/simple-git/src/lib/utils/argument-filters.js b/Client/node_modules/simple-git/src/lib/utils/argument-filters.js new file mode 100644 index 000000000..614d44a71 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/argument-filters.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.filterHasLength = exports.filterFunction = exports.filterPlainObject = exports.filterStringOrStringArray = exports.filterStringArray = exports.filterString = exports.filterPrimitives = exports.filterArray = exports.filterType = void 0; +const util_1 = require("./util"); +function filterType(input, filter, def) { + if (filter(input)) { + return input; + } + return (arguments.length > 2) ? def : undefined; +} +exports.filterType = filterType; +const filterArray = (input) => { + return Array.isArray(input); +}; +exports.filterArray = filterArray; +function filterPrimitives(input, omit) { + return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes((typeof input))); +} +exports.filterPrimitives = filterPrimitives; +const filterString = (input) => { + return typeof input === 'string'; +}; +exports.filterString = filterString; +const filterStringArray = (input) => { + return Array.isArray(input) && input.every(exports.filterString); +}; +exports.filterStringArray = filterStringArray; +const filterStringOrStringArray = (input) => { + return exports.filterString(input) || (Array.isArray(input) && input.every(exports.filterString)); +}; +exports.filterStringOrStringArray = filterStringOrStringArray; +function filterPlainObject(input) { + return !!input && util_1.objectToString(input) === '[object Object]'; +} +exports.filterPlainObject = filterPlainObject; +function filterFunction(input) { + return typeof input === 'function'; +} +exports.filterFunction = filterFunction; +const filterHasLength = (input) => { + if (input == null || 'number|boolean|function'.includes(typeof input)) { + return false; + } + return Array.isArray(input) || typeof input === 'string' || typeof input.length === 'number'; +}; +exports.filterHasLength = filterHasLength; +//# sourceMappingURL=argument-filters.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/argument-filters.js.map b/Client/node_modules/simple-git/src/lib/utils/argument-filters.js.map new file mode 100644 index 000000000..7d5b003c3 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/argument-filters.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argument-filters.js","sourceRoot":"","sources":["argument-filters.ts"],"names":[],"mappings":";;;AACA,iCAAwC;AAQxC,SAAgB,UAAU,CAAO,KAAQ,EAAE,MAAkC,EAAE,GAAO;IACnF,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;QAChB,OAAO,KAAK,CAAC;KACf;IACD,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AAClD,CAAC;AALD,gCAKC;AAEM,MAAM,WAAW,GAAwC,CAAC,KAAK,EAAuB,EAAE;IAC5F,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAA;AAFY,QAAA,WAAW,eAEvB;AAED,SAAgB,gBAAgB,CAAC,KAAc,EAAE,IAA6C;IAC3F,OAAO,uBAAuB,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,KAAK,CAAoC,CAAC,CAAC,CAAC;AACrI,CAAC;AAFD,4CAEC;AAEM,MAAM,YAAY,GAAoC,CAAC,KAAK,EAAmB,EAAE;IACrF,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACpC,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEK,MAAM,iBAAiB,GAAsC,CAAC,KAAK,EAAqB,EAAE;IAC9F,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,oBAAY,CAAC,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEK,MAAM,yBAAyB,GAA+C,CAAC,KAAK,EAA8B,EAAE;IACxH,OAAO,oBAAY,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,oBAAY,CAAC,CAAC,CAAC;AACrF,CAAC,CAAC;AAFW,QAAA,yBAAyB,6BAEpC;AAGF,SAAgB,iBAAiB,CAAmB,KAAkB;IACnE,OAAO,CAAC,CAAC,KAAK,IAAI,qBAAc,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;AACjE,CAAC;AAFD,8CAEC;AAED,SAAgB,cAAc,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACtC,CAAC;AAFD,wCAEC;AAEM,MAAM,eAAe,GAAgD,CAAC,KAAK,EAA+B,EAAE;IAChH,IAAI,KAAK,IAAI,IAAI,IAAI,yBAAyB,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,EAAE;QACpE,OAAO,KAAK,CAAC;KACf;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC;AAChG,CAAC,CAAA;AALY,QAAA,eAAe,mBAK3B"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/exit-codes.d.ts b/Client/node_modules/simple-git/src/lib/utils/exit-codes.d.ts new file mode 100644 index 000000000..1c389c7f1 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/exit-codes.d.ts @@ -0,0 +1,9 @@ +/** + * Known process exit codes used by the task parsers to determine whether an error + * was one they can automatically handle + */ +export declare enum ExitCodes { + SUCCESS = 0, + ERROR = 1, + UNCLEAN = 128 +} diff --git a/Client/node_modules/simple-git/src/lib/utils/exit-codes.js b/Client/node_modules/simple-git/src/lib/utils/exit-codes.js new file mode 100644 index 000000000..4b646b8ad --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/exit-codes.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExitCodes = void 0; +/** + * Known process exit codes used by the task parsers to determine whether an error + * was one they can automatically handle + */ +var ExitCodes; +(function (ExitCodes) { + ExitCodes[ExitCodes["SUCCESS"] = 0] = "SUCCESS"; + ExitCodes[ExitCodes["ERROR"] = 1] = "ERROR"; + ExitCodes[ExitCodes["UNCLEAN"] = 128] = "UNCLEAN"; +})(ExitCodes = exports.ExitCodes || (exports.ExitCodes = {})); +//# sourceMappingURL=exit-codes.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/exit-codes.js.map b/Client/node_modules/simple-git/src/lib/utils/exit-codes.js.map new file mode 100644 index 000000000..e30279153 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/exit-codes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["exit-codes.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,SAIX;AAJD,WAAY,SAAS;IAClB,+CAAO,CAAA;IACP,2CAAK,CAAA;IACL,iDAAa,CAAA;AAChB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/git-output-streams.d.ts b/Client/node_modules/simple-git/src/lib/utils/git-output-streams.d.ts new file mode 100644 index 000000000..72db46636 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/git-output-streams.d.ts @@ -0,0 +1,8 @@ +/// +import { TaskResponseFormat } from '../types'; +export declare class GitOutputStreams { + readonly stdOut: T; + readonly stdErr: T; + constructor(stdOut: T, stdErr: T); + asStrings(): GitOutputStreams; +} diff --git a/Client/node_modules/simple-git/src/lib/utils/git-output-streams.js b/Client/node_modules/simple-git/src/lib/utils/git-output-streams.js new file mode 100644 index 000000000..7ac24aaa8 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/git-output-streams.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GitOutputStreams = void 0; +class GitOutputStreams { + constructor(stdOut, stdErr) { + this.stdOut = stdOut; + this.stdErr = stdErr; + } + asStrings() { + return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8')); + } +} +exports.GitOutputStreams = GitOutputStreams; +//# sourceMappingURL=git-output-streams.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/git-output-streams.js.map b/Client/node_modules/simple-git/src/lib/utils/git-output-streams.js.map new file mode 100644 index 000000000..eb2b68bce --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/git-output-streams.js.map @@ -0,0 +1 @@ +{"version":3,"file":"git-output-streams.js","sourceRoot":"","sources":["git-output-streams.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;IAE1B,YAA4B,MAAS,EAAkB,MAAS;QAApC,WAAM,GAAN,MAAM,CAAG;QAAkB,WAAM,GAAN,MAAM,CAAG;IAChE,CAAC;IAED,SAAS;QACN,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3F,CAAC;CACH;AARD,4CAQC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/index.d.ts b/Client/node_modules/simple-git/src/lib/utils/index.d.ts new file mode 100644 index 000000000..04cb604c4 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/index.d.ts @@ -0,0 +1,8 @@ +export * from './argument-filters'; +export * from './exit-codes'; +export * from './git-output-streams'; +export * from './line-parser'; +export * from './simple-git-options'; +export * from './task-options'; +export * from './task-parser'; +export * from './util'; diff --git a/Client/node_modules/simple-git/src/lib/utils/index.js b/Client/node_modules/simple-git/src/lib/utils/index.js new file mode 100644 index 000000000..683aaf935 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/index.js @@ -0,0 +1,21 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./argument-filters"), exports); +__exportStar(require("./exit-codes"), exports); +__exportStar(require("./git-output-streams"), exports); +__exportStar(require("./line-parser"), exports); +__exportStar(require("./simple-git-options"), exports); +__exportStar(require("./task-options"), exports); +__exportStar(require("./task-parser"), exports); +__exportStar(require("./util"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/index.js.map b/Client/node_modules/simple-git/src/lib/utils/index.js.map new file mode 100644 index 000000000..48e35b84f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAAmC;AACnC,+CAA6B;AAC7B,uDAAqC;AACrC,gDAA8B;AAC9B,uDAAqC;AACrC,iDAA+B;AAC/B,gDAA8B;AAC9B,yCAAuB"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/line-parser.d.ts b/Client/node_modules/simple-git/src/lib/utils/line-parser.d.ts new file mode 100644 index 000000000..c50560aa8 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/line-parser.d.ts @@ -0,0 +1,15 @@ +export declare class LineParser { + protected matches: string[]; + private _regExp; + constructor(regExp: RegExp | RegExp[], useMatches?: (target: T, match: string[]) => boolean | void); + parse: (line: (offset: number) => (string | undefined), target: T) => boolean; + protected useMatches(target: T, match: string[]): boolean | void; + protected resetMatches(): void; + protected prepareMatches(): string[]; + protected addMatch(reg: RegExp, index: number, line?: string): boolean; + protected pushMatch(_index: number, matched: string[]): void; +} +export declare class RemoteLineParser extends LineParser { + protected addMatch(reg: RegExp, index: number, line?: string): boolean; + protected pushMatch(index: number, matched: string[]): void; +} diff --git a/Client/node_modules/simple-git/src/lib/utils/line-parser.js b/Client/node_modules/simple-git/src/lib/utils/line-parser.js new file mode 100644 index 000000000..97271499c --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/line-parser.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RemoteLineParser = exports.LineParser = void 0; +class LineParser { + constructor(regExp, useMatches) { + this.matches = []; + this.parse = (line, target) => { + this.resetMatches(); + if (!this._regExp.every((reg, index) => this.addMatch(reg, index, line(index)))) { + return false; + } + return this.useMatches(target, this.prepareMatches()) !== false; + }; + this._regExp = Array.isArray(regExp) ? regExp : [regExp]; + if (useMatches) { + this.useMatches = useMatches; + } + } + // @ts-ignore + useMatches(target, match) { + throw new Error(`LineParser:useMatches not implemented`); + } + resetMatches() { + this.matches.length = 0; + } + prepareMatches() { + return this.matches; + } + addMatch(reg, index, line) { + const matched = line && reg.exec(line); + if (matched) { + this.pushMatch(index, matched); + } + return !!matched; + } + pushMatch(_index, matched) { + this.matches.push(...matched.slice(1)); + } +} +exports.LineParser = LineParser; +class RemoteLineParser extends LineParser { + addMatch(reg, index, line) { + return /^remote:\s/.test(String(line)) && super.addMatch(reg, index, line); + } + pushMatch(index, matched) { + if (index > 0 || matched.length > 1) { + super.pushMatch(index, matched); + } + } +} +exports.RemoteLineParser = RemoteLineParser; +//# sourceMappingURL=line-parser.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/line-parser.js.map b/Client/node_modules/simple-git/src/lib/utils/line-parser.js.map new file mode 100644 index 000000000..af4ed9d91 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/line-parser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"line-parser.js","sourceRoot":"","sources":["line-parser.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;IAMpB,YACG,MAAyB,EACzB,UAA2D;QANpD,YAAO,GAAa,EAAE,CAAC;QAcjC,UAAK,GAAG,CAAC,IAA8C,EAAE,MAAS,EAAW,EAAE;YAC5E,IAAI,CAAC,YAAY,EAAE,CAAC;YAEpB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;gBAC9E,OAAO,KAAK,CAAC;aACf;YAED,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,KAAK,KAAK,CAAC;QACnE,CAAC,CAAA;QAdE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACzD,IAAI,UAAU,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAC/B;IACJ,CAAC;IAYD,aAAa;IACH,UAAU,CAAC,MAAS,EAAE,KAAe;QAC5C,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC5D,CAAC;IAES,YAAY;QACnB,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3B,CAAC;IAES,cAAc;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC;IACvB,CAAC;IAES,QAAQ,CAAC,GAAW,EAAE,KAAa,EAAE,IAAa;QACzD,MAAM,OAAO,GAAG,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,OAAO,EAAE;YACV,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;SACjC;QAED,OAAO,CAAC,CAAC,OAAO,CAAC;IACpB,CAAC;IAES,SAAS,CAAC,MAAc,EAAE,OAAiB;QAClD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;CAEH;AApDD,gCAoDC;AAED,MAAa,gBAAoB,SAAQ,UAAa;IAEzC,QAAQ,CAAC,GAAW,EAAE,KAAa,EAAE,IAAa;QACzD,OAAO,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;IAES,SAAS,CAAC,KAAa,EAAE,OAAiB;QACjD,IAAI,KAAK,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YAClC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;SAClC;IACJ,CAAC;CAEH;AAZD,4CAYC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/simple-git-options.d.ts b/Client/node_modules/simple-git/src/lib/utils/simple-git-options.d.ts new file mode 100644 index 000000000..b29cbaf29 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/simple-git-options.d.ts @@ -0,0 +1,2 @@ +import { SimpleGitOptions } from '../types'; +export declare function createInstanceConfig(...options: Array>): SimpleGitOptions; diff --git a/Client/node_modules/simple-git/src/lib/utils/simple-git-options.js b/Client/node_modules/simple-git/src/lib/utils/simple-git-options.js new file mode 100644 index 000000000..389f47e00 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/simple-git-options.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createInstanceConfig = void 0; +const defaultOptions = { + binary: 'git', + maxConcurrentProcesses: 5, +}; +function createInstanceConfig(...options) { + const baseDir = process.cwd(); + const config = Object.assign(Object.assign({ baseDir }, defaultOptions), ...(options.filter(o => typeof o === 'object' && o))); + config.baseDir = config.baseDir || baseDir; + return config; +} +exports.createInstanceConfig = createInstanceConfig; +//# sourceMappingURL=simple-git-options.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/simple-git-options.js.map b/Client/node_modules/simple-git/src/lib/utils/simple-git-options.js.map new file mode 100644 index 000000000..5c4c51afd --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/simple-git-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"simple-git-options.js","sourceRoot":"","sources":["simple-git-options.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAsC;IACvD,MAAM,EAAE,KAAK;IACb,sBAAsB,EAAE,CAAC;CAC3B,CAAC;AAEF,SAAgB,oBAAoB,CAAC,GAAG,OAAyC;IAC9E,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAqB,MAAM,CAAC,MAAM,iBAAE,OAAO,IAAK,cAAc,GACvE,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,CACtD,CAAC;IAEF,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC;IAE3C,OAAO,MAAM,CAAC;AACjB,CAAC;AATD,oDASC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/task-options.d.ts b/Client/node_modules/simple-git/src/lib/utils/task-options.d.ts new file mode 100644 index 000000000..0a09dc370 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/task-options.d.ts @@ -0,0 +1,13 @@ +import { Maybe, Options } from '../types'; +export declare function appendTaskOptions(options: Maybe, commands?: string[]): string[]; +export declare function getTrailingOptions(args: T, initialPrimitive?: number, objectOnly?: boolean): string[]; +/** + * Given any number of arguments, returns the trailing options argument, ignoring a trailing function argument + * if there is one. When not found, the return value is null. + */ +export declare function trailingOptionsArgument(args: T): Maybe; +/** + * Returns either the source argument when it is a `Function`, or the default + * `NOOP` function constant + */ +export declare function trailingFunctionArgument(args: unknown[] | IArguments | unknown, includeNoop?: boolean): Maybe; diff --git a/Client/node_modules/simple-git/src/lib/utils/task-options.js b/Client/node_modules/simple-git/src/lib/utils/task-options.js new file mode 100644 index 000000000..1b9fb8651 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/task-options.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.trailingFunctionArgument = exports.trailingOptionsArgument = exports.getTrailingOptions = exports.appendTaskOptions = void 0; +const argument_filters_1 = require("./argument-filters"); +const util_1 = require("./util"); +function appendTaskOptions(options, commands = []) { + if (!argument_filters_1.filterPlainObject(options)) { + return commands; + } + return Object.keys(options).reduce((commands, key) => { + const value = options[key]; + if (argument_filters_1.filterPrimitives(value, ['boolean'])) { + commands.push(key + '=' + value); + } + else { + commands.push(key); + } + return commands; + }, commands); +} +exports.appendTaskOptions = appendTaskOptions; +function getTrailingOptions(args, initialPrimitive = 0, objectOnly = false) { + const command = []; + for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) { + if ('string|number'.includes(typeof args[i])) { + command.push(String(args[i])); + } + } + appendTaskOptions(trailingOptionsArgument(args), command); + if (!objectOnly) { + command.push(...trailingArrayArgument(args)); + } + return command; +} +exports.getTrailingOptions = getTrailingOptions; +function trailingArrayArgument(args) { + const hasTrailingCallback = typeof util_1.last(args) === 'function'; + return argument_filters_1.filterType(util_1.last(args, hasTrailingCallback ? 1 : 0), argument_filters_1.filterArray, []); +} +/** + * Given any number of arguments, returns the trailing options argument, ignoring a trailing function argument + * if there is one. When not found, the return value is null. + */ +function trailingOptionsArgument(args) { + const hasTrailingCallback = argument_filters_1.filterFunction(util_1.last(args)); + return argument_filters_1.filterType(util_1.last(args, hasTrailingCallback ? 1 : 0), argument_filters_1.filterPlainObject); +} +exports.trailingOptionsArgument = trailingOptionsArgument; +/** + * Returns either the source argument when it is a `Function`, or the default + * `NOOP` function constant + */ +function trailingFunctionArgument(args, includeNoop = true) { + const callback = util_1.asFunction(util_1.last(args)); + return includeNoop || util_1.isUserFunction(callback) ? callback : undefined; +} +exports.trailingFunctionArgument = trailingFunctionArgument; +//# sourceMappingURL=task-options.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/task-options.js.map b/Client/node_modules/simple-git/src/lib/utils/task-options.js.map new file mode 100644 index 000000000..fe7746303 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/task-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"task-options.js","sourceRoot":"","sources":["task-options.ts"],"names":[],"mappings":";;;AAAA,yDAAkH;AAClH,iCAA0D;AAG1D,SAAgB,iBAAiB,CAA8B,OAAiB,EAAE,WAAqB,EAAE;IACtG,IAAI,CAAC,oCAAiB,CAAU,OAAO,CAAC,EAAE;QACvC,OAAO,QAAQ,CAAC;KAClB;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,QAAkB,EAAE,GAAW,EAAE,EAAE;QACpE,MAAM,KAAK,GAAkB,OAAO,CAAC,GAAG,CAAC,CAAC;QAE1C,IAAI,mCAAgB,CAAC,KAAK,E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C;AACL,CAAC;AAED;;;GAGG;AACH,SAAgB,uBAAuB,CAAkB,IAAO;IAC7D,MAAM,mBAAmB,GAAG,iCAAc,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACvD,OAAO,6BAAU,CAAC,WAAI,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,oCAAiB,CAAC,CAAC;AACjF,CAAC;AAHD,0DAGC;AAED;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,IAAsC,EAAE,WAAW,GAAG,IAAI;IAChG,MAAM,QAAQ,GAAG,iBAAU,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC,OAAO,WAAW,IAAI,qBAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AACzE,CAAC;AAHD,4DAGC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/task-parser.d.ts b/Client/node_modules/simple-git/src/lib/utils/task-parser.d.ts new file mode 100644 index 000000000..5734495ed --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/task-parser.d.ts @@ -0,0 +1,5 @@ +import { TaskParser, TaskResponseFormat } from '../types'; +import { GitOutputStreams } from './git-output-streams'; +import { LineParser } from './line-parser'; +export declare function callTaskParser(parser: TaskParser, streams: GitOutputStreams): RESPONSE; +export declare function parseStringResponse(result: T, parsers: LineParser[], ...texts: string[]): T; diff --git a/Client/node_modules/simple-git/src/lib/utils/task-parser.js b/Client/node_modules/simple-git/src/lib/utils/task-parser.js new file mode 100644 index 000000000..694d52655 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/task-parser.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseStringResponse = exports.callTaskParser = void 0; +const util_1 = require("./util"); +function callTaskParser(parser, streams) { + return parser(streams.stdOut, streams.stdErr); +} +exports.callTaskParser = callTaskParser; +function parseStringResponse(result, parsers, ...texts) { + texts.forEach(text => { + for (let lines = util_1.toLinesWithContent(text), i = 0, max = lines.length; i < max; i++) { + const line = (offset = 0) => { + if ((i + offset) >= max) { + return; + } + return lines[i + offset]; + }; + parsers.some(({ parse }) => parse(line, result)); + } + }); + return result; +} +exports.parseStringResponse = parseStringResponse; +//# sourceMappingURL=task-parser.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/task-parser.js.map b/Client/node_modules/simple-git/src/lib/utils/task-parser.js.map new file mode 100644 index 000000000..7d0ea0f4e --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/task-parser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"task-parser.js","sourceRoot":"","sources":["task-parser.ts"],"names":[],"mappings":";;;AAGA,iCAA4C;AAE5C,SAAgB,cAAc,CAA6C,MAAmC,EAAE,OAAgC;IAC7I,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAFD,wCAEC;AAED,SAAgB,mBAAmB,CAAI,MAAS,EAAE,OAAwB,EAAE,GAAG,KAAe;IAC3F,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAClB,KAAK,IAAI,KAAK,GAAG,yBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YACjF,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE;gBACzB,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,GAAG,EAAE;oBACtB,OAAO;iBACT;gBACD,OAAO,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;YAC5B,CAAC,CAAA;YAED,OAAO,CAAC,IAAI,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;SACjD;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AACjB,CAAC;AAfD,kDAeC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/util.d.ts b/Client/node_modules/simple-git/src/lib/utils/util.d.ts new file mode 100644 index 000000000..3873a475f --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/util.d.ts @@ -0,0 +1,32 @@ +import { Maybe } from '../types'; +export declare const NOOP: (...args: any[]) => void; +/** + * Returns either the source argument when it is a `Function`, or the default + * `NOOP` function constant + */ +export declare function asFunction(source: T | any): T; +/** + * Determines whether the supplied argument is both a function, and is not + * the `NOOP` function. + */ +export declare function isUserFunction(source: T | any): source is T; +export declare function splitOn(input: string, char: string): [string, string]; +export declare function first(input: T, offset?: number): Maybe; +export declare function first(input: T, offset?: number): Maybe; +export declare function last(input: T, offset?: number): Maybe; +export declare function last(input: T, offset?: number): Maybe; +export declare function last(input: T, offset?: number): Maybe; +export declare function toLinesWithContent(input: string, trimmed?: boolean, separator?: string): string[]; +declare type LineWithContentCallback = (line: string) => T; +export declare function forEachLineWithContent(input: string, callback: LineWithContentCallback): T[]; +export declare function folderExists(path: string): boolean; +/** + * Adds `item` into the `target` `Array` or `Set` when it is not already present. + */ +export declare function append(target: T[] | Set, item: T): typeof item; +export declare function remove(target: Set | T[], item: T): T; +export declare const objectToString: (input: any) => string; +export declare function asArray(source: T | T[]): T[]; +export declare function asStringArray(source: T | T[]): string[]; +export declare function asNumber(source: string | null | undefined, onNaN?: number): number; +export {}; diff --git a/Client/node_modules/simple-git/src/lib/utils/util.js b/Client/node_modules/simple-git/src/lib/utils/util.js new file mode 100644 index 000000000..1df210522 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/util.js @@ -0,0 +1,112 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.asNumber = exports.asStringArray = exports.asArray = exports.objectToString = exports.remove = exports.append = exports.folderExists = exports.forEachLineWithContent = exports.toLinesWithContent = exports.last = exports.first = exports.splitOn = exports.isUserFunction = exports.asFunction = exports.NOOP = void 0; +const file_exists_1 = require("@kwsites/file-exists"); +const NOOP = () => { +}; +exports.NOOP = NOOP; +/** + * Returns either the source argument when it is a `Function`, or the default + * `NOOP` function constant + */ +function asFunction(source) { + return typeof source === 'function' ? source : exports.NOOP; +} +exports.asFunction = asFunction; +/** + * Determines whether the supplied argument is both a function, and is not + * the `NOOP` function. + */ +function isUserFunction(source) { + return (typeof source === 'function' && source !== exports.NOOP); +} +exports.isUserFunction = isUserFunction; +function splitOn(input, char) { + const index = input.indexOf(char); + if (index <= 0) { + return [input, '']; + } + return [ + input.substr(0, index), + input.substr(index + 1), + ]; +} +exports.splitOn = splitOn; +function first(input, offset = 0) { + return isArrayLike(input) && input.length > offset ? input[offset] : undefined; +} +exports.first = first; +function last(input, offset = 0) { + if (isArrayLike(input) && input.length > offset) { + return input[input.length - 1 - offset]; + } +} +exports.last = last; +function isArrayLike(input) { + return !!(input && typeof input.length === 'number'); +} +function toLinesWithContent(input, trimmed = true, separator = '\n') { + return input.split(separator) + .reduce((output, line) => { + const lineContent = trimmed ? line.trim() : line; + if (lineContent) { + output.push(lineContent); + } + return output; + }, []); +} +exports.toLinesWithContent = toLinesWithContent; +function forEachLineWithContent(input, callback) { + return toLinesWithContent(input, true).map(line => callback(line)); +} +exports.forEachLineWithContent = forEachLineWithContent; +function folderExists(path) { + return file_exists_1.exists(path, file_exists_1.FOLDER); +} +exports.folderExists = folderExists; +/** + * Adds `item` into the `target` `Array` or `Set` when it is not already present. + */ +function append(target, item) { + if (Array.isArray(target)) { + if (!target.includes(item)) { + target.push(item); + } + } + else { + target.add(item); + } + return item; +} +exports.append = append; +function remove(target, item) { + if (Array.isArray(target)) { + const index = target.indexOf(item); + if (index >= 0) { + target.splice(index, 1); + } + } + else { + target.delete(item); + } + return item; +} +exports.remove = remove; +exports.objectToString = Object.prototype.toString.call.bind(Object.prototype.toString); +function asArray(source) { + return Array.isArray(source) ? source : [source]; +} +exports.asArray = asArray; +function asStringArray(source) { + return asArray(source).map(String); +} +exports.asStringArray = asStringArray; +function asNumber(source, onNaN = 0) { + if (source == null) { + return onNaN; + } + const num = parseInt(source, 10); + return isNaN(num) ? onNaN : num; +} +exports.asNumber = asNumber; +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/Client/node_modules/simple-git/src/lib/utils/util.js.map b/Client/node_modules/simple-git/src/lib/utils/util.js.map new file mode 100644 index 000000000..7709642c9 --- /dev/null +++ b/Client/node_modules/simple-git/src/lib/utils/util.js.map @@ -0,0 +1 @@ +{"version":3,"file":"util.js","sourceRoot":"","sources":["util.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AAG/C,MAAM,IAAI,GAA6B,GAAG,EAAE;AACnD,CAAC,CAAC;AADW,QAAA,IAAI,QACf;AAEF;;;GAGG;AACH,SAAgB,UAAU,CAAqB,MAAe;IAC3D,OAAO,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAI,CAAC;AACvD,CAAC;AAFD,gCAEC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAqB,MAAe;IAC/D,OAAO,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,YAAI,CAAC,CAAC;AAC5D,CAAC;AAFD,wCAEC;AAED,SAAgB,OAAO,CAAC,KAAa,EAAE,IAAY;IAChD,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,KAAK,IAAI,CAAC,EAAE;QACb,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;KACrB;IAED,OAAO;QACJ,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC;QACtB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;KACzB,CAAC;AACL,CAAC;AAVD,0BAUC;AAID,SAA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CAAC,CAAC;AACtC,CAAC;AAFD,sCAEC;AAED,SAAgB,QAAQ,CAAC,MAAiC,EAAE,KAAK,GAAG,CAAC;IAClE,IAAI,MAAM,IAAI,IAAI,EAAE;QACjB,OAAO,KAAK,CAAC;KACf;IAED,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC;AAPD,4BAOC"} \ No newline at end of file diff --git a/Client/node_modules/simple-git/typings/errors.d.ts b/Client/node_modules/simple-git/typings/errors.d.ts new file mode 100644 index 000000000..3159b7154 --- /dev/null +++ b/Client/node_modules/simple-git/typings/errors.d.ts @@ -0,0 +1,5 @@ + +export * from '../src/lib/errors/git-error'; +export * from '../src/lib/errors/git-construct-error'; +export * from '../src/lib/errors/git-response-error'; +export * from '../src/lib/errors/task-configuration-error'; diff --git a/Client/node_modules/simple-git/typings/index.d.ts b/Client/node_modules/simple-git/typings/index.d.ts new file mode 100644 index 000000000..fc284f2b3 --- /dev/null +++ b/Client/node_modules/simple-git/typings/index.d.ts @@ -0,0 +1,11 @@ +import { SimpleGitFactory } from './simple-git'; + +export * from './simple-git'; +export * from './errors'; +export * from './response'; +export * from './types'; + +export declare const gitP: SimpleGitFactory; + +declare const simpleGit: SimpleGitFactory; +export default simpleGit; diff --git a/Client/node_modules/simple-git/typings/response.d.ts b/Client/node_modules/simple-git/typings/response.d.ts new file mode 100644 index 000000000..8f3f4e69e --- /dev/null +++ b/Client/node_modules/simple-git/typings/response.d.ts @@ -0,0 +1,453 @@ +import { DefaultLogFields } from '../src/lib/tasks/log'; + +export interface BranchSummaryBranch { + current: boolean; + name: string; + commit: string; + label: string; +} + +export interface BranchSummary { + detached: boolean; + current: string; + all: string[]; + branches: { + [key: string]: BranchSummaryBranch; + }; +} + +/** + * Represents the successful deletion of a single branch + */ +export interface BranchSingleDeleteSuccess { + branch: string; + hash: string; + success: true; +} + +/** + * Represents the failure to delete a single branch + */ +export interface BranchSingleDeleteFailure { + branch: string; + hash: null; + success: false; +} + +export type BranchSingleDeleteResult = BranchSingleDeleteFailure | BranchSingleDeleteSuccess; + +/** + * Represents the status of having deleted a batch of branches + */ +export interface BranchMultiDeleteResult { + /** + * All branches included in the response + */ + all: BranchSingleDeleteResult[]; + + /** + * Branches mapped by their branch name + */ + branches: { [branchName: string]: BranchSingleDeleteResult }; + + /** + * Array of responses that are in error + */ + errors: BranchSingleDeleteResult[]; + + /** + * Flag showing whether all branches were deleted successfully + */ + readonly success: boolean; +} + +export interface CleanSummary { + readonly dryRun: boolean; + paths: string[]; + files: string[]; + folders: string[]; +} + +export interface CommitResult { + author: null | { + email: string; + name: string; + }; + branch: string; + commit: string; + root: boolean; + summary: { + changes: number; + insertions: number; + deletions: number; + }; +} + +/** + * Represents the current git configuration, as defined by the output from `git log` + */ +export interface ConfigListSummary { + + /** + * All configuration settings, where local/user settings override user/global settings + * the overridden value will appear in this object. + */ + readonly all: ConfigValues; + + /** + * The file paths configuration was read from + */ + files: string[]; + + /** + * The `ConfigValues` for each of the `files`, use this object to determine + * local repo, user and global settings. + */ + values: { [fileName: string]: ConfigValues }; +} + +/** + * Represents the map of configuration settings + */ +export interface ConfigValues { + [key: string]: string | string[]; +} + +export interface DiffResultTextFile { + file: string; + changes: number; + insertions: number; + deletions: number; + binary: boolean; +} + +export interface DiffResultBinaryFile { + file: string; + before: number; + after: number; + binary: boolean; +} + +export interface DiffResult { + /** The total number of files changed as reported in the summary line */ + changed: number; + + /** When present in the diff, lists the details of each file changed */ + files: Array; + + /** The number of files changed with insertions */ + insertions: number; + + /** The number of files changed with deletions */ + deletions: number; +} + +export interface FetchResult { + raw: string; + remote: string | null; + branches: { + name: string; + tracking: string; + }[]; + tags: { + name: string; + tracking: string; + }[]; +} + +/** + * The `InitResult` is returned when (re)initialising a git repo. + */ +export interface InitResult { + /** + * Boolean representing whether the `--bare` option was used + */ + readonly bare: boolean; + + /** + * Boolean representing whether the repo already existed (re-initialised rather than initialised) + */ + readonly existing: boolean; + + /** + * The path used when initialising + */ + readonly path: string; + + /** + * The git configuration directory - for a bare repo this is the same as `path`, in non-bare repos + * this will usually be a sub-directory with the name `.git` (or value of the `$GIT_DIR` environment + * variable). + */ + readonly gitDir: string; +} + +/** + * A parsed response summary for calls to `git mv` + */ +export interface MoveResult { + /** + * Array of files moved + */ + moves: Array<{from: string, to: string}>; +} + +export interface PullDetailFileChanges { + [fileName: string]: number; +} + +export interface PullDetailSummary { + changes: number; + insertions: number; + deletions: number; +} + +export interface PullDetail { + /** Array of all files that are referenced in the pull */ + files: string[]; + + /** Map of file names to the number of insertions in that file */ + insertions: PullDetailFileChanges; + + /** Map of file names to the number of deletions in that file */ + deletions: PullDetailFileChanges; + + summary: PullDetailSummary; + + /** Array of file names that have been created */ + created: string[]; + + /** Array of file names that have been deleted */ + deleted: string[]; +} + +export interface PullResult extends PullDetail, RemoteMessageResult { +} + +/** + * Represents file name changes in a StatusResult + */ +export interface StatusResultRenamed { + from: string; + to: string; +} + +export interface FileStatusResult { + + /** Original location of the file, when the file has been moved */ + from?: string + + /** Path of the file */ + path: string; + + /** First digit of the status code of the file, e.g. 'M' = modified. + Represents the status of the index if no merge conflicts, otherwise represents + status of one side of the merge. */ + index: string; + + /** Second digit of the status code of the file. Represents status of the working directory + if no merge conflicts, otherwise represents status of other side of a merge. */ + working_dir: string; +} + +/** + * The StatusResult is returned for calls to `git.status()`, represents the state of the + * working directory. + */ +export interface StatusResult { + not_added: string[]; + conflicted: string[]; + created: string[]; + deleted: string[]; + modified: string[]; + renamed: StatusResultRenamed[]; + staged: string[]; + files: FileStatusResult[]; + ahead: number; + behind: number; + current: string | null; + tracking: string | null; + + /** + * Gets whether this represents a clean working branch. + */ + isClean(): boolean; +} + +/** + * Response retrieved when using the `git.tags` method + */ +export interface TagResult { + /** + * All tag names + */ + all: string[]; + + /** + * The semver latest tag name or `undefined` when no tags are named in the response + */ + latest: string | undefined; +} + +/** + * The ListLogLine represents a single entry in the `git.log`, the properties on the object + * are mixed in depending on the names used in the format (see `DefaultLogFields`), but some + * properties are dependent on the command used. + */ +export interface ListLogLine { + /** + * When using a `--stat=4096` or `--shortstat` options in the `git.log` or `git.stashList`, + * each entry in the `ListLogSummary` will also have a `diff` property representing as much + * detail as was given in the response. + */ + diff?: DiffResult; +} + +export interface LogResult { + all: ReadonlyArray; + total: number; + latest: (T & ListLogLine) | null; +} + +/** + * Where the file was deleted, if there is a modify/delete conflict + */ +export interface MergeConflictDeletion { + deleteRef: string; +} + +/** + * Represents a single file with conflicts in the MergeSummary + */ +export interface MergeConflict { + + /** + * Type of conflict + */ + reason: string; + + /** + * Path to file + */ + file: string | null; + + /** + * Additional detail for the specific type of conflict + */ + meta?: MergeConflictDeletion; +} + +export type MergeResultStatus = 'success' | string; + +export interface MergeDetail { + conflicts: MergeConflict[]; + merges: string[]; + result: MergeResultStatus; + readonly failed: boolean; +} + +export type MergeResult = PullResult & MergeDetail; + +/** + * + */ +export interface PushResultPushedItem { + local: string; + remote: string; + + readonly deleted: boolean; + readonly tag: boolean; + readonly branch: boolean; + readonly new: boolean; + readonly alreadyUpdated: boolean; +} + +export interface RemoteMessagesObjectEnumeration { + enumerating: number, + counting: number, + compressing: number, + total: { + count: number, + delta: number, + }, + reused: { + count: number, + delta: number, + }, + packReused: number, +} + +export interface RemoteMessages { + all: string[]; + objects?: RemoteMessagesObjectEnumeration; +} + +export interface PushResultRemoteMessages extends RemoteMessages { + pullRequestUrl?: string; + vulnerabilities?: { + count: number; + summary: string; + url: string; + }; +} + +export interface RemoteMessageResult { + remoteMessages: T; +} + +export interface PushResultBranchUpdate { + head: { + local: string; + remote: string; + }; + hash: { + from: string; + to: string; + }; +} + +export interface PushDetail { + repo?: string; + ref?: { + local: string; + }; + pushed: PushResultPushedItem[]; + branch?: { + local: string; + remote: string; + remoteName: string; + }; + update?: PushResultBranchUpdate; +} + +export interface PushResult extends PushDetail, RemoteMessageResult { +} + +/** + * @deprecated + * For consistent naming, please use `CommitResult` instead of `CommitSummary` + */ +export type CommitSummary = CommitResult; + +/** + * @deprecated + * For consistent naming, please use `MergeResult` instead of `MergeSummary` + */ +export type MergeSummary = MergeResult; + +/** + * @deprecated to aid consistent naming, please use `BranchSingleDeleteResult` instead of `BranchDeletionSummary`. + */ +export type BranchDeletionSummary = BranchSingleDeleteResult; + +/** + * @deprecated to aid consistent naming, please use `BranchMultiDeleteResult` instead of `BranchDeletionBatchSummary`. + */ +export type BranchDeletionBatchSummary = BranchMultiDeleteResult; + +export type MoveSummary = MoveResult; + +/** + * @deprecated to aid consistent naming, please use `LogResult` instead of `ListLogSummary`. + */ +export type ListLogSummary = LogResult; diff --git a/Client/node_modules/simple-git/typings/simple-git.d.ts b/Client/node_modules/simple-git/typings/simple-git.d.ts new file mode 100644 index 000000000..d39f4ce41 --- /dev/null +++ b/Client/node_modules/simple-git/typings/simple-git.d.ts @@ -0,0 +1,621 @@ +import * as resp from './response'; +import * as types from './types'; +import { GitError } from './errors'; + +export interface SimpleGitFactory { + (baseDir?: string, options?: Partial): SimpleGit; + + (baseDir: string): SimpleGit; + + (options: Partial): SimpleGit; +} + +type Response = SimpleGit & Promise; + +export interface SimpleGit { + /** + * Adds one or more files to source control + */ + add(files: string | string[], callback?: types.SimpleGitTaskCallback): Response; + + /** + * Add an annotated tag to the head of the current branch + */ + addAnnotatedTag(tagName: string, tagMessage: string, callback?: types.SimpleGitTaskCallback<{ name: string }>): Response<{ name: string }>; + + /** + * Add config to local git instance for the specified `key` (eg: user.name) and value (eg: 'your name'). + * Set `append` to true to append to rather than overwrite the key + */ + addConfig(key: string, value: string, append?: boolean, callback?: types.SimpleGitTaskCallback): Response; + + addConfig(key: string, value: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Applies a patch to the repo + */ + applyPatch(patches: string | string[], options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + applyPatch(patches: string | string[], callback?: types.SimpleGitTaskCallback): Response; + + /** + * Configuration values visible to git in the current working directory + */ + listConfig(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Adds a remote to the list of remotes. + * + * - `remoteName` Name of the repository - eg "upstream" + * - `remoteRepo` Fully qualified SSH or HTTP(S) path to the remote repo + * - `options` Optional additional settings permitted by the `git remote add` command, merged into the command prior to the repo name and remote url + */ + addRemote(remoteName: string, remoteRepo: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + addRemote(remoteName: string, remoteRepo: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Add a lightweight tag to the head of the current branch + */ + addTag(name: string, callback?: types.SimpleGitTaskCallback<{ name: string }>): Response<{ name: string }>; + + /** + * Equivalent to `catFile` but will return the native `Buffer` of content from the git command's stdout. + */ + binaryCatFile(options: string[], callback?: types.SimpleGitTaskCallback): Response; + + /** + * List all branches + */ + branch(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * List of local branches + */ + branchLocal(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Returns a list of objects in a tree based on commit hash. + * Passing in an object hash returns the object's content, size, and type. + * + * Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents. + * + * @see https://git-scm.com/docs/git-cat-file + */ + catFile(options: string[], callback?: types.SimpleGitTaskCallback): Response; + + catFile(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Check if a pathname or pathnames are excluded by .gitignore + * + */ + checkIgnore(pathNames: string[], callback?: types.SimpleGitTaskCallback): Response; + + checkIgnore(path: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Validates that the current working directory is a valid git repo file path. + * + * To make a more specific assertion of the repo, add the `action` argument: + * + * - `bare` to validate that the working directory is inside a bare repo. + * - `root` to validate that the working directory is the root of a repo. + * - `tree` (default value when omitted) to simply validate that the working + * directory is the descendent of a repo + */ + checkIsRepo(action?: types.CheckRepoActions, callback?: types.SimpleGitTaskCallback): Response; + + checkIsRepo(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Checkout a tag or revision, any number of additional arguments can be passed to the `git checkout` command + * by supplying either a string or array of strings as the `what` parameter. + */ + checkout(what: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + checkout(what: string, callback?: types.SimpleGitTaskCallback): Response; + + checkout(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Checkout a remote branch. + * + * - branchName name of branch. + * - startPoint (e.g origin/development). + */ + checkoutBranch(branchName: string, startPoint: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Internally uses pull and tags to get the list of tags then checks out the latest tag. + */ + checkoutLatestTag(branchName: string, startPoint: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Checkout a local branch + */ + checkoutLocalBranch(branchName: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Deletes unwanted content from the local repo - when supplying the first argument as + * an array of `CleanOptions`, the array must include one of `CleanOptions.FORCE` or + * `CleanOptions.DRY_RUN`. + * + * eg: + * + * ```typescript + await git.clean(CleanOptions.FORCE); + await git.clean(CleanOptions.DRY_RUN + CleanOptions.RECURSIVE); + await git.clean(CleanOptions.FORCE, ['./path']); + await git.clean(CleanOptions.IGNORED + CleanOptions.FORCE, {'./path': null}); + * ``` + */ + clean(args: types.CleanOptions[], options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + clean(mode: types.CleanMode | string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + clean(mode: types.CleanMode | string, callback?: types.SimpleGitTaskCallback): Response; + + clean(options?: types.TaskOptions): Response; + + clean(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Clears the queue of pending commands and returns the wrapper instance for chaining. + */ + clearQueue(): this; + + /** + * Clone a repository into a new directory. + * + * - repoPath repository url to clone e.g. https://github.com/steveukx/git-js.git + * - localPath local folder path to clone to. + * - options supported by [git](https://git-scm.com/docs/git-clone). + */ + clone(repoPath: string, localPath: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + clone(repoPath: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Commits changes in the current working directory - when specific file paths are supplied, only changes on those + * files will be committed. + */ + commit( + message: string | string[], + files?: string | string[], + options?: types.Options, + callback?: types.SimpleGitTaskCallback): Response; + + commit( + message: string | string[], + options?: types.TaskOptions, + callback?: types.SimpleGitTaskCallback): Response; + + commit( + message: string | string[], + files?: string | string[], + callback?: types.SimpleGitTaskCallback): Response; + + commit( + message: string | string[], + callback?: types.SimpleGitTaskCallback): Response; + + /** + * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on + * the system path, or a fully qualified path to the executable. + */ + customBinary(command: string): this; + + /** + * Sets the working directory of the subsequent commands. + */ + cwd(workingDirectory: path, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Delete one local branch. Supply the branchName as a string to return a + * single `BranchDeletionSummary` instances. + * + * - branchName name of branch + * - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches + */ + deleteLocalBranch(branchName: string, forceDelete?: boolean, callback?: types.SimpleGitTaskCallback): Response; + + deleteLocalBranch(branchName: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Delete one or more local branches. Supply the branchName as a string to return a + * single `BranchDeletionSummary` or as an array of branch names to return an array of + * `BranchDeletionSummary` instances. + * + * - branchNames name of branch or array of branch names + * - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches + */ + deleteLocalBranches(branchNames: string[], forceDelete?: boolean, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Get the diff of the current repo compared to the last commit with a set of options supplied as a string. + */ + diff(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Gets a summary of the diff for files in the repo, uses the `git diff --stat` format to calculate changes. + * + * in order to get staged (only): `--cached` or `--staged`. + */ + diffSummary(command: string | number, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + diffSummary(command: string | number, callback?: types.SimpleGitTaskCallback): Response; + + diffSummary(options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + diffSummary(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Sets an environment variable for the spawned child process, either supply both a name and value as strings or + * a single object to entirely replace the current environment variables. + * + * @param {string|Object} name + * @param {string} [value] + */ + env(name: string, value: string): this; + + env(env: object): this; + + /** + * Updates the local working copy database with changes from the default remote repo and branch. + */ + fetch(remote: string, branch: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + fetch(remote: string, branch: string, callback?: types.SimpleGitTaskCallback): Response; + + fetch(remote: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + fetch(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + fetch(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Gets the currently available remotes, setting the optional verbose argument to true includes additional + * detail on the remotes themselves. + */ + getRemotes(callback?: types.SimpleGitTaskCallback): Response; + + getRemotes(verbose?: false, callback?: types.SimpleGitTaskCallback): Response; + + getRemotes(verbose: true, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Compute object ID from a file + */ + hashObject(path: string, callback?: types.SimpleGitTaskCallback): Response; + + hashObject(path: string, write ?: boolean, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Initialize a git repo + */ + init(bare: boolean, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + init(bare: boolean, callback?: types.SimpleGitTaskCallback): Response; + + init(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + init(callback?: types.SimpleGitTaskCallback): Response; + + /** + * List remotes by running the `ls-remote` command with any number of arbitrary options + * in either array of object form. + */ + listRemote(args?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Show commit logs from `HEAD` to the first commit. + * If provided between `options.from` and `options.to` tags or branch. + * + * You can provide `options.file`, which is the path to a file in your repository. Then only this file will be considered. + * + * To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on. + * + * By default the following fields will be part of the result: + * `hash`: full commit hash + * `date`: author date, ISO 8601-like format + * `message`: subject + ref names, like the --decorate option of git-log + * `author_name`: author name + * `author_email`: author mail + * You can specify `options.format` to be an mapping from key to a format option like `%H` (for commit hash). + * The fields specified in `options.format` will be the fields in the result. + * + * Options can also be supplied as a standard options object for adding custom properties supported by the git log command. + * For any other set of options, supply options as an array of strings to be appended to the git log command. + * + * @returns Response + * + * @see https://git-scm.com/docs/git-log + */ + log(options?: types.TaskOptions | types.LogOptions, callback?: types.SimpleGitTaskCallback>): Response>; + + /** + * Runs a merge, `options` can be either an array of arguments + * supported by the [`git merge`](https://git-scm.com/docs/git-merge) + * or an options object. + * + * Conflicts during the merge result in an error response, + * the response type whether it was an error or success will be a MergeSummary instance. + * When successful, the MergeSummary has all detail from a the PullSummary + * + * @see https://github.com/steveukx/git-js/blob/master/src/responses/MergeSummary.js + * @see https://github.com/steveukx/git-js/blob/master/src/responses/PullSummary.js + */ + merge(options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Merges from one branch to another, equivalent to running `git merge ${from} $[to}`, the `options` argument can + * either be an array of additional parameters to pass to the command or null / omitted to be ignored. + * + * - from branch to merge from. + * - to branch to merge to. + */ + mergeFromTo(from: string, to: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + mergeFromTo(from: string, to: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Mirror a git repo + * + * Equivalent to `git.clone(repoPath, localPath, ['--mirror'])`, `clone` allows + * for additional task options. + */ + mirror(repoPath: string, localPath: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Moves one or more files to a new destination. + * + * @see https://git-scm.com/docs/git-mv + */ + mv(from: string | string[], to: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Sets a handler function to be called whenever a new child process is created, the handler function will be called + * with the name of the command being run and the stdout & stderr streams used by the ChildProcess. + * + * @example + * require('simple-git') + * .outputHandler(function (command, stdout, stderr) { + * stdout.pipe(process.stdout); + * }) + * .checkout('https://github.com/user/repo.git'); + * + * @see https://nodejs.org/api/child_process.html#child_process_class_childprocess + * @see https://nodejs.org/api/stream.html#stream_class_stream_readable + */ + outputHandler(handler: types.outputHandler | void): this; + + /** + * Fetch from and integrate with another repository or a local branch. + */ + pull(remote?: string, branch?: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + pull(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + pull(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Update remote refs along with associated objects. + */ + push(remote?: string, branch?: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + push(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + push(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the + * default configured remote spec. + */ + pushTags(remote: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + pushTags(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + pushTags(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Executes any command against the git binary. + */ + raw(commands: string | string[] | types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + raw(options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + raw(...commands: string[]): Response; + + // leading varargs with trailing options/callback + raw(a: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + raw(a: string, b: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + raw(a: string, b: string, c: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + raw(a: string, b: string, c: string, d: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + raw(a: string, b: string, c: string, d: string, e: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + // leading varargs with trailing callback + raw(a: string, callback?: types.SimpleGitTaskCallback): Response; + + raw(a: string, b: string, callback?: types.SimpleGitTaskCallback): Response; + + raw(a: string, b: string, c: string, callback?: types.SimpleGitTaskCallback): Response; + + raw(a: string, b: string, c: string, d: string, callback?: types.SimpleGitTaskCallback): Response; + + raw(a: string, b: string, c: string, d: string, e: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Rebases the current working copy. Options can be supplied either as an array of string parameters + * to be sent to the `git rebase` command, or a standard options object. + */ + rebase(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + rebase(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Call any `git remote` function with arguments passed as an array of strings. + */ + remote(options: string[], callback?: types.SimpleGitTaskCallback): Response; + + /** + * Removes an entry from the list of remotes. + * + * - remoteName Name of the repository - eg "upstream" + */ + removeRemote(remoteName: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Reset a repo. Called without arguments this is a soft reset for the whole repo, + * for explicitly setting the reset mode, supply the first argument as one of the + * supported reset modes. + * + * Trailing options argument can be either a string array, or an extension of the + * ResetOptions, use this argument for supplying arbitrary additional arguments, + * such as restricting the pathspec. + * + * ```typescript + // equivalent to each other + simpleGit().reset(ResetMode.HARD, ['--', 'my-file.txt']); + simpleGit().reset(['--hard', '--', 'my-file.txt']); + simpleGit().reset(ResetMode.HARD, {'--': null, 'my-file.txt': null}); + simpleGit().reset({'--hard': null, '--': null, 'my-file.txt': null}); + ``` + */ + reset(mode: types.ResetMode, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + reset(mode: types.ResetMode, callback?: types.SimpleGitTaskCallback): Response; + + reset(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Revert one or more commits in the local working copy + * + * - commit The commit to revert. Can be any hash, offset (eg: `HEAD~2`) or range (eg: `master~5..master~2`) + */ + revert(commit: String, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + revert(commit: String, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Passes the supplied options to `git rev-parse` and returns the string response. Options can be either a + * string array or `Options` object of options compatible with the [rev-parse](https://git-scm.com/docs/git-rev-parse) + * + * Example uses of `rev-parse` include converting friendly commit references (ie: branch names) to SHA1 hashes + * and retrieving meta details about the current repo (eg: the root directory, and whether it was created as + * a bare repo). + */ + revparse(option: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + revparse(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Removes the named files from source control. + */ + rm(paths: string | string[], callback?: types.SimpleGitTaskCallback): Response; + + /** + * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To + * completely remove the files, use `rm`. + */ + rmKeepLocal(paths: string | string[], callback?: types.SimpleGitTaskCallback): Response; + + /** + * Show various types of objects, for example the file at a certain commit + */ + show(option: string | types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + show(callback?: types.SimpleGitTaskCallback): Response; + + /** + * @deprecated + * + * From version 2.7.0, use of `silent` is deprecated in favour of using the `debug` library, this method will + * be removed in version 3.x. + * + * Please see the [readme](https://github.com/steveukx/git-js/blob/master/readme.md#enable-logging) for more details. + * + * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in + * a production environment. + * + * @param {boolean} silence + */ + silent(silence?: boolean): this; + + /** + * Stash the local repo + */ + stash(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + stash(callback?: types.SimpleGitTaskCallback): Response; + + /** + * List the stash(s) of the local repo + */ + stashList(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + stashList(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Show the working tree status. + */ + status(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + status(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Call any `git submodule` function with arguments passed as an array of strings. + */ + subModule(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Add a submodule + */ + submoduleAdd(repo: string, path: string, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Initialise submodules + */ + submoduleInit(moduleName: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + submoduleInit(moduleName: string, callback?: types.SimpleGitTaskCallback): Response; + + submoduleInit(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + submoduleInit(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Update submodules + */ + submoduleUpdate(moduleName: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + submoduleUpdate(moduleName: string, callback?: types.SimpleGitTaskCallback): Response; + + submoduleUpdate(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + submoduleUpdate(callback?: types.SimpleGitTaskCallback): Response; + + /** + * List all tags. When using git 2.7.0 or above, include an options object with `"--sort": "property-name"` to + * sort the tags by that property instead of using the default semantic versioning sort. + * + * Note, supplying this option when it is not supported by your Git version will cause the operation to fail. + */ + tag(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + /** + * Gets a list of tagged versions. + */ + tags(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback): Response; + + tags(callback?: types.SimpleGitTaskCallback): Response; + + /** + * Updates repository server info + */ + updateServerInfo(callback?: types.SimpleGitTaskCallback): Response; +} diff --git a/Client/node_modules/simple-git/typings/types.d.ts b/Client/node_modules/simple-git/typings/types.d.ts new file mode 100644 index 000000000..ac9048127 --- /dev/null +++ b/Client/node_modules/simple-git/typings/types.d.ts @@ -0,0 +1,10 @@ +export { RemoteWithoutRefs, RemoteWithRefs } from '../src/lib/responses/GetRemoteSummary'; +export { LogOptions, DefaultLogFields } from '../src/lib/tasks/log'; + +export { outputHandler, Options, SimpleGitOptions, TaskOptions, SimpleGitTaskCallback } from '../src/lib/types'; + +export { CheckRepoActions } from '../src/lib/tasks/check-is-repo'; +export { CleanOptions, CleanMode } from '../src/lib/tasks/clean'; +export { CloneOptions } from '../src/lib/tasks/clone'; +export { ApplyOptions } from '../src/lib/tasks/apply-patch'; +export { ResetOptions, ResetMode } from '../src/lib/tasks/reset'; diff --git a/Client/package-lock.json b/Client/package-lock.json index 741ecce83..2b56e3cf9 100644 --- a/Client/package-lock.json +++ b/Client/package-lock.json @@ -203,6 +203,34 @@ "@ethersproject/strings": "^5.0.4" } }, + "@kwsites/file-exists": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", + "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", + "requires": { + "debug": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "@kwsites/promise-deferred": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", + "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" + }, "@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -2110,6 +2138,31 @@ "simple-concat": "^1.0.0" } }, + "simple-git": { + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-2.31.0.tgz", + "integrity": "sha512-/+rmE7dYZMbRAfEmn8EUIOwlM2G7UdzpkC60KF86YAfXGnmGtsPrKsym0hKvLBdFLLW019C+aZld1+6iIVy5xA==", + "requires": { + "@kwsites/file-exists": "^1.1.1", + "@kwsites/promise-deferred": "^1.1.1", + "debug": "^4.3.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", diff --git a/Client/package.json b/Client/package.json index 0e6e7b0f3..884c8e810 100644 --- a/Client/package.json +++ b/Client/package.json @@ -11,6 +11,7 @@ "child_process": "^1.0.2", "open": "^6.4.0", "rimraf": "^3.0.2", + "simple-git": "^2.31.0", "web3": "^1.3.0", "ws": "^7.1.2" } diff --git a/Projects/Superalgos/Icons/procedure-javascript-code.png b/Projects/Superalgos/Icons/procedure-javascript-code.png deleted file mode 100644 index 21bf6a8b7..000000000 Binary files a/Projects/Superalgos/Icons/procedure-javascript-code.png and /dev/null differ diff --git a/Projects/Superalgos/Icons/record-formula.png b/Projects/Superalgos/Icons/record-formula.png deleted file mode 100644 index 4049ba2a7..000000000 Binary files a/Projects/Superalgos/Icons/record-formula.png and /dev/null differ diff --git a/Projects/Superalgos/Schemas/Docs-Books/the-docs-explained.json b/Projects/Superalgos/Schemas/Docs-Books/the-docs-explained.json new file mode 100644 index 000000000..0a3d1a4c7 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Books/the-docs-explained.json @@ -0,0 +1,36 @@ +{ + "type": "The Docs Explained", + "definition": { + "text": "This book will walk you through everything you need to know about the Docs.", + "updated": 1609762580891 + }, + "paragraphs": [ + { + "style": "Chapter", + "text": "Superalgos->I->Docs Basics->Read Chapter I to learn the basics concepts. They are the foundation that will let you understand the commands and styles explained later in this book.", + "updated": 1609763076399 + }, + { + "style": "Chapter", + "text": "Superalgos->II->Docs Commands->The Docs include a powerful command line interface that allows you to quickly fire commands from the search box. Dive into Chapter II to learn the details of each available command.", + "updated": 1609763122458 + }, + { + "style": "Chapter", + "text": "Superalgos->III->Docs Commands Errors" + }, + { + "style": "Chapter", + "text": "Superalgos->IV->Docs Commands Messages", + "updated": 1609783744261 + }, + { + "style": "Chapter", + "text": "Superalgos->V->Docs Paragraph Styles" + }, + { + "style": "Chapter", + "text": "Superalgos->VI->Docs Context Menu Actions" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/data-dependency.json b/Projects/Superalgos/Schemas/Docs-Nodes/data-dependency.json index a5679f677..6c339d27d 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/data-dependency.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/data-dependency.json @@ -11,6 +11,14 @@ { "style": "Text", "text": "Most bots consume data other bots have produced. Because bots need the data as input for their calculations, processes establish a data dependency with the dataset definitions of other bots. The reference provides the process with all the information needed to decode the dataset, enabling it to perform the required calculations." + }, + { + "style": "Gif", + "text": "GIFs/Superalgos/Docs/inner-foder/indicators-process-dependencies-02.gif" + }, + { + "style": "Text", + "text": "The image above shows data dependencies in one bot referencing dataset definitions of another bot." } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/data-mine.json b/Projects/Superalgos/Schemas/Docs-Nodes/data-mine.json index c65b13e11..4bb86a72a 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/data-mine.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/data-mine.json @@ -22,13 +22,23 @@ }, { "style": "Title", - "text": "Data Mine Configuration", - "updated": 1609789108763 + "text": "Configuring Data Mine" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609789116514 + "style": "Text", + "text": "Select Configure Data Mine on the menu to access the configuration." + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": "\"codeName\": \"Supermine\"" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/dataset-definition.json b/Projects/Superalgos/Schemas/Docs-Nodes/dataset-definition.json index 658687b59..b8e933a6f 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/dataset-definition.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/dataset-definition.json @@ -18,13 +18,123 @@ }, { "style": "Title", - "text": "Dataset Definition Configuration", - "updated": 1609788319432 + "text": "Configuring Dataset Definition" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609788325479 + "style": "Text", + "text": "Select Configure Definition on the menu to access the configuration." + }, + { + "style": "Text", + "text": "Multi-Period-Market:" + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": " \"codeName\": \"Multi-Period-Market\"," + }, + { + "style": "Text", + "text": " \"type\": \"Market Files\"," + }, + { + "style": "Text", + "text": " \"validTimeFrames\": [ \"24-hs\", \"12-hs\", \"08-hs\", \"06-hs\", \"04-hs\", \"03-hs\", \"02-hs\", \"01-hs\" ]," + }, + { + "style": "Text", + "text": " \"filePath\": \"@Exchange/@BaseAsset-@QuotedAsset/@DataMine/@Bot/Output/@Product/@Dataset/@Period\"," + }, + { + "style": "Text", + "text": " \"fileName\": \"Data.json\"," + }, + { + "style": "Text", + "text": " \"timeFrames\": {" + }, + { + "style": "Text", + "text": " \"filePath\": \"\"," + }, + { + "style": "Text", + "text": " \"fileName\": \"\"" + }, + { + "style": "Text", + "text": " }" + }, + { + "style": "Text", + "text": "}" + }, + { + "style": "Text", + "text": "Multi-Period-Daily:" + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": " \"codeName\": \"Multi-Period-Daily\"," + }, + { + "style": "Text", + "text": " \"type\": \"Daily Files\"," + }, + { + "style": "Text", + "text": " \"validTimeFrames\": [ \"45-min\", \"40-min\", \"30-min\", \"20-min\", \"15-min\", \"10-min\", \"05-min\", \"04-min\", \"03-min\", \"02-min\", \"01-min\" ]," + }, + { + "style": "Text", + "text": " \"filePath\": \"@Exchange/@BaseAsset-@QuotedAsset/@DataMine/@Bot/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\"," + }, + { + "style": "Text", + "text": " \"fileName\": \"Data.json\"," + }, + { + "style": "Text", + "text": " \"dataRange\": {" + }, + { + "style": "Text", + "text": " \"filePath\": \"@Exchange/@BaseAsset-@QuotedAsset/@DataMine/@Bot/Output/@Product/@Dataset\"," + }, + { + "style": "Text", + "text": " \"fileName\": \"Data.Range.json\"" + }, + { + "style": "Text", + "text": " }," + }, + { + "style": "Text", + "text": " \"timeFrames\": {" + }, + { + "style": "Text", + "text": " \"filePath\": \"\"," + }, + { + "style": "Text", + "text": " \"fileName\": \"\"" + }, + { + "style": "Text", + "text": " }" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", @@ -32,8 +142,7 @@ }, { "style": "List", - "text": "type refers to the type of dataset; possible values are market files and daily files.", - "updated": 1609788409763 + "text": "type refers to the type of dataset; possible values are Market Files and Daily Files." }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/execution-finished-event.json b/Projects/Superalgos/Schemas/Docs-Nodes/execution-finished-event.json index 2cc8e4fc6..408c1d840 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/execution-finished-event.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/execution-finished-event.json @@ -11,6 +11,14 @@ { "style": "Text", "text": "The execution finished event is responsible for triggering the execution of every process that depends on the data a bot produces. If bot Alice depends on bot Bob, Alice listens to the execution finished event of Bob so that it may start a new execution cycle as soon as Bob finishes its cycle. Alice listens to Bob's execution finished event by establishing a reference from its execution started event." + }, + { + "style": "Gif", + "text": "GIFs/Superalgos/Docs/inner-foder/indicators-process-execution-started-finished-events-01.gif" + }, + { + "style": "Text", + "text": "The image above shows a reference established from the execution started event of a process to the execution finished event of another process." } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/indicator-bot.json b/Projects/Superalgos/Schemas/Docs-Nodes/indicator-bot.json index e3261b328..e700c1170 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/indicator-bot.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/indicator-bot.json @@ -22,13 +22,23 @@ }, { "style": "Title", - "text": "Indicator Bot Configuration", - "updated": 1609789150912 + "text": "Configuring Indicator Bot" }, { "style": "Text", - "text": "Properties", - "updated": 1609789156452 + "text": "Select Configure Bot on the menu to access the configuration." + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": "\"codeName\": \"Superbot\"" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/output-dataset.json b/Projects/Superalgos/Schemas/Docs-Nodes/output-dataset.json index 46359880f..037a55d66 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/output-dataset.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/output-dataset.json @@ -16,6 +16,14 @@ "style": "Text", "text": "An example of other entities that may be listening to such events is that of plotters. Plotters read datasets and create graphical representations of this data over the charts. Charts are constantly updating the information in the form of candles and indicators in realtime, synchronized with the data being extracted from the exchange by the sensor bot. That kind of automatism is possible thanks to the events that processes trigger every time an execution cycle is finished, signaling to everyone listening that new data is available on each of the impacted datasets." }, + { + "style": "Gif", + "text": "GIFs/Superalgos/Docs/inner-foder/indicators-process-output-01.gif" + }, + { + "style": "Text", + "text": "The image above shows the typical references from output datasets to datasets definitions." + }, { "style": "Note", "text": "An output dataset must reference a dataset definition." diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/plotter-module.json b/Projects/Superalgos/Schemas/Docs-Nodes/plotter-module.json index b426ebe24..bde20388e 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/plotter-module.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/plotter-module.json @@ -12,24 +12,49 @@ "style": "Text", "text": "A single plotter may have several modules. Different modules may be used to plot each product of the bot, or as best suits the expected use-pattern." }, + { + "style": "Gif", + "text": "GIFs/Superalgos/Docs/inner-foder/plotter-module-01.gif" + }, { "style": "Important", - "text": "For a bot to use a plotter, the corresponding Product Definition must establish a reference with the plotter module built to interpret the dataset.", - "updated": 1609790272500 + "text": "For a bot to use a plotter, the corresponding product definition must establish a reference with the plotter module built to interpret the dataset." + }, + { + "style": "Gif", + "text": "GIFs/Superalgos/Docs/inner-foder/plotter-module-02-product-link.gif" }, { "style": "Block", - "text": "Configuring", - "updated": 1609790308422 + "text": "Configuring" }, { "style": "Title", - "text": "Plotter Module Configuration" + "text": "Configuring Plotter Module" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609790324389 + "style": "Text", + "text": "Select Configure Plotter Module on the menu to access the configuration." + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": " \"codeName\": \"Module Name\"," + }, + { + "style": "Text", + "text": " \"isLegacy\": true," + }, + { + "style": "Text", + "text": " \"icon\": \"histogram\"" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", @@ -40,14 +65,36 @@ "text": "isLegacy is true for plotters modules developed entirely in JavaScript, and is false or doesn't show in the configuration for plotters built with the tools featured in the data mine hierarchy." }, { - "style": "List", - "text": "icon is the name of the image that illustrates the corresponding layer in the Layers Panel. In case the icon is not specified, the default idon is used. Possible values are...", - "updated": 1609852182210 + "style": "Text", + "text": "| Value | Image|" }, { - "style": "Javascript", - "text": "layer-moving-averages\nlayer-bands\nlayer-candles\nlayer-histogram\nlayer-oscilator\nlayer-resistance\nlayer-support\nlayer-trends\nlayer-volume", - "updated": 1609852285167 + "style": "Text", + "text": "| :---: | :---: |" + }, + { + "style": "Png", + "text": "| default | PNGs/Superalgos/Docs/inner-foder/default-banner.png |" + }, + { + "style": "Png", + "text": "| histogram | PNGs/Superalgos/Docs/inner-foder/histogram-banner.png |" + }, + { + "style": "Png", + "text": "| band | PNGs/Superalgos/Docs/inner-foder/bands-banner.png |" + }, + { + "style": "Png", + "text": "| moving-average | PNGs/Superalgos/Docs/inner-foder/moving-average-banner.png |" + }, + { + "style": "Png", + "text": "| oscillator | PNGs/Superalgos/Docs/inner-foder/oscillator-banner.png |" + }, + { + "style": "Png", + "text": "| trend | PNGs/Superalgos/Docs/inner-foder/trends-banner.png |" }, { "style": "Text", @@ -55,18 +102,15 @@ }, { "style": "Text", - "text": "1. Name the image in the following format: image-name.png;", - "updated": 1609852305205 + "text": "1. name the image in the following format: image-name.png;" }, { "style": "Text", - "text": "2. Place images in the WebServer\\Images\\Icons folder;", - "updated": 1609852315978 + "text": "1. place images in the WebServer\\Images\\Icons folder;" }, { "style": "Text", - "text": "3. In the configuration of the module, use the name as is (e.g.: \"icon\": \"image-name\")", - "updated": 1609852322876 + "text": "1. in the configuration of the module, use the name as is (e.g.: \"icon\": \"image-name\")" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/plotter.json b/Projects/Superalgos/Schemas/Docs-Nodes/plotter.json index 9fca57ca6..1404de911 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/plotter.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/plotter.json @@ -34,13 +34,23 @@ }, { "style": "Title", - "text": "Plotter Configuration", - "updated": 1609790186907 + "text": "Configuring Plotter" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609790191953 + "style": "Text", + "text": "Select Configure Plotter on the menu to access the configuration." + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": " \"codeName\": \"Plotter-Name\"" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/point-formula.json b/Projects/Superalgos/Schemas/Docs-Nodes/point-formula.json index 19af0f90e..882188811 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/point-formula.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/point-formula.json @@ -13,18 +13,20 @@ "text": "To represent some form of variation of the price or a price derivative over time, a typical point formula consists of the following two coordinates: x = datetime and y = rate." }, { - "style": "Title", - "text": "For example", - "updated": 1609852495437 + "style": "Text", + "text": "For example:" }, { - "style": "Subtitle", + "style": "Text", "text": "Point SMA 20 Begin " }, { - "style": "Javascript", - "text": "x = record.begin\ny = record.previous.sma20", - "updated": 1609852623919 + "style": "Text", + "text": "x = record.begin" + }, + { + "style": "Text", + "text": "y = record.previous.sma20" }, { "style": "Text", @@ -39,13 +41,16 @@ "text": "To complete the line segment corresponding to a single period, the closing datetime of the period and the closing rate for the 20-periods SMA are required:" }, { - "style": "Subtitle", + "style": "Text", "text": "Point SMA 20 End " }, { - "style": "Javascript", - "text": "x = record.end\ny = record.sma20", - "updated": 1609852823376 + "style": "Text", + "text": "x = record.end" + }, + { + "style": "Text", + "text": "y = record.sma20" }, { "style": "Text", @@ -60,62 +65,80 @@ "text": "Anyway, the points definition is just as straight forward, for example:" }, { - "style": "Subtitle", + "style": "Text", "text": "Point RSI Begin " }, { - "style": "Javascript", - "text": "x = record.begin\ny = record.previous.value", - "updated": 1609852852377 + "style": "Text", + "text": "x = record.begin" }, { - "style": "Subtitle", + "style": "Text", + "text": "y = record.previous.value" + }, + { + "style": "Text", "text": "Point RSI End " }, { - "style": "Javascript", - "text": "x = record.end\ny = record.value\n", - "updated": 1609853081776 + "style": "Text", + "text": "x = record.end" + }, + { + "style": "Text", + "text": "y = record.value" }, { "style": "Text", "text": "Points do not necessarily need to refer to values on the dataset produced by the corresponding data product. For example, absolute values for the y-axis may be used to describe fixed graphical elements, for instance, a horizontal line, or a box." }, { - "style": "Subtitle", + "style": "Text", "text": "Point Begin 20 " }, { - "style": "Javascript", - "text": "x = record.begin\ny = 20", - "updated": 1609852867401 + "style": "Text", + "text": "x = record.begin" }, { - "style": "Subtitle", + "style": "Text", + "text": "y = 20" + }, + { + "style": "Text", "text": "Point End 20 " }, { - "style": "Javascript", - "text": "x = record.end\ny = 20", - "updated": 1609852965567 + "style": "Text", + "text": "x = record.end" }, { - "style": "Subtitle", + "style": "Text", + "text": "y = 20" + }, + { + "style": "Text", "text": "Point Begin 30 " }, { - "style": "Javascript", - "text": "x = record.begin\ny = 30\n", - "updated": 1609853018216 + "style": "Text", + "text": "x = record.begin" }, { - "style": "Subtitle", + "style": "Text", + "text": "y = 30" + }, + { + "style": "Text", "text": "Point End 30 " }, { - "style": "Javascript", - "text": "x = record.end\ny = 30\n", - "updated": 1609853034626 + "style": "Text", + "text": "x = record.end" + }, + { + "style": "Text", + "text": "y = 30" }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/point.json b/Projects/Superalgos/Schemas/Docs-Nodes/point.json index 286b85936..6ddcda2bb 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/point.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/point.json @@ -13,9 +13,8 @@ "text": "These coordinate points are used to define polygons. Values for [x,y]coordinates are entered with a point formula." }, { - "style": "Success", - "text": "Give points a significant name so that it is easier to identify them at the time of establishing references with polygon vertices.", - "updated": 1609852471920 + "style": "Text", + "text": "{% include tip.html content=\"Each point should be given a significant name so that it is easier to identify them at the time of establishing references with polygon vertices.\" %}" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/polygon-condition.json b/Projects/Superalgos/Schemas/Docs-Nodes/polygon-condition.json index 776ebf1e9..a0a234e1c 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/polygon-condition.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/polygon-condition.json @@ -18,13 +18,15 @@ }, { "style": "Title", - "text": "Polygon Condition Configuration", - "updated": 1609853769074 + "text": "Configuring Polygon Condition" }, { "style": "Text", - "text": "Polygon Conditions work pretty much like conditions used on trading systems. The main difference is that the variables available are solely those provided by the bot product definition that reference the corresponding plotter module.", - "updated": 1609853810664 + "text": "Select Edit Condition on the menu to access the configuration." + }, + { + "style": "Text", + "text": "Polygon conditions work pretty much like conditions used on trading systems. The main difference is that the variables available are solely those provided by the bot product definition that reference the corresponding plotter module." } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/polygon-vertex.json b/Projects/Superalgos/Schemas/Docs-Nodes/polygon-vertex.json index 97086efa3..0626b6ef5 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/polygon-vertex.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/polygon-vertex.json @@ -12,6 +12,10 @@ "style": "Text", "text": "Vertices are the main element defining polygons. Once created, each vertex must establish a reference to the corresponding point in the charts point." }, + { + "style": "Gif", + "text": "GIFs/Superalgos/Docs/inner-foder/vertex-01-add-and-link.gif" + }, { "style": "Text", "text": "Drawing curves requires two vertices. Painting areas, such as the background of a chart, likely requires four vertices. Note that vertices are not capable of featuring a style. Instead, styles are applied to polygon borders and polygon bodies." diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/procedure-initialization.json b/Projects/Superalgos/Schemas/Docs-Nodes/procedure-initialization.json index df4c77f34..d120a13a5 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/procedure-initialization.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/procedure-initialization.json @@ -13,9 +13,12 @@ "text": "This is an example of a procedure loop code snippet, in particular, the code that initializes the array used in the calculation of the Popular SMAs product of the Simple Moving Average (SMA) indicator." }, { - "style": "Javascript", - "text": "/ Initialization Code. /\nvariable.last200 = []", - "updated": 1609789338326 + "style": "Text", + "text": "/ Initialization Code. /" + }, + { + "style": "Text", + "text": "variable.last200 = []" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/procedure-javascript-code.json b/Projects/Superalgos/Schemas/Docs-Nodes/procedure-javascript-code.json deleted file mode 100644 index 1c76c451b..000000000 --- a/Projects/Superalgos/Schemas/Docs-Nodes/procedure-javascript-code.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "Procedure Javascript Code", - "definition": { - "text": "The Procedure JavaScript code node may hold any snippet of valid JavaScript.", - "updated": 1609789511058 - }, - "paragraphs": [ - { - "style": "Text", - "text": "The system allows developers great flexibility as all valid JavaScript code is allowed.", - "updated": 1609789473533 - }, - { - "style": "Important", - "text": "Until a robust JavaScript editor is implemented on the UI, it is recommended to write code on an external editor and paste it in the UI code bubble to ensure consistency.", - "updated": 1609789526505 - } - ] -} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/procedure-loop.json b/Projects/Superalgos/Schemas/Docs-Nodes/procedure-loop.json index 7c7c5cd3f..7b562a45a 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/procedure-loop.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/procedure-loop.json @@ -7,6 +7,10 @@ { "style": "Block", "text": "Content" + }, + { + "style": "Note", + "text": "Please refer to the coding references page to learn how to code the indicator's logic." } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/process-definition.json b/Projects/Superalgos/Schemas/Docs-Nodes/process-definition.json index 2f0417bfa..d5842e695 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/process-definition.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/process-definition.json @@ -30,13 +30,83 @@ }, { "style": "Title", - "text": "Process Definition Configuration", - "updated": 1609786986097 + "text": "Configuring Process Definition" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609787034890 + "style": "Text", + "text": "Select Configure Process on the menu to access the configuration." + }, + { + "style": "Text", + "text": "Multi-Period-Market:" + }, + { + "style": "Text", + "text": " {" + }, + { + "style": "Text", + "text": " \"codeName\": \"Multi-Period-Market\"," + }, + { + "style": "Text", + "text": " \"normalWaitTime\": 0," + }, + { + "style": "Text", + "text": " \"retryWaitTime\": 10000," + }, + { + "style": "Text", + "text": " \"framework\": {" + }, + { + "style": "Text", + "text": " \"name\": \"Multi-Period-Market\"" + }, + { + "style": "Text", + "text": " }" + }, + { + "style": "Text", + "text": " }" + }, + { + "style": "Text", + "text": "Multi-Period-Daily:" + }, + { + "style": "Text", + "text": " {" + }, + { + "style": "Text", + "text": " \"codeName\": \"Multi-Period-Daily\"," + }, + { + "style": "Text", + "text": " \"normalWaitTime\": 0," + }, + { + "style": "Text", + "text": " \"retryWaitTime\": 10000," + }, + { + "style": "Text", + "text": " \"framework\": {" + }, + { + "style": "Text", + "text": " \"name\": \"Multi-Period-Daily\"" + }, + { + "style": "Text", + "text": " }" + }, + { + "style": "Text", + "text": " }" }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/process-output.json b/Projects/Superalgos/Schemas/Docs-Nodes/process-output.json index f0ddf12aa..4fe11882d 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/process-output.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/process-output.json @@ -3,10 +3,5 @@ "definition": { "text": "The process output groups the definitions of which datasets are impacted by the process, that is, which datasets the process builds or takes a part in building." }, - "paragraphs": [ - { - "style": "Text", - "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode." - } - ] + "paragraphs": [] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/product-definition.json b/Projects/Superalgos/Schemas/Docs-Nodes/product-definition.json index dbd818783..caaafd64d 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/product-definition.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/product-definition.json @@ -22,13 +22,31 @@ }, { "style": "Title", - "text": "Product Definition Configuration", - "updated": 1609788267834 + "text": "Configuring Product Definition" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609788279998 + "style": "Text", + "text": "Select Configure Product on the menu to access the configuration." + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": " \"codeName\": \"Product-Name\"," + }, + { + "style": "Text", + "text": " \"singularVariableName\": \"productName\"," + }, + { + "style": "Text", + "text": " \"pluralVariableName\": \"productNames\"" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/record-definition.json b/Projects/Superalgos/Schemas/Docs-Nodes/record-definition.json index 997119933..1be4f764f 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/record-definition.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/record-definition.json @@ -12,6 +12,10 @@ "style": "Text", "text": "Bots store data in the form of arrays of records, in a minimized plain text file and the standard JSON format, although not as objects with named properties, but as arrays." }, + { + "style": "Text", + "text": "{% include image-ext.html file='https://user-images.githubusercontent.com/13994516/68998023-303eae00-08ad-11ea-9baa-ddea801c7d6d.png' url='yes' max-width='100' caption='Typical dataset file showing records as arrays.' %}" + }, { "style": "Text", "text": "The choice of plain text for storage of large volumes of information has benefits in terms of not requiring any sophisticated technology to store and serve the data (i.e.: no database is required)." diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/record-formula.json b/Projects/Superalgos/Schemas/Docs-Nodes/record-formula.json deleted file mode 100644 index 77bdd496a..000000000 --- a/Projects/Superalgos/Schemas/Docs-Nodes/record-formula.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": "Record Formula", - "definition": { - "text": "In the context of a record definition, formulas are used to assign a value to the property, usually in the form of a variable declared in the calculation or data building procedures.", - "updated": 1609788711861 - }, - "paragraphs": [ - { - "style": "Text", - "text": "Formulas may use both the record and the variable objects made available by the calculations procedure and the data building procedure (see procedure loop).", - "updated": 1609788725463 - }, - { - "style": "Text", - "text": "A formula may act in slightly different ways depending on the isCaculated attribute in the record property configuration:" - }, - { - "style": "List", - "text": "When a property is calculated, the formula assigns to the property a value that is calculated in the Calculations Procedure. Even if the property is not stored in the dataset, it is made available as a calculated property to other bots that may have the dataset as input.", - "updated": 1609788822393 - }, - { - "style": "List", - "text": "When a property is not calculated or the attribute is not defined in the configuration, the formula is applied in the Data Building Procedure.", - "updated": 1609788849508 - } - ] -} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/record-property.json b/Projects/Superalgos/Schemas/Docs-Nodes/record-property.json index ef62b7236..e2f3a943b 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/record-property.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/record-property.json @@ -17,9 +17,8 @@ "text": "The order in which record properties are defined around the parent record definition node is the order in which they are stored in the actual record." }, { - "style": "Success", - "text": "The first two records are usually the begin and end records, featuring the corresponding datetimes that indicate when the record starts and ends.", - "updated": 1609788556871 + "style": "Text", + "text": "{% include tip.html content=\"The first two records are usually the begin and end records, featuring the corresponding datetimes that indicate when the record starts and ends.\" %}" }, { "style": "Block", @@ -27,25 +26,47 @@ }, { "style": "Title", - "text": "Record Property Configuration", - "updated": 1609788569963 + "text": "Configuring Record Property" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609788577195 + "style": "Text", + "text": "Select Configure Property on the menu to access the configuration." + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": " \"codeName\": \"record-name\"," + }, + { + "style": "Text", + "text": " \"isString\": false," + }, + { + "style": "Text", + "text": " \"isCalculated\": true" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", "text": "codeName is the name of the record as it is used in the bot's code." }, { - "style": "List", - "text": "isString determines if the field is a text string or if, in turn, is a numeric field. Dates are stored in the epoch format, which is numeric. The reason why this configuration is important is that fields that are strings need to be stored between “double quotes”." + "style": "Text", + "text": " isCalculated determines if the field is stored in the dataset or if, instead, is calculated at a later stage. A value true* means that the record is not stored. In the case isCaculated is not defined in the configuration, it is assumed to be false." }, { - "style": "List", - "text": " isCalculated determines if the field is stored in the dataset or if, instead, is calculated at a later stage. A value true* means that the record is not stored. In the case isCaculated is not defined in the configuration, it is assumed to be false." + "style": "Gif", + "text": "GIFs/Superalgos/Docs/inner-foder/indicators-record-definitions-01.gif" + }, + { + "style": "Text", + "text": "The image above shows a record definition with four record properties." } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/sensor-bot.json b/Projects/Superalgos/Schemas/Docs-Nodes/sensor-bot.json index 5328bd5e7..8593de41a 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/sensor-bot.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/sensor-bot.json @@ -18,13 +18,27 @@ }, { "style": "Title", - "text": "Sensor Bot Configuration", - "updated": 1609790137912 + "text": "Configuring Sensor Bot" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609790143486 + "style": "Text", + "text": "Select Configure Bot on the menu to access the configuration." + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": "\"codeName\": \"Super\"," + }, + { + "style": "Text", + "text": "\"repo\": \"Super-Sensor-Bot\"" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/shapes.json b/Projects/Superalgos/Schemas/Docs-Nodes/shapes.json index 968fa52eb..db65f92d2 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/shapes.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/shapes.json @@ -12,6 +12,10 @@ "style": "Text", "text": "A plotter recursively renders graphics for each period or candle. This means that a definition of what shapes need to be drawn for a single period is required. The plotter does the same thing for every period or candle that is visible on the screen at any point in time, for any time frame, as long as the corresponding data is available." }, + { + "style": "Gif", + "text": "GIFs/Superalgos/Docs/inner-foder/shapes-01-show-off.gif" + }, { "style": "Text", "text": "In general terms, the process of defining what is going to be rendered on the screen consist of the following four steps:" diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/status-dependency.json b/Projects/Superalgos/Schemas/Docs-Nodes/status-dependency.json index d3f50b7fd..104b5987f 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/status-dependency.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/status-dependency.json @@ -14,8 +14,7 @@ }, { "style": "Text", - "text": "The status report referenced may belong to the same process— which is called a self-reference. In such a case, the process is learning what it did the last time it ran. Also, the status report referenced may belong to another process—another bot. In that case, the dependency may be of the Market Starting Point or Market Ending Point types. ", - "updated": 1609787389239 + "text": "The status report referenced may belong to the same process— which is called a self-reference. In such a case, the process is learning what it did the last time it ran. Also, the status report referenced may belong to another process—another bot. In that case, the dependency may be of the Market Starting Point or Market Ending Point types." }, { "style": "List", @@ -23,13 +22,11 @@ }, { "style": "List", - "text": "The market starting point is a status dependency existing on Multi-Period-Daily processes so that the process establishing the reference learns the datetime of the start of the market. Usually, the reference is established with the sensor's Historic-OHLCVs process status report. Multi-Period-Market processes do not have this type of status dependency as the date of the start of the market is implied in their dataset (a single file with all market data).", - "updated": 1609787724948 + "text": "Market Starting Point is a status dependency existing on Multi-Period-Daily processes so that the process establishing the reference learns the datetime of the start of the market. Usually, the reference is established with the sensor's Historic-OHLCVs process status report. Multi-Period-Market processes do not have this type of status dependency as the date of the start of the market is implied in their dataset (a single file with all market data)." }, { "style": "List", - "text": "The market ending point is a status dependency existing both in Multi-Period-Market and Multi-Period-Daily processes so that the process establishing the reference knows the datetime of the end of the market.", - "updated": 1609787745299 + "text": "Market Ending Point is a status dependency existing both in Multi-Period-Market and Multi-Period-Daily processes so that the process establishing the reference knows the datetime of the end of the market." }, { "style": "Text", @@ -41,18 +38,27 @@ }, { "style": "Title", - "text": "Status Dependency Configuration", - "updated": 1609787775907 + "text": "Configuring Status Dependency" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609787781306 + "style": "Text", + "text": "Select Configure Status Dependency on the menu to access the configuration." + }, + { + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": "\"mainUtility\": \"Self Reference|Market Starting Point|Market Ending Point\"" + }, + { + "style": "Text", + "text": "}" }, { "style": "List", - "text": "mainUtility determines the type of status dependency, with possible values being Self Reference, MMarket Starting Point, or MMarket Ending Point.", - "updated": 1609787859239 + "text": "mainUtility determines the type of status dependency, with possible values being Self Reference, Market Starting Point, or Market Ending Point." } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/status-report.json b/Projects/Superalgos/Schemas/Docs-Nodes/status-report.json index 83300ca9e..c3efd5e32 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/status-report.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/status-report.json @@ -1,8 +1,7 @@ { "type": "Status Report", "definition": { - "text": "\nA status report serves as a temporal annotation that bots read every time they run to know what was done in the previous cycle and what the state of affairs is at present. They are dynamic and change constantly, with updates after every cycle of the associated process.", - "updated": 1609788111201 + "text": "Status reports serve as temporal annotations that bots read every time they run to know what was done in the previous cycle and what the state of affairs is at present. Status reports are dynamic, and they change constantly, with updates after every cycle of the associated process." }, "paragraphs": [ { diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/style.json b/Projects/Superalgos/Schemas/Docs-Nodes/style.json index 3b7dda402..bfb9009ac 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/style.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/style.json @@ -22,31 +22,115 @@ }, { "style": "Title", - "text": "Style Configuration", - "updated": 1609854042226 + "text": "Configuring Style" }, { - "style": "Subtitle", - "text": "Properties", - "updated": 1609854059581 + "style": "Text", + "text": "Select Configure Style on the menu to access the configuration." }, { "style": "Text", "text": "A typical definition for a polygon body style looks like this:" }, { - "style": "Json", - "text": "{\n \"default\": {\n \"opacity\": 0.2,\n \"paletteColor\": \"UI_COLOR.DARK_TURQUOISE\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.3,\n \"paletteColor\": \"UI_COLOR.DARK_TURQUOISE\"\n }\n}", - "updated": 1609854100248 + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": " \"default\": {" + }, + { + "style": "Text", + "text": " \"opacity\": 0.2," + }, + { + "style": "Text", + "text": " \"paletteColor\": \"UI_COLOR.DARK_TURQUOISE\"" + }, + { + "style": "Text", + "text": " }," + }, + { + "style": "Text", + "text": " \"atMousePosition\": {" + }, + { + "style": "Text", + "text": " \"opacity\": 0.3," + }, + { + "style": "Text", + "text": " \"paletteColor\": \"UI_COLOR.DARK_TURQUOISE\"" + }, + { + "style": "Text", + "text": " }" + }, + { + "style": "Text", + "text": "}" }, { "style": "Text", "text": "A typical definition for a polygon border style has a couple more properties:" }, { - "style": "Json", - "text": "{\n \"default\": {\n \"opacity\": 0.2,\n \"lineWidth\": 1,\n \"lineDash\": [0,0],\n \"paletteColor\": \"UI_COLOR.DARK_TURQUOISE\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.3,\n \"lineWidth\": 2,\n \"lineDash\": [0,0],\n \"paletteColor\": \"UI_COLOR.RUSTED_RED\"\n }\n}", - "updated": 1609854144329 + "style": "Text", + "text": "{" + }, + { + "style": "Text", + "text": " \"default\": {" + }, + { + "style": "Text", + "text": " \"opacity\": 0.2," + }, + { + "style": "Text", + "text": " \"lineWidth\": 1," + }, + { + "style": "Text", + "text": " \"lineDash\": [0,0]," + }, + { + "style": "Text", + "text": " \"paletteColor\": \"UI_COLOR.DARK_TURQUOISE\"" + }, + { + "style": "Text", + "text": " }," + }, + { + "style": "Text", + "text": " \"atMousePosition\": {" + }, + { + "style": "Text", + "text": " \"opacity\": 0.3," + }, + { + "style": "Text", + "text": " \"lineWidth\": 2," + }, + { + "style": "Text", + "text": " \"lineDash\": [0,0]," + }, + { + "style": "Text", + "text": " \"paletteColor\": \"UI_COLOR.RUSTED_RED\"" + }, + { + "style": "Text", + "text": " }" + }, + { + "style": "Text", + "text": "}" }, { "style": "Text", @@ -58,18 +142,75 @@ }, { "style": "List", - "text": "opacity is probably self-explanatory. It may range from 0 for a fully transparent object to 1 for a solid object.", - "updated": 1609854205298 + "text": "opacity is probably self-explanatory: it may range from 0 for a fully transparent object to 1 for a solid object." }, { - "style": "List", - "text": "paletteColor sets the color for the fill or stroke in cases of polygon bodies and polygon borders respectively. Use the variable UI_COLOR followed by a dot and any of the properties in the following list for a selection of currently available colors.", - "updated": 1609854289128 + "style": "Text", + "text": "| Variable Value | RGB Value | Color Sample |" }, { - "style": "Table", - "text": "| Variable Value | RGB Value | Color Sample |\n| DARK | 48, 48, 54 | RGB(48, 48, 54) |\n| LIGHT | 234, 226, 222 | RGB(234, 226, 222) |\n| GREY | 150, 150, 150 | RGB(150, 150, 150) |\n| LIGHT_GREY | 247, 247, 247 | RGB(247, 247, 247) |\n| WHITE | 255, 255, 255 | RGB(255, 255, 255) |\n| BLACK | 0, 0, 0 | RGB(0, 0, 0) |\n| GOLDEN_ORANGE | 240, 162, 2 | RGB(240, 162, 2) |\n| RUSTED_RED | 204, 88, 53 | RGB(204, 88, 53) |\n| GREEN | 188, 214, 67 | RGB(188, 214, 67) |\n| RED | 223, 70, 60 | RGB(223, 70, 60) |\n| PATINATED_TURQUOISE | 27, 153, 139 | RGB(27, 153, 139) |\n| TITANIUM_YELLOW | 244, 228, 9 | RGB(244, 228, 9) |\n| MANGANESE_PURPLE | 91,80, 122 | RGB(91,80, 122) |\n| TURQUOISE | 74, 207, 217 | RGB(74, 207, 217) |\n| DARK_TURQUOISE | 2, 149, 170 | RGB(2, 149, 170) |", - "updated": 1609854356242 + "style": "Text", + "text": "| :--- | :---: | :------------------- |" + }, + { + "style": "Text", + "text": "| DARK | 48, 48, 54 | RGB(48, 48, 54) |" + }, + { + "style": "Text", + "text": "| LIGHT | 234, 226, 222 | RGB(234, 226, 222); border: 1px black |" + }, + { + "style": "Text", + "text": "| GREY | 150, 150, 150 | RGB(150, 150, 150) |" + }, + { + "style": "Text", + "text": "| LIGHT_GREY | 247, 247, 247 | RGB(247, 247, 247) |" + }, + { + "style": "Text", + "text": "| WHITE | 255, 255, 255 | RGB(255, 255, 255) |" + }, + { + "style": "Text", + "text": "| BLACK | 0, 0, 0 | RGB(0, 0, 0) |" + }, + { + "style": "Text", + "text": "| GOLDEN_ORANGE | 240, 162, 2 | RGB(240, 162, 2) |" + }, + { + "style": "Text", + "text": "| RUSTED_RED | 204, 88, 53 | RGB(204, 88, 53) |" + }, + { + "style": "Text", + "text": "| GREEN | 188, 214, 67 | RGB(188, 214, 67) |" + }, + { + "style": "Text", + "text": "| RED | 223, 70, 60 | RGB(223, 70, 60) |" + }, + { + "style": "Text", + "text": "| PATINATED_TURQUOISE | 27, 153, 139 | RGB(27, 153, 139) |" + }, + { + "style": "Text", + "text": "| TITANIUM_YELLOW | 244, 228, 9 | RGB(244, 228, 9) |" + }, + { + "style": "Text", + "text": "| MANGANESE_PURPLE | 91,80, 122 | RGB(91,80, 122) |" + }, + { + "style": "Text", + "text": "| TURQUOISE | 74, 207, 217 | RGB(74, 207, 217) |" + }, + { + "style": "Text", + "text": "| DARK_TURQUOISE | 2, 149, 170 | RGB(2, 149, 170) |" }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/viewport.json b/Projects/Superalgos/Schemas/Docs-Nodes/viewport.json index d25982d3c..29b402f48 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/viewport.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/viewport.json @@ -27,10 +27,6 @@ { "style": "Note", "text": "The information that is out of focus, that is, out of the viewport, is not read nor rendered graphically, thus, does not consume resources." - }, - { - "style": "Title", - "text": "Viewport Configuration" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-001-app-error-contribution-not-sent.json b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-001-app-error-contribution-not-sent.json new file mode 100644 index 000000000..c56501b93 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-001-app-error-contribution-not-sent.json @@ -0,0 +1,16 @@ +{ + "topic": "App Commands Errors", + "pageNumber": "1", + "type": "App Error Contribution Not Sent", + "definition": { + "text": "There was a problmen trying to send your contribution to your fork of the Superalgos repository.", + "updated": 1609859551082 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. 2", + "updated": 1609860582103 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-002-app-error-github-credentials-missing.json b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-002-app-error-github-credentials-missing.json new file mode 100644 index 000000000..8bd36f3d2 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-errors-002-app-error-github-credentials-missing.json @@ -0,0 +1,70 @@ +{ + "topic": "App Commands Errors", + "pageNumber": "2", + "type": "App Error Github Credentials Missing", + "definition": { + "text": "In order to manage contributions from within the app, you first need to provide your Github.com credentials so that we can get authenticated when pushing your changes to the remote repository.", + "updated": 1609855182001 + }, + "paragraphs": [ + { + "style": "Anchor", + "text": "Anchor Github Credentials Missing", + "updated": 1609855373585 + }, + { + "style": "Error", + "text": "Github Crendentials are Missing. Please solve this issue and try again." + }, + { + "style": "Text", + "text": "At the root folder of Superalgos, you will need to create a JSON file called Github.json. Use simple text editor like notepad and configure there your Github credentials. You can copy and paste the following template, replacing the dummy strings with your actual user name and password.", + "updated": 1609856366366 + }, + { + "style": "Title", + "text": "Github File Template", + "updated": 1609856386094 + }, + { + "style": "Javascript", + "text": "{\n \"user\": \"Your Github.com Username\",\n \"password\": \"Your Github.com Password\"\n \"repository\": \"\"\n }", + "updated": 1609857106444 + }, + { + "style": "Title", + "text": "Properties", + "updated": 1609857199167 + }, + { + "style": "List", + "text": "user: Your Github.com Username." + }, + { + "style": "List", + "text": "parrword: Your Github.com Password." + }, + { + "style": "List", + "text": "repository: The URL of your Superalgos fork." + }, + { + "style": "Title", + "text": "Example" + }, + { + "style": "Javascript", + "text": "{\n \"user\": \"john-smith\",\n \"password\": \"john123$\"\n \"repository\": \"github.com/john-smith/Superalgos\"\n }", + "updated": 1609857447825 + }, + { + "style": "Note", + "text": "Don't worry, your crendentials will not be uploaded to the repository because the file Github.json is listed at the .gitignore file, so it will be ignored and will only be at your local computer." + }, + { + "style": "Important", + "text": "The system will use your credentials only to execute a git push command pointing to your Superalgos repository fork, in order to upload all the changes you made to Docs Pages.", + "updated": 1609856824492 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/app-commands-messages-001-app-message-contribution-succeed.json b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-messages-001-app-message-contribution-succeed.json new file mode 100644 index 000000000..136031d48 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/app-commands-messages-001-app-message-contribution-succeed.json @@ -0,0 +1,14 @@ +{ + "topic": "App Commands Messages", + "pageNumber": "1", + "type": "App Message Contribution Succeed", + "definition": { + "text": "Write here a summary for this topic page." + }, + "paragraphs": [ + { + "style": "Text", + "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode." + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-017-docs-search-engine.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-017-docs-search-engine.json new file mode 100644 index 000000000..a1febdf41 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-017-docs-search-engine.json @@ -0,0 +1,16 @@ +{ + "topic": "Docs Basics", + "pageNumber": "17", + "type": "Docs Search Engine", + "definition": { + "text": "The Docs contains a search engine that allows users to search through the collection of pages.\n", + "updated": 1609784533352 + }, + "paragraphs": [ + { + "style": "Text", + "text": "The search engine builds a Docs Search Engine Index that is later used to find the phrases typed by users at the search box.", + "updated": 1609784587544 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-018-docs-search-engine-index.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-018-docs-search-engine-index.json new file mode 100644 index 000000000..ecc83f62b --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-basics-018-docs-search-engine-index.json @@ -0,0 +1,16 @@ +{ + "topic": "Docs Basics", + "pageNumber": "18", + "type": "Docs Search Engine Index", + "definition": { + "text": "The Docs Search Engine builds an in-memory index that contains all the phrases of all Docs Pages, plus the name, type, config and code of all nodes of the current Workspace.", + "updated": 1609784383995 + }, + "paragraphs": [ + { + "style": "Text", + "text": "This index is built when the UI is launched, and rebuilt when users executes the docs.reindex command or they load a new workspace.", + "updated": 1609784471513 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-001-docs-message-saving-succed.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-001-docs-message-saving-succeed.json similarity index 91% rename from Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-001-docs-message-saving-succed.json rename to Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-001-docs-message-saving-succeed.json index 9deeb3fce..f049e5a3b 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-001-docs-message-saving-succed.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-001-docs-message-saving-succeed.json @@ -1,7 +1,7 @@ { "topic": "Docs Commands Messages", "pageNumber": "1", - "type": "Docs Message Saving Succed", + "type": "Docs Message Saving Succeed", "definition": { "text": "The docs.save command you executed was successful and all changes have been saved at the Superalgos Client.", "updated": 1609783244197 diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-002-docs-message-reindexing-succeed.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-002-docs-message-reindexing-succeed.json new file mode 100644 index 000000000..b2e1b071f --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-002-docs-message-reindexing-succeed.json @@ -0,0 +1,16 @@ +{ + "topic": "Docs Commands Messages", + "pageNumber": "2", + "type": "Docs Message Reindexing Succeed", + "definition": { + "text": "The docs.reindex command you executed succesfully rebuilt the Docs Search Engine Index.", + "updated": 1609783396612 + }, + "paragraphs": [ + { + "style": "Success", + "text": "The index was rebuilt and now includes all the latest changes you have made since you open the UI or since the last time you executed the docs.reindex command. That means that new content created now should affect the search results. Also, changes in the Workspace have been applied to the index too.", + "updated": 1609783508213 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-003-docs-message-deleting-succeed.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-003-docs-message-deleting-succeed.json new file mode 100644 index 000000000..d24e74863 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-commands-messages-003-docs-message-deleting-succeed.json @@ -0,0 +1,16 @@ +{ + "topic": "Docs Commands Messages", + "pageNumber": "3", + "type": "Docs Message Deleting Succeed", + "definition": { + "text": "The docs.delete command you executed successfuly delete the page you requested.", + "updated": 1609783558007 + }, + "paragraphs": [ + { + "style": "Success", + "text": "The page was removed from the in-memory collection of pages, but it is still indexed at the Docs Search Engine Index, and it still exist on disk. To remove it from the index you need to execute docs.reindex and to remove it from disk, you need to execute docs.save. ", + "updated": 1609783652507 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/CommandInterface.js b/Projects/Superalgos/UI/Spaces/Docs-Space/CommandInterface.js index 09aa51b1f..a77c15753 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/CommandInterface.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/CommandInterface.js @@ -1,7 +1,7 @@ function newSuperalgosDocsCommmandInterface() { let thisObject = { command: undefined, - detectCommands: detectCommands, + detectCommands: detectCommands, initialize: initialize, finalize: finalize } @@ -17,6 +17,45 @@ function newSuperalgosDocsCommmandInterface() { } function detectCommands() { + if (detectAppCommands() === true) {return} + detectDocsCommands() + } + + function detectAppCommands() { + if (checkContributeCommand() === undefined) { return } else { return true } + + function checkContributeCommand() { + if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.toLowerCase() === 'app.help app.contribute') { + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Contribute Command') + return + } + if (UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('App.Contribute') !== 0 && UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf('app.contribute') !== 0) { return } + + let message = UI.projects.superalgos.spaces.docsSpace.commandInterface.command.trim().substring(UI.projects.superalgos.spaces.docsSpace.commandInterface.command.indexOf(' ') + 1, UI.projects.superalgos.spaces.docsSpace.commandInterface.command.length) + if (message.toLowerCase() === 'app.contribute') { + message = 'This is my contribution to Superalgos' + } + + httpRequest(undefined, 'App/Contribute/' + message, onResponse) + return true + + function onResponse(err, data) { + /* Lets check the result of the call through the http interface */ + data = JSON.parse(data) + if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result && data.result === GLOBAL.DEFAULT_OK_RESPONSE.result) { + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Message Contribution Succeed') + } else { + if (data.message === 'File Github.json does not exist.') { + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error Github Credentials Missing', 'Anchor Github Credentials Missing') + } else { + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'App Error Contribution Not Sent', 'Anchor Contribution Not Sent') + } + } + } + } + } + + function detectDocsCommands() { if (checkHelpCommand() === undefined) { return } if (checkGotoCommand() === undefined) { return } @@ -242,7 +281,7 @@ function newSuperalgosDocsCommmandInterface() { UI.projects.superalgos.spaces.docsSpace.setUpWorkspaceSchemas() UI.projects.superalgos.spaces.docsSpace.searchEngine.setUpSearchEngine() - UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Reindexing Succed') + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Reindexing Succeed') } function checkUSaveCommand() { @@ -286,7 +325,7 @@ function newSuperalgosDocsCommmandInterface() { if (responseCount === requestsSent) { if (responseCount === okResponses) { - UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Saving Succed') + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Saving Succeed') } else { UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Error Changes Not Saved', 'Anchor Changes Not Saved') } @@ -422,7 +461,7 @@ function newSuperalgosDocsCommmandInterface() { break } } - UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Deleting Succed') + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Deleting Succeed') } function deleteConcept(project, type) { @@ -445,7 +484,7 @@ function newSuperalgosDocsCommmandInterface() { break } } - UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Deleting Succed') + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Deleting Succeed') } function deleteTopic(project, topic, type, pageNumber) { @@ -477,7 +516,7 @@ function newSuperalgosDocsCommmandInterface() { break } } - UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Deleting Succed') + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Deleting Succeed') } function deleteBook(project, type) { @@ -500,7 +539,7 @@ function newSuperalgosDocsCommmandInterface() { break } } - UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Deleting Succed') + UI.projects.superalgos.spaces.docsSpace.navigateTo('Superalgos', 'Topic', 'Docs Message Deleting Succeed') } } } \ No newline at end of file diff --git a/debug.log b/debug.log index 097051eec..33e28ade1 100644 --- a/debug.log +++ b/debug.log @@ -1 +1,2 @@ [1129/182047.011:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3) +[0105/141830.476:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)