-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] content_management
#191844
base: main
Are you sure you want to change the base?
[Move @kbn/config-schema
to server] content_management
#191844
Conversation
Pinging @elastic/appex-sharedux (Team:SharedUX) |
{ unknowns: 'forbid' } | ||
), | ||
}; | ||
import { GetResult } from './get'; | ||
|
||
export interface BulkGetIn<T extends string = string, Options extends void | object = object> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-schema
from 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