@git-stack/core
Advanced tools
Comparing version 0.10.1-alpha.28 to 0.10.1-alpha.30
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.10.1-alpha.30](https://github.com/cdmbase/fullstack-pro/compare/v0.10.1-alpha.29...v0.10.1-alpha.30) (2020-05-04) | ||
**Note:** Version bump only for package @git-stack/core | ||
## [0.10.1-alpha.28](https://github.com/cdmbase/fullstack-pro/compare/v0.10.1-alpha.27...v0.10.1-alpha.28) (2020-04-07) | ||
@@ -8,0 +16,0 @@ |
export declare const TYPES: { | ||
IGitSettings: symbol; | ||
IGitService: symbol; | ||
IGitModel: symbol; | ||
IMentionablesRepository: symbol; | ||
IUserRepository: symbol; | ||
IRepository: symbol; | ||
}; |
272
lib/index.js
@@ -318,3 +318,8 @@ module.exports = | ||
exports.TYPES = { | ||
IGitSettings: Symbol('IGitSettings'), | ||
IGitSettings: Symbol.for('IGitSettings'), | ||
IGitService: Symbol.for('IGitSerivce'), | ||
IGitModel: Symbol.for('IGitModel'), | ||
IMentionablesRepository: Symbol.for('IMentionablesRepository'), | ||
IUserRepository: Symbol.for('IUserRepository'), | ||
IRepository: Symbol.for('IRepository'), | ||
}; | ||
@@ -339,2 +344,3 @@ | ||
__export(__webpack_require__(/*! ./constants */ "./src/constants/index.ts")); | ||
__export(__webpack_require__(/*! ./interfaces */ "./src/interfaces/index.ts")); | ||
__export(__webpack_require__(/*! ./models */ "./src/models/index.ts")); | ||
@@ -675,3 +681,3 @@ __export(__webpack_require__(/*! ./utils */ "./src/utils/index.ts")); | ||
exports.checkoutDocument = graphql_tag_1.default ` | ||
mutation checkout($name: String, $options: ICheckoutOptions) { | ||
mutation checkout($name: String, $options: ICheckoutOptions!) { | ||
checkout(name: $name, options: $options) { | ||
@@ -811,3 +817,3 @@ status { | ||
exports.openDocument = graphql_tag_1.default ` | ||
mutation open($path: URI!) { | ||
mutation open($path: String!) { | ||
open(path: $path) { | ||
@@ -1016,2 +1022,21 @@ openStatus { | ||
/***/ "./src/interfaces/git-repository.ts": | ||
/*!******************************************!*\ | ||
!*** ./src/interfaces/git-repository.ts ***! | ||
\******************************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var RepositoryState; | ||
(function (RepositoryState) { | ||
RepositoryState[RepositoryState["Idle"] = 0] = "Idle"; | ||
RepositoryState[RepositoryState["Disposed"] = 1] = "Disposed"; | ||
})(RepositoryState = exports.RepositoryState || (exports.RepositoryState = {})); | ||
/***/ }), | ||
/***/ "./src/interfaces/index.ts": | ||
@@ -1030,2 +1055,3 @@ /*!*********************************!*\ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(__webpack_require__(/*! ./git-repository */ "./src/interfaces/git-repository.ts")); | ||
__export(__webpack_require__(/*! ./generated-models */ "./src/interfaces/generated-models.ts")); | ||
@@ -1065,3 +1091,2 @@ | ||
const lodash_1 = __webpack_require__(/*! lodash */ "lodash"); | ||
const interfaces_1 = __webpack_require__(/*! ../interfaces */ "./src/interfaces/index.ts"); | ||
const utils_1 = __webpack_require__(/*! ../utils */ "./src/utils/index.ts"); | ||
@@ -1080,18 +1105,18 @@ exports.GROUP = { | ||
switch (status) { | ||
case interfaces_1.Status.INDEX_MODIFIED: return StatusModel.localize('modified-char', 'M'); | ||
case interfaces_1.Status.MODIFIED: return StatusModel.localize('modified-char', 'M'); | ||
case interfaces_1.Status.INDEX_ADDED: return StatusModel.localize('added-char', 'A'); | ||
case interfaces_1.Status.INDEX_DELETED: return StatusModel.localize('deleted-char', 'D'); | ||
case interfaces_1.Status.DELETED: return StatusModel.localize('deleted-char', 'D'); | ||
case interfaces_1.Status.INDEX_RENAMED: return StatusModel.localize('renamed-char', 'R'); | ||
case interfaces_1.Status.INDEX_COPIED: return StatusModel.localize('copied-char', 'C'); | ||
case interfaces_1.Status.UNTRACKED: return StatusModel.localize('untracked-char', 'U'); | ||
case interfaces_1.Status.IGNORED: return StatusModel.localize('ignored-char', '!'); | ||
case interfaces_1.Status.BOTH_DELETED: return StatusModel.localize('deleted-char', 'D'); | ||
case interfaces_1.Status.ADDED_BY_US: return StatusModel.localize('added-char', 'A'); | ||
case interfaces_1.Status.DELETED_BY_THEM: return StatusModel.localize('deleted-char', 'D'); | ||
case interfaces_1.Status.ADDED_BY_THEM: return StatusModel.localize('added-char', 'A'); | ||
case interfaces_1.Status.DELETED_BY_US: return StatusModel.localize('deleted-char', 'D'); | ||
case interfaces_1.Status.BOTH_ADDED: return StatusModel.localize('added-char', 'A'); | ||
case interfaces_1.Status.BOTH_MODIFIED: return StatusModel.localize('modified-char', 'M'); | ||
case "INDEX_MODIFIED" /* INDEX_MODIFIED */: return StatusModel.localize('modified-char', 'M'); | ||
case "MODIFIED" /* MODIFIED */: return StatusModel.localize('modified-char', 'M'); | ||
case "INDEX_ADDED" /* INDEX_ADDED */: return StatusModel.localize('added-char', 'A'); | ||
case "INDEX_DELETED" /* INDEX_DELETED */: return StatusModel.localize('deleted-char', 'D'); | ||
case "DELETED" /* DELETED */: return StatusModel.localize('deleted-char', 'D'); | ||
case "INDEX_RENAMED" /* INDEX_RENAMED */: return StatusModel.localize('renamed-char', 'R'); | ||
case "INDEX_COPIED" /* INDEX_COPIED */: return StatusModel.localize('copied-char', 'C'); | ||
case "UNTRACKED" /* UNTRACKED */: return StatusModel.localize('untracked-char', 'U'); | ||
case "IGNORED" /* IGNORED */: return StatusModel.localize('ignored-char', '!'); | ||
case "BOTH_DELETED" /* BOTH_DELETED */: return StatusModel.localize('deleted-char', 'D'); | ||
case "ADDED_BY_US" /* ADDED_BY_US */: return StatusModel.localize('added-char', 'A'); | ||
case "DELETED_BY_THEM" /* DELETED_BY_THEM */: return StatusModel.localize('deleted-char', 'D'); | ||
case "ADDED_BY_THEM" /* ADDED_BY_THEM */: return StatusModel.localize('added-char', 'A'); | ||
case "DELETED_BY_US" /* DELETED_BY_US */: return StatusModel.localize('deleted-char', 'D'); | ||
case "BOTH_ADDED" /* BOTH_ADDED */: return StatusModel.localize('added-char', 'A'); | ||
case "BOTH_MODIFIED" /* BOTH_MODIFIED */: return StatusModel.localize('modified-char', 'M'); | ||
default: return ''; | ||
@@ -1102,18 +1127,18 @@ } | ||
switch (status) { | ||
case interfaces_1.Status.INDEX_MODIFIED: return StatusModel.localize('title-index-modified', 'Modified in index'); | ||
case interfaces_1.Status.MODIFIED: return StatusModel.localize('title-modified', 'Modified'); | ||
case interfaces_1.Status.INDEX_ADDED: return StatusModel.localize('title-index-added', 'Added to index'); | ||
case interfaces_1.Status.INDEX_DELETED: return StatusModel.localize('title-index-deleted', 'Deleted in index'); | ||
case interfaces_1.Status.DELETED: return StatusModel.localize('title-deleted', 'Deleted'); | ||
case interfaces_1.Status.INDEX_RENAMED: return StatusModel.localize('title-index-renamed', 'Renamed in index'); | ||
case interfaces_1.Status.INDEX_COPIED: return StatusModel.localize('title-index-copied', 'Copied in index'); | ||
case interfaces_1.Status.UNTRACKED: return StatusModel.localize('title-untracked', 'Untracked'); | ||
case interfaces_1.Status.IGNORED: return StatusModel.localize('title-ignored', 'Ignored'); | ||
case interfaces_1.Status.BOTH_DELETED: return StatusModel.localize('title-conflict-both-deleted', 'Conflict: both deleted'); | ||
case interfaces_1.Status.ADDED_BY_US: return StatusModel.localize('title-conflict-added-by-us', 'Conflict: added by us'); | ||
case interfaces_1.Status.DELETED_BY_THEM: return StatusModel.localize('title-conflict-deleted-by-them', 'Conflict: deleted by them'); | ||
case interfaces_1.Status.ADDED_BY_THEM: return StatusModel.localize('title-conflict-added-by-them', 'Conflict: added by them'); | ||
case interfaces_1.Status.DELETED_BY_US: return StatusModel.localize('title-conflict-deleted-by-us', 'Conflict: deleted by us'); | ||
case interfaces_1.Status.BOTH_ADDED: return StatusModel.localize('title-conflict-both-added', 'Conflict: both added'); | ||
case interfaces_1.Status.BOTH_MODIFIED: return StatusModel.localize('title-conflict-both-modified', 'Conflict: both modified'); | ||
case "INDEX_MODIFIED" /* INDEX_MODIFIED */: return StatusModel.localize('title-index-modified', 'Modified in index'); | ||
case "MODIFIED" /* MODIFIED */: return StatusModel.localize('title-modified', 'Modified'); | ||
case "INDEX_ADDED" /* INDEX_ADDED */: return StatusModel.localize('title-index-added', 'Added to index'); | ||
case "INDEX_DELETED" /* INDEX_DELETED */: return StatusModel.localize('title-index-deleted', 'Deleted in index'); | ||
case "DELETED" /* DELETED */: return StatusModel.localize('title-deleted', 'Deleted'); | ||
case "INDEX_RENAMED" /* INDEX_RENAMED */: return StatusModel.localize('title-index-renamed', 'Renamed in index'); | ||
case "INDEX_COPIED" /* INDEX_COPIED */: return StatusModel.localize('title-index-copied', 'Copied in index'); | ||
case "UNTRACKED" /* UNTRACKED */: return StatusModel.localize('title-untracked', 'Untracked'); | ||
case "IGNORED" /* IGNORED */: return StatusModel.localize('title-ignored', 'Ignored'); | ||
case "BOTH_DELETED" /* BOTH_DELETED */: return StatusModel.localize('title-conflict-both-deleted', 'Conflict: both deleted'); | ||
case "ADDED_BY_US" /* ADDED_BY_US */: return StatusModel.localize('title-conflict-added-by-us', 'Conflict: added by us'); | ||
case "DELETED_BY_THEM" /* DELETED_BY_THEM */: return StatusModel.localize('title-conflict-deleted-by-them', 'Conflict: deleted by them'); | ||
case "ADDED_BY_THEM" /* ADDED_BY_THEM */: return StatusModel.localize('title-conflict-added-by-them', 'Conflict: added by them'); | ||
case "DELETED_BY_US" /* DELETED_BY_US */: return StatusModel.localize('title-conflict-deleted-by-us', 'Conflict: deleted by us'); | ||
case "BOTH_ADDED" /* BOTH_ADDED */: return StatusModel.localize('title-conflict-both-added', 'Conflict: both added'); | ||
case "BOTH_MODIFIED" /* BOTH_MODIFIED */: return StatusModel.localize('title-conflict-both-modified', 'Conflict: both modified'); | ||
default: return ''; | ||
@@ -1124,18 +1149,18 @@ } | ||
switch (status) { | ||
case interfaces_1.Status.INDEX_MODIFIED: return 'modified'; | ||
case interfaces_1.Status.MODIFIED: return 'modified'; | ||
case interfaces_1.Status.INDEX_ADDED: return 'added'; | ||
case interfaces_1.Status.INDEX_DELETED: return 'deleted'; | ||
case interfaces_1.Status.DELETED: return 'deleted'; | ||
case interfaces_1.Status.INDEX_RENAMED: return 'renamed'; | ||
case interfaces_1.Status.INDEX_COPIED: return 'copied'; | ||
case interfaces_1.Status.UNTRACKED: return 'untracked'; | ||
case interfaces_1.Status.IGNORED: return 'ignored'; | ||
case interfaces_1.Status.BOTH_DELETED: return 'conflict both-deleted'; | ||
case interfaces_1.Status.ADDED_BY_US: return 'conflict added-by-us'; | ||
case interfaces_1.Status.DELETED_BY_THEM: return 'conflict deleted-by-them'; | ||
case interfaces_1.Status.ADDED_BY_THEM: return 'conflict added-by-them'; | ||
case interfaces_1.Status.DELETED_BY_US: return 'conflict deleted-by-us'; | ||
case interfaces_1.Status.BOTH_ADDED: return 'conflict both-added'; | ||
case interfaces_1.Status.BOTH_MODIFIED: return 'conflict both-modified'; | ||
case "INDEX_MODIFIED" /* INDEX_MODIFIED */: return 'modified'; | ||
case "MODIFIED" /* MODIFIED */: return 'modified'; | ||
case "INDEX_ADDED" /* INDEX_ADDED */: return 'added'; | ||
case "INDEX_DELETED" /* INDEX_DELETED */: return 'deleted'; | ||
case "DELETED" /* DELETED */: return 'deleted'; | ||
case "INDEX_RENAMED" /* INDEX_RENAMED */: return 'renamed'; | ||
case "INDEX_COPIED" /* INDEX_COPIED */: return 'copied'; | ||
case "UNTRACKED" /* UNTRACKED */: return 'untracked'; | ||
case "IGNORED" /* IGNORED */: return 'ignored'; | ||
case "BOTH_DELETED" /* BOTH_DELETED */: return 'conflict both-deleted'; | ||
case "ADDED_BY_US" /* ADDED_BY_US */: return 'conflict added-by-us'; | ||
case "DELETED_BY_THEM" /* DELETED_BY_THEM */: return 'conflict deleted-by-them'; | ||
case "ADDED_BY_THEM" /* ADDED_BY_THEM */: return 'conflict added-by-them'; | ||
case "DELETED_BY_US" /* DELETED_BY_US */: return 'conflict deleted-by-us'; | ||
case "BOTH_ADDED" /* BOTH_ADDED */: return 'conflict both-added'; | ||
case "BOTH_MODIFIED" /* BOTH_MODIFIED */: return 'conflict both-modified'; | ||
default: return ''; | ||
@@ -1146,18 +1171,18 @@ } | ||
switch (status) { | ||
case interfaces_1.Status.INDEX_MODIFIED: return 'index-modified'; | ||
case interfaces_1.Status.MODIFIED: return 'modified'; | ||
case interfaces_1.Status.INDEX_ADDED: return 'index-added'; | ||
case interfaces_1.Status.INDEX_DELETED: return 'index-deleted'; | ||
case interfaces_1.Status.DELETED: return 'deleted'; | ||
case interfaces_1.Status.INDEX_RENAMED: return 'index-renamed'; | ||
case interfaces_1.Status.INDEX_COPIED: return 'index-copied'; | ||
case interfaces_1.Status.UNTRACKED: return 'untracked'; | ||
case interfaces_1.Status.IGNORED: return 'ignored'; | ||
case interfaces_1.Status.BOTH_DELETED: return 'both-deleted'; | ||
case interfaces_1.Status.ADDED_BY_US: return 'added-by-us'; | ||
case interfaces_1.Status.DELETED_BY_THEM: return 'deleted-by-them'; | ||
case interfaces_1.Status.ADDED_BY_THEM: return 'added-by-them'; | ||
case interfaces_1.Status.DELETED_BY_US: return 'deleted-by-us'; | ||
case interfaces_1.Status.BOTH_ADDED: return 'both-added'; | ||
case interfaces_1.Status.BOTH_MODIFIED: return 'both-modified'; | ||
case "INDEX_MODIFIED" /* INDEX_MODIFIED */: return 'index-modified'; | ||
case "MODIFIED" /* MODIFIED */: return 'modified'; | ||
case "INDEX_ADDED" /* INDEX_ADDED */: return 'index-added'; | ||
case "INDEX_DELETED" /* INDEX_DELETED */: return 'index-deleted'; | ||
case "DELETED" /* DELETED */: return 'deleted'; | ||
case "INDEX_RENAMED" /* INDEX_RENAMED */: return 'index-renamed'; | ||
case "INDEX_COPIED" /* INDEX_COPIED */: return 'index-copied'; | ||
case "UNTRACKED" /* UNTRACKED */: return 'untracked'; | ||
case "IGNORED" /* IGNORED */: return 'ignored'; | ||
case "BOTH_DELETED" /* BOTH_DELETED */: return 'both-deleted'; | ||
case "ADDED_BY_US" /* ADDED_BY_US */: return 'added-by-us'; | ||
case "DELETED_BY_THEM" /* DELETED_BY_THEM */: return 'deleted-by-them'; | ||
case "ADDED_BY_THEM" /* ADDED_BY_THEM */: return 'added-by-them'; | ||
case "DELETED_BY_US" /* DELETED_BY_US */: return 'deleted-by-us'; | ||
case "BOTH_ADDED" /* BOTH_ADDED */: return 'both-added'; | ||
case "BOTH_MODIFIED" /* BOTH_MODIFIED */: return 'both-modified'; | ||
default: return ''; | ||
@@ -1168,18 +1193,18 @@ } | ||
switch (key) { | ||
case 'index-modified': return interfaces_1.Status.INDEX_MODIFIED; | ||
case 'modified': return interfaces_1.Status.MODIFIED; | ||
case 'index-added': return interfaces_1.Status.INDEX_ADDED; | ||
case 'index-deleted': return interfaces_1.Status.INDEX_DELETED; | ||
case 'deleted': return interfaces_1.Status.DELETED; | ||
case 'index-renamed': return interfaces_1.Status.INDEX_RENAMED; | ||
case 'index-copied': return interfaces_1.Status.INDEX_COPIED; | ||
case 'untracked': return interfaces_1.Status.UNTRACKED; | ||
case 'ignored': return interfaces_1.Status.IGNORED; | ||
case 'both-deleted': return interfaces_1.Status.BOTH_DELETED; | ||
case 'added-by-us': return interfaces_1.Status.ADDED_BY_US; | ||
case 'deleted-by-them': return interfaces_1.Status.DELETED_BY_THEM; | ||
case 'added-by-them': return interfaces_1.Status.ADDED_BY_THEM; | ||
case 'deleted-by-us': return interfaces_1.Status.DELETED_BY_US; | ||
case 'both-added': return interfaces_1.Status.BOTH_ADDED; | ||
case 'both-modified': return interfaces_1.Status.BOTH_MODIFIED; | ||
case 'index-modified': return "INDEX_MODIFIED" /* INDEX_MODIFIED */; | ||
case 'modified': return "MODIFIED" /* MODIFIED */; | ||
case 'index-added': return "INDEX_ADDED" /* INDEX_ADDED */; | ||
case 'index-deleted': return "INDEX_DELETED" /* INDEX_DELETED */; | ||
case 'deleted': return "DELETED" /* DELETED */; | ||
case 'index-renamed': return "INDEX_RENAMED" /* INDEX_RENAMED */; | ||
case 'index-copied': return "INDEX_COPIED" /* INDEX_COPIED */; | ||
case 'untracked': return "UNTRACKED" /* UNTRACKED */; | ||
case 'ignored': return "IGNORED" /* IGNORED */; | ||
case 'both-deleted': return "BOTH_DELETED" /* BOTH_DELETED */; | ||
case 'added-by-us': return "ADDED_BY_US" /* ADDED_BY_US */; | ||
case 'deleted-by-them': return "DELETED_BY_THEM" /* DELETED_BY_THEM */; | ||
case 'added-by-them': return "ADDED_BY_THEM" /* ADDED_BY_THEM */; | ||
case 'deleted-by-us': return "DELETED_BY_US" /* DELETED_BY_US */; | ||
case 'both-added': return "BOTH_ADDED" /* BOTH_ADDED */; | ||
case 'both-modified': return "BOTH_MODIFIED" /* BOTH_MODIFIED */; | ||
default: return -1; | ||
@@ -1196,11 +1221,11 @@ } | ||
switch (raw.x + raw.y) { | ||
case '??': return interfaces_1.Status.UNTRACKED; | ||
case '!!': return interfaces_1.Status.IGNORED; | ||
case 'DD': return interfaces_1.Status.BOTH_DELETED; | ||
case 'AU': return interfaces_1.Status.ADDED_BY_US; | ||
case 'UD': return interfaces_1.Status.DELETED_BY_THEM; | ||
case 'UA': return interfaces_1.Status.ADDED_BY_THEM; | ||
case 'DU': return interfaces_1.Status.DELETED_BY_US; | ||
case 'AA': return interfaces_1.Status.BOTH_ADDED; | ||
case 'UU': return interfaces_1.Status.BOTH_MODIFIED; | ||
case '??': return "UNTRACKED" /* UNTRACKED */; | ||
case '!!': return "IGNORED" /* IGNORED */; | ||
case 'DD': return "BOTH_DELETED" /* BOTH_DELETED */; | ||
case 'AU': return "ADDED_BY_US" /* ADDED_BY_US */; | ||
case 'UD': return "DELETED_BY_THEM" /* DELETED_BY_THEM */; | ||
case 'UA': return "ADDED_BY_THEM" /* ADDED_BY_THEM */; | ||
case 'DU': return "DELETED_BY_US" /* DELETED_BY_US */; | ||
case 'AA': return "BOTH_ADDED" /* BOTH_ADDED */; | ||
case 'UU': return "BOTH_MODIFIED" /* BOTH_MODIFIED */; | ||
default: | ||
@@ -1210,12 +1235,12 @@ } | ||
switch (raw.x) { | ||
case 'M': return interfaces_1.Status.INDEX_MODIFIED; | ||
case 'A': return interfaces_1.Status.INDEX_ADDED; | ||
case 'D': return interfaces_1.Status.INDEX_DELETED; | ||
case 'R': return interfaces_1.Status.INDEX_RENAMED; | ||
case 'C': return interfaces_1.Status.INDEX_COPIED; | ||
case 'M': return "INDEX_MODIFIED" /* INDEX_MODIFIED */; | ||
case 'A': return "INDEX_ADDED" /* INDEX_ADDED */; | ||
case 'D': return "INDEX_DELETED" /* INDEX_DELETED */; | ||
case 'R': return "INDEX_RENAMED" /* INDEX_RENAMED */; | ||
case 'C': return "INDEX_COPIED" /* INDEX_COPIED */; | ||
default: | ||
} | ||
switch (raw.y) { | ||
case 'M': return interfaces_1.Status.MODIFIED; | ||
case 'D': return interfaces_1.Status.DELETED; | ||
case 'M': return "MODIFIED" /* MODIFIED */; | ||
case 'D': return "DELETED" /* DELETED */; | ||
default: | ||
@@ -1287,3 +1312,7 @@ } | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(__webpack_require__(/*! ./uri */ "./src/utils/uri.ts")); | ||
exports.splitFilePath = (fullPath) => { | ||
@@ -1299,2 +1328,45 @@ return { | ||
/***/ "./src/utils/uri.ts": | ||
/*!**************************!*\ | ||
!*** ./src/utils/uri.ts ***! | ||
\**************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function fromGitUri(uri) { | ||
return JSON.parse(uri.query); | ||
} | ||
exports.fromGitUri = fromGitUri; | ||
// As a mitigation for extensions like ESLint showing warnings and errors | ||
// for git URIs, let's change the file extension of these uris to .git, | ||
// when `replaceFileExtension` is true. | ||
function toGitUri(uri, ref, options = {}) { | ||
const params = { | ||
path: uri.fsPath, | ||
ref, | ||
}; | ||
if (options.submoduleOf) { | ||
params.submoduleOf = options.submoduleOf; | ||
} | ||
let path = uri.path; | ||
if (options.replaceFileExtension) { | ||
path = `${path}.git`; | ||
} | ||
else if (options.submoduleOf) { | ||
path = `${path}.diff`; | ||
} | ||
return uri.with({ | ||
scheme: 'git', | ||
path, | ||
query: JSON.stringify(params) | ||
}); | ||
} | ||
exports.toGitUri = toGitUri; | ||
/***/ }), | ||
/***/ "graphql-tag": | ||
@@ -1301,0 +1373,0 @@ /*!******************************!*\ |
@@ -1,2 +0,4 @@ | ||
import { IGitStatusResult } from './generated-models'; | ||
/// <reference types="node" /> | ||
import { IGitStatusResult, IGitResult } from './generated-models'; | ||
import { IGitAccount } from './git-service'; | ||
export interface IStatusHeader { | ||
@@ -25,1 +27,29 @@ readonly kind: 'header'; | ||
}; | ||
export interface IGit { | ||
path: string; | ||
version: string; | ||
} | ||
export interface Submodule { | ||
name: string; | ||
path: string; | ||
url: string; | ||
} | ||
export declare type ProcessOutput = { | ||
output: Buffer; | ||
error: Buffer; | ||
exitCodes: any; | ||
}; | ||
export interface IGitExecutionOptions<E = any> { | ||
readonly successExitCodes?: ReadonlySet<number>; | ||
readonly expectedErrors?: ReadonlySet<E>; | ||
readonly trackLFSProgress?: boolean; | ||
} | ||
export interface IGitModel { | ||
config(name: string, value: string): Promise<IGitResult>; | ||
exec(args: string[], path: string, options?: IGitExecutionOptions): Promise<IGitResult>; | ||
getRepositoryRoot(repoPath: string): Promise<string>; | ||
envForAuthentication(auth?: IGitAccount | null): Object; | ||
setupGitSSH(setupKnownHosts: boolean, pathToSSHSecret: any, pathToSSHKnownHosts: any): any; | ||
clone(url: string, parentPath: string, options?: any): Promise<IGitResult>; | ||
spawnAndComplete(args: string[], path: string, options: any, successExitCodes?: Set<number>, stdOutMaxLength?: number): Promise<ProcessOutput>; | ||
} |
import { IGitUser } from './git-user'; | ||
import { IGitStatusResult, IGitResult, IPushOptions, Stash, IRepoRefs as ReposRef } from './generated-models'; | ||
import { ICommit, Submodule } from './git-core'; | ||
import { URI as Uri } from '@vscode/monaco-editor/esm/vs/base/common/uri'; | ||
import { Event } from '@vscode/monaco-editor/esm/vs/base/common/event'; | ||
import { IDisposable } from '@vscode/monaco-editor/esm/vs/base/common/lifecycle'; | ||
export interface IUserRepository { | ||
@@ -8,1 +13,64 @@ cacheUser(user: IGitUser, overwriteEmail?: boolean): Promise<IGitUser>; | ||
} | ||
export declare const enum RepositoryState { | ||
Idle = 0, | ||
Disposed = 1 | ||
} | ||
export interface ModelChangeEvent { | ||
repository: IRepository; | ||
uri: Uri; | ||
} | ||
export interface OriginalResourceChangeEvent { | ||
repository: IRepository; | ||
uri: Uri; | ||
} | ||
export interface IRepository extends IDisposable { | ||
onDidChangeState: Event<RepositoryState>; | ||
onDidChangeOriginalResource: Event<Uri>; | ||
onDidRunGitStatus: Event<void>; | ||
onDidChangeRepository: Event<Uri>; | ||
root: string; | ||
submodules: Submodule[]; | ||
setPath(path: string): void; | ||
getPath(): string | Promise<string>; | ||
status(): Promise<IGitStatusResult>; | ||
backgroundStatus(): Promise<IGitStatusResult>; | ||
add(paths?: string[]): Promise<IGitResult>; | ||
reset(paths?: string[]): Promise<IGitResult>; | ||
stash(message?: string): Promise<IGitResult>; | ||
discartChanges(paths: string[]): Promise<IGitResult>; | ||
init(): Promise<IGitResult>; | ||
commit(message: string, opts: { | ||
amend?: boolean; | ||
signoff?: boolean; | ||
}): Promise<IGitResult>; | ||
commitAll(message: string, opts: { | ||
amend?: boolean; | ||
signoff?: boolean; | ||
}): Promise<IGitResult>; | ||
headCommit(): Promise<IGitResult>; | ||
pull(options?: any): Promise<IGitResult>; | ||
push(remote?: string, name?: string, options?: IPushOptions): Promise<IGitResult>; | ||
getCommit(ref: string): Promise<ICommit>; | ||
fetch(remote: string): Promise<void>; | ||
createBranch(name: string, checkout: boolean): Promise<IGitResult>; | ||
tag(name: string, message?: string): Promise<IGitResult>; | ||
getRefs(): Promise<ReposRef[]>; | ||
deleteBranch(name: string, remote?: string): Promise<IGitResult>; | ||
getStashes(): Promise<Stash[]>; | ||
getHeadContent(path: string): Promise<IGitResult>; | ||
checkout(name: string): Promise<IGitResult>; | ||
merge(branch: string): Promise<IGitResult>; | ||
unStash(index?: number): Promise<IGitResult>; | ||
undoLastCommit(): Promise<IGitResult>; | ||
setConfigData(type: string, value: string, options?: { | ||
repo: boolean; | ||
override?: boolean; | ||
}): Promise<any>; | ||
setConfig(key: string, value: string): Promise<string>; | ||
getConfig(key: string): Promise<string>; | ||
getConfigs(): Promise<{ | ||
key: string; | ||
value: string; | ||
}[]>; | ||
getGlobalConfig(key: string): Promise<string>; | ||
} |
@@ -1,3 +0,6 @@ | ||
import { ICommit } from './git-core'; | ||
import { IPushOptions, IGetHeadQuery, IGitResult, IOpenRes, IGitStatusResult, IGitResultWithStatus, ICloneOptions, Stash, Ref, IClosed, ICheckoutOptions, IGlobalDataOptions, ISyncOptions, ICommitOptions, IPullOptions } from './generated-models'; | ||
import { ICommit, IGit } from './git-core'; | ||
import { IPushOptions, IGetHeadQuery, IGitResult, IGitStatusResult, IGitResultWithStatus, ICloneOptions, Stash, Ref, ICheckoutOptions, IGlobalDataOptions, ISyncOptions, ICommitOptions, IPullOptions } from './generated-models'; | ||
import { IDisposable } from '@vscode/monaco-editor/esm/vs/base/common/lifecycle'; | ||
import { IRepository, ModelChangeEvent, OriginalResourceChangeEvent } from './git-repository'; | ||
import { Event } from '@vscode/monaco-editor/esm/vs/base/common/event'; | ||
export interface IExecutionResult { | ||
@@ -12,5 +15,12 @@ exitCode: number; | ||
} | ||
export interface IOpenRepository extends IDisposable { | ||
repository: IRepository; | ||
} | ||
export interface IGitService { | ||
findGit(): any; | ||
openRepository(files: any[], rootPath: string): Promise<IOpenRes>; | ||
onDidOpenRepository: Event<IRepository>; | ||
onDidCloseRepository: Event<IRepository>; | ||
onDidChangeRepository: Event<ModelChangeEvent>; | ||
onDidChangeOriginalResource: Event<OriginalResourceChangeEvent>; | ||
openRepository(path: string): Promise<void>; | ||
findGit(hint: string | undefined): Promise<IGit>; | ||
setRepo(path: string): void; | ||
@@ -44,4 +54,4 @@ add(paths?: string[]): Promise<IGitStatusResult[]>; | ||
setGlobalData(type: string, value: string, options?: IGlobalDataOptions): Promise<any>; | ||
close(path: string): Promise<IClosed>; | ||
close(path: string | IRepository): Promise<void>; | ||
dispose(): void; | ||
} |
@@ -9,10 +9,1 @@ export interface IGitUser { | ||
} | ||
export declare type UserAuth = { | ||
auth: { | ||
login: string; | ||
endpoint: string; | ||
}; | ||
}; | ||
export declare type ISaveUser = { | ||
id: string; | ||
}; |
@@ -0,1 +1,2 @@ | ||
export * from './uri'; | ||
export declare const splitFilePath: (fullPath: string) => { | ||
@@ -2,0 +3,0 @@ folder: string; |
{ | ||
"name": "@git-stack/core", | ||
"version": "0.10.1-alpha.28", | ||
"version": "0.10.1-alpha.30", | ||
"description": "GraphQL for sample", | ||
@@ -60,3 +60,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "d25db07dbbac46ac42e8a8e209535924fd76a6cb" | ||
"gitHead": "3634011f4bb4d1aabe42d4c5ae3c0b5c5c2a478a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
624579
6553
26