[Code] Merge esqueue from a node package to the source code (#27179)

This commit is contained in:
Mengwei Ding 2018-12-13 16:54:16 -08:00 committed by Fuyao Zhao
parent fb8e9e8029
commit 6aa1cc4fee
66 changed files with 46 additions and 68 deletions

View file

@ -137,7 +137,6 @@
"yargs": "4.8.1"
},
"dependencies": {
"@code/esqueue": "link:plugins/code/packages/esqueue",
"@elastic/datemath": "5.0.1",
"@elastic/eui": "5.3.0",
"@elastic/node-crypto": "0.1.2",

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient, Esqueue } from '@code/esqueue';
import { Server } from 'hapi';
import moment from 'moment';
import { resolve } from 'path';
@ -14,6 +13,7 @@ import {
RepositoryIndexInitializerFactory,
tryMigrateIndices,
} from './server/indexer';
import { EsClient, Esqueue } from './server/lib/esqueue';
import { Log } from './server/log';
import { InstallManager } from './server/lsp/install_manager';
import { LspService } from './server/lsp/lsp_service';

View file

@ -4,10 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { Indexer, IndexProgress, ProgressReporter } from '.';
import { IndexRequest, IndexStats, IndexStatsKey, RepositoryUri } from '../../model';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { aggregateIndexStats } from '../utils/index_stats_aggregator';
import { IndexCreationRequest } from './index_creation_request';

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { ConsoleLoggerFactory } from '../utils/console_logger_factory';
import { BatchIndexHelper } from './batch_index_helper';

View file

@ -4,8 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
/*

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { AnyObject, EsClient } from '../lib/esqueue';
import { IndexCreationRequest } from './index_creation_request';
import { IndexCreator } from './index_creator';

View file

@ -4,8 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { EsClient } from '../lib/esqueue';
import { IndexCreationRequest } from './index_creation_request';
import pkg from './schema/version.json';

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { ConsoleLoggerFactory } from '../utils/console_logger_factory';
import { IndexCreationRequest } from './index_creation_request';

View file

@ -4,8 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import {
getDocumentIndexCreationRequest,
getReferenceIndexCreationRequest,
@ -14,8 +12,9 @@ import {
IndexVersionController,
} from '.';
import { Repository } from '../../model';
import { Log } from '../../server/log';
import { RepositoryObjectClient } from '../../server/search';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { RepositoryObjectClient } from '../search';
import pkg from './schema/version.json';
export class IndexMigrator {

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { ConsoleLoggerFactory } from '../utils/console_logger_factory';
import { IndexCreationRequest } from './index_creation_request';

View file

@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import _ from 'lodash';
import { IndexMigrator } from '.';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { IndexCreationRequest } from './index_creation_request';
import pkg from './schema/version.json';

View file

@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import fs from 'fs';
import Git from 'nodegit';
import path from 'path';
import rimraf from 'rimraf';
import sinon from 'sinon';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { InstallManager } from '../lsp/install_manager';
import { LspService } from '../lsp/lsp_service';

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import fs from 'fs';
import util from 'util';
@ -13,6 +12,7 @@ import { RepositoryUtils } from '../../common/repository_utils';
import { toCanonicalUrl } from '../../common/uri_util';
import { Document, IndexStats, IndexStatsKey, LspIndexRequest, RepositoryUri } from '../../model';
import { GitOperations } from '../git_operations';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { LspService } from '../lsp/lsp_service';
import { ServerOptions } from '../server_options';

View file

@ -4,10 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { Indexer, IndexerFactory, LspIndexer } from '.';
import { RepositoryUri } from '../../model';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { LspService } from '../lsp/lsp_service';
import { ServerOptions } from '../server_options';

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { ConsoleLoggerFactory } from '../utils/console_logger_factory';
import { RepositoryIndexInitializer } from './repository_index_initializer';

View file

@ -4,9 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { RepositoryUri } from '../../model';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { AbstractIndexer } from './abstract_indexer';
import { IndexCreationRequest } from './index_creation_request';

View file

@ -4,10 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { Indexer, IndexerFactory, RepositoryIndexInitializer } from '.';
import { RepositoryUri } from '../../model';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
export class RepositoryIndexInitializerFactory implements IndexerFactory {

View file

@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { ResponseMessage } from 'vscode-jsonrpc/lib/messages';
import { LanguageServerStatus } from '../../common/language_server';
import { EsClient } from '../lib/esqueue';
import { ServerOptions } from '../server_options';
import { LoggerFactory } from '../utils/log_factory';
import { LanguageServerController } from './controller';

View file

@ -11,7 +11,6 @@ import path from 'path';
import { ResponseMessage } from 'vscode-jsonrpc/lib/messages';
import { Hover, Location, TextDocumentPositionParams } from 'vscode-languageserver';
import { EsClient } from '@code/esqueue';
import { Full } from 'elastic-lsp-extension';
import { DetailSymbolInformation } from 'elastic-lsp-extension';
@ -20,6 +19,7 @@ import { RepositoryUtils } from '../../common/repository_utils';
import { parseLspUrl } from '../../common/uri_util';
import { LspRequest } from '../../model';
import { getDefaultBranch, GitOperations } from '../git_operations';
import { EsClient } from '../lib/esqueue';
import { Logger } from '../log';
import { RepositoryObjectClient } from '../search';
import { LoggerFactory } from '../utils/log_factory';

View file

@ -4,11 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient, Esqueue } from '@code/esqueue';
import { RepositoryUtils } from '../../common/repository_utils';
import { CloneProgress, CloneWorkerProgress, CloneWorkerResult } from '../../model';
import { getDefaultBranch, getHeadRevision } from '../git_operations';
import { EsClient, Esqueue } from '../lib/esqueue';
import { Log } from '../log';
import { RepositoryObjectClient } from '../search';
import { AbstractWorker } from './abstract_worker';

View file

@ -4,15 +4,15 @@
* you may not use this file except in compliance with the Elastic License.
*/
import moment from 'moment';
import { WorkerResult } from '../../model';
import {
CancellationToken,
Esqueue,
events as esqueueEvents,
Job as JobInternal,
} from '@code/esqueue';
import moment from 'moment';
import { WorkerResult } from '../../model';
} from '../lib/esqueue';
import { Log } from '../log';
import { Job } from './job';
import { Worker } from './worker';

View file

@ -4,9 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { CancellationToken } from '@code/esqueue';
import { RepositoryUri } from '../../model';
import { CancellationToken } from '../lib/esqueue';
export class CancellationSerivce {
// TODO: Add clone/update cancellation map.

View file

@ -4,10 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient, Esqueue } from '@code/esqueue';
import { RepositoryUtils } from '../../common/repository_utils';
import { CloneProgress, CloneWorkerProgress, CloneWorkerResult } from '../../model';
import { EsClient, Esqueue } from '../lib/esqueue';
import { Log } from '../log';
import { RepositoryService } from '../repository_service';
import { SocketService } from '../socket_service';

View file

@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient, Esqueue } from '@code/esqueue';
import moment from 'moment';
import { RepositoryUri } from '../../model';
import { WorkerProgress, WorkerResult } from '../../model/repository';
import { DocumentIndexName, ReferenceIndexName, SymbolIndexName } from '../indexer/schema';
import { EsClient, Esqueue } from '../lib/esqueue';
import { Log } from '../log';
import { LspService } from '../lsp/lsp_service';
import { RepositoryService } from '../repository_service';

View file

@ -4,11 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient, Esqueue } from '@code/esqueue';
import moment = require('moment');
import { IndexStats, IndexWorkerResult, RepositoryUri, WorkerProgress } from '../../model';
import { IndexerFactory, IndexProgress } from '../indexer';
import { EsClient, Esqueue } from '../lib/esqueue';
import { Log } from '../log';
import { RepositoryObjectClient } from '../search';
import { SocketService } from '../socket_service';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { CancellationToken } from '@code/esqueue';
import { CancellationToken } from '../lib/esqueue';
export interface Job {
payload: any;

View file

@ -4,9 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient, Esqueue } from '@code/esqueue';
import { CloneWorkerResult } from '../../model';
import { EsClient, Esqueue } from '../lib/esqueue';
import { Log } from '../log';
import { RepositoryService } from '../repository_service';
import { AbstractGitWorker } from './abstract_git_worker';

View file

@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import Boom from 'boom';
import hapi, { RequestQuery } from 'hapi';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { WorkspaceCommand } from '../lsp/workspace_command';
import { WorkspaceHandler } from '../lsp/workspace_handler';

View file

@ -3,7 +3,6 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { Repository } from '../../model';
import {
@ -11,6 +10,7 @@ import {
RepositoryReservedField,
RepositoryTypeName,
} from '../indexer/schema';
import { EsClient } from '../lib/esqueue';
import { Poller } from '../poller';
export abstract class AbstractScheduler {

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import moment from 'moment';
import sinon from 'sinon';
@ -14,6 +13,7 @@ import {
RepositoryLspIndexStatusReservedField,
RepositoryReservedField,
} from '../indexer/schema';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { IndexWorker } from '../queue/index_worker';
import { ServerOptions } from '../server_options';

View file

@ -4,10 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { RepositoryUtils } from '../../common/repository_utils';
import { Repository } from '../../model';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { IndexWorker } from '../queue';
import { RepositoryObjectClient } from '../search';

View file

@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import moment from 'moment';
import sinon from 'sinon';
import { CloneProgress, CloneWorkerProgress, Repository } from '../../model';
import { RepositoryGitStatusReservedField, RepositoryReservedField } from '../indexer/schema';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { UpdateWorker } from '../queue/update_worker';
import { ServerOptions } from '../server_options';

View file

@ -4,14 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { Repository } from '../../model';
import {
RepositoryIndexName,
RepositoryReservedField,
RepositoryTypeName,
} from '../indexer/schema';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { UpdateWorker } from '../queue';
import { RepositoryObjectClient } from '../search';

View file

@ -4,9 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { SearchRequest, SearchResult } from '../../model';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { SearchClient } from './search_client';

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { DocumentSearchClient } from './document_search_client';

View file

@ -4,8 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { IRange } from 'monaco-editor';
import { LineMapper } from '../../common/line_mapper';
import {
@ -17,6 +15,7 @@ import {
SourceRange,
} from '../../model';
import { DocumentIndexNamePrefix } from '../indexer/schema';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import {
expandRanges,

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { CloneWorkerProgress, Repository, WorkerProgress } from '../../model';
@ -17,6 +16,7 @@ import {
RepositoryReservedField,
RepositoryTypeName,
} from '../indexer/schema';
import { AnyObject, EsClient } from '../lib/esqueue';
import { RepositoryObjectClient } from './repository_object_client';
const esClient = {

View file

@ -4,8 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import {
CloneWorkerProgress,
Repository,
@ -23,6 +21,7 @@ import {
RepositoryReservedField,
RepositoryTypeName,
} from '../indexer/schema';
import { EsClient } from '../lib/esqueue';
/*
* This RepositoryObjectClient is dedicated to manipulate resository related objects

View file

@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { RepositoryReservedField } from '../indexer/schema';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { RepositorySearchClient } from './repository_search_client';

View file

@ -4,10 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { Repository, RepositorySearchRequest, RepositorySearchResult } from '../../model';
import { RepositoryIndexNamePrefix, RepositoryReservedField } from '../indexer/schema';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { AbstractSearchClient } from './abstract_search_client';

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { AnyObject, EsClient } from '@code/esqueue';
import sinon from 'sinon';
import { AnyObject, EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { SymbolSearchClient } from './symbol_search_client';

View file

@ -4,11 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EsClient } from '@code/esqueue';
import { DetailSymbolInformation } from 'elastic-lsp-extension';
import { SymbolSearchRequest, SymbolSearchResult } from '../../model';
import { SymbolIndexNamePrefix } from '../indexer/schema';
import { EsClient } from '../lib/esqueue';
import { Log } from '../log';
import { AbstractSearchClient } from './abstract_search_client';

View file

@ -757,10 +757,6 @@
lodash "^4.17.10"
to-fast-properties "^2.0.0"
"@code/esqueue@link:x-pack/plugins/code/packages/esqueue":
version "0.0.0"
uid ""
"@commitlint/cli@^7.1.2":
version "7.2.1"
resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.2.1.tgz#dbb9eeb1f5015a129bb0801fbc1115eb1dcd513b"