[Move @kbn/config-schema to server] content_management#191844
[Move @kbn/config-schema to server] content_management#191844afharo wants to merge 1 commit intoelastic:mainfrom
@kbn/config-schema to server] content_management#191844Conversation
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
| }; | ||
| import { GetResult } from './get'; | ||
|
|
||
| export interface BulkGetIn<T extends string = string, Options extends void | object = object> { |
There was a problem hiding this comment.
I could have moved the types to the server as well to keep the procedure definition all together in the same file. I just thought that imports would look weird (and force import type when importing from the ./server directories while ./common don't require that and can be imported with plain import).
It would have triggered a lot of changes as well, making this PR harder to review.
| export const versionSchema = schema.number({ | ||
| validate: (value) => { | ||
| const { result } = validateVersion(value); | ||
| if (!result) { | ||
| return 'must be an integer'; | ||
| } | ||
| }, | ||
| }); |
There was a problem hiding this comment.
Moved from constants.ts since it's not a constant per se.
| // exporting schemas separately from the index.ts file to not include @kbn/schema in the public bundle | ||
| // should be only used server-side or in jest tests |
There was a problem hiding this comment.
The hack is not needed if the code lives in the server 🙂
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
To update your PR or re-run it, just comment with: |
|
@afharo it looks like this PR has accumulated some merge conflicts. I can review when this is ready |
Thanks! I will rework it trying to minimize the amount of changes (via reexports) :) |
Pull request was converted to draft
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
Summary
Part of #189476.
We want to avoid
@kbn/config-schemafrom leaking to the browser, and this plugin is using it outside of./server.This PR moves all the files depending on
@kbn/config-schema's runtime inside./server.For maintainers