mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
* chore(NA): eslint rule for disallowing naked eslint-disable * chore(NA): export new rule and update docs * chore(NA): creation of rule in ts * chore(NA): new corrected rule in ts * refact(NA): remove old logic from older plugin * docs(NA): update documentation * docs(NA): update documentation * docs(NA): update documentation * refact(NA): include edge cases for better locating errors * chore(NA): changed regex name * docs(NA): correct name rule on docs * refact(NA): use dedent in the template literals * refact(NA): check for undefined * fix(NA): introduces support for eslint-disable-line * chore(NA): fix extra space * test(NA): created more test cases * chore(NA): rename plugin to eslint-plugin-disable * docs(NA): update nav and operations landing page ids for eslint rule * test(NA): use messageIds on test * chore(NA): complete naked eslint disables with specific rules * chore(NA): specific rules for a few naked eslint disable * chore(NA): add focused eslint disable on big reindex_operation_with_large_error_message.ts file * chore(NA): changes according PR feedback * chore(NA): include specific eslint rules on latest naked eslint disable * chore(NA): missing eslint disable specific rule * fix(NA): remove comment for js annotator * chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts * chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts * chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
import { Plugin, PluginInitializerContext, CoreSetup, CoreStart, Logger } from '@kbn/core/server';
|
|
import type { DataRequestHandlerContext } from '@kbn/data-plugin/server';
|
|
|
|
import { defineReducerStreamRoute, defineSimpleStringStreamRoute } from './routes';
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
export interface ResponseStreamSetupPlugins {}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
export interface ResponseStreamStartPlugins {}
|
|
|
|
export class ResponseStreamPlugin implements Plugin {
|
|
private readonly logger: Logger;
|
|
|
|
constructor(initializerContext: PluginInitializerContext) {
|
|
this.logger = initializerContext.logger.get();
|
|
}
|
|
|
|
public setup(core: CoreSetup, plugins: ResponseStreamSetupPlugins) {
|
|
const router = core.http.createRouter<DataRequestHandlerContext>();
|
|
|
|
core.getStartServices().then(([_, depsStart]) => {
|
|
defineReducerStreamRoute(router, this.logger);
|
|
defineSimpleStringStreamRoute(router, this.logger);
|
|
});
|
|
}
|
|
|
|
public start(core: CoreStart, plugins: ResponseStreamStartPlugins) {}
|
|
|
|
public stop() {}
|
|
}
|