Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Move @kbn/config-schema to server] examples/response_stream #189520

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
*/

export { reducerStreamReducer } from './reducer';
export { reducerStreamRequestBodySchema } from './request_body_schema';
export type { ReducerStreamRequestBodySchema } from './request_body_schema';
export type { ReducerStreamRequestBodySchema } from '../../../server/routes/schemas/reducer_stream';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was in common originally because just the type was reused on the client (which shouldn't leak the whole lib). It looks like this usage is no longer the case so I think you can remove this export from common.

Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
* Side Public License, v 1.
*/

export { simpleStringStreamRequestBodySchema } from './request_body_schema';
export type { SimpleStringStreamRequestBodySchema } from './request_body_schema';
export type { SimpleStringStreamRequestBodySchema } from '../../../server/routes/schemas/simple_string_stream';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, it looks like this can be removed from common altogether.

2 changes: 1 addition & 1 deletion examples/response_stream/server/routes/reducer_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
deleteEntityAction,
ReducerStreamApiAction,
} from '../../common/api/reducer_stream/reducer_actions';
import { reducerStreamRequestBodySchema } from '../../common/api/reducer_stream';
import { reducerStreamRequestBodySchema } from './schemas/reducer_stream';
import { RESPONSE_STREAM_API_ENDPOINT } from '../../common/api';

import { entities, getActions } from './shared';
Expand Down
2 changes: 1 addition & 1 deletion examples/response_stream/server/routes/redux_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
error,
type ReduxStreamApiAction,
} from '../../common/api/redux_stream/data_slice';
import { reducerStreamRequestBodySchema } from '../../common/api/reducer_stream';
import { reducerStreamRequestBodySchema } from './schemas/reducer_stream';
import { RESPONSE_STREAM_API_ENDPOINT } from '../../common/api';

import { entities, getActions } from './shared';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* 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.
*/

export { reducerStreamRequestBodySchema } from './request_body_schema';
export type { ReducerStreamRequestBodySchema } from './request_body_schema';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* 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.
*/

export { simpleStringStreamRequestBodySchema } from './request_body_schema';
export type { SimpleStringStreamRequestBodySchema } from './request_body_schema';
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import type { IRouter, Logger } from '@kbn/core/server';
import { streamFactory } from '@kbn/ml-response-stream/server';

import { simpleStringStreamRequestBodySchema } from '../../common/api/simple_string_stream';
import { simpleStringStreamRequestBodySchema } from './schemas/simple_string_stream';
import { RESPONSE_STREAM_API_ENDPOINT } from '../../common/api';

function timeout(ms: number) {
Expand Down