Skip to content

Commit 043ef5e

Browse files
authored
Create the @kbn/std package (#77329)
* move `src/core/utils` to the @kbn/std package * update README * update codeowners and add yarn lock file * remove export from src/core/public and src/core/server and use package import instead * update generated doc * adapt forgotten import * update `data` plugin doc
1 parent cdea019 commit 043ef5e

File tree

109 files changed

+138
-715
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+138
-715
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
/x-pack/plugins/cloud/ @elastic/kibana-platform
154154
/x-pack/test/saved_objects_field_count/ @elastic/kibana-platform
155155
/packages/kbn-config-schema/ @elastic/kibana-platform
156+
/packages/kbn-std/ @elastic/kibana-platform
156157
/src/legacy/server/config/ @elastic/kibana-platform
157158
/src/legacy/server/http/ @elastic/kibana-platform
158159
/src/legacy/server/logging/ @elastic/kibana-platform

docs/development/core/public/kibana-plugin-core-public.assertnever.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/development/core/public/kibana-plugin-core-public.deepfreeze.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/development/core/public/kibana-plugin-core-public.freezable.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/development/core/public/kibana-plugin-core-public.getflattenedobject.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/development/core/public/kibana-plugin-core-public.isrelativeurl.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/development/core/public/kibana-plugin-core-public.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
2727
| [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md) | Status of the application's navLink. |
2828
| [AppStatus](./kibana-plugin-core-public.appstatus.md) | Accessibility status of an application. |
2929

30-
## Functions
31-
32-
| Function | Description |
33-
| --- | --- |
34-
| [assertNever(x)](./kibana-plugin-core-public.assertnever.md) | Can be used in switch statements to ensure we perform exhaustive checks, see https://www.typescriptlang.org/docs/handbook/advanced-types.html\#exhaustiveness-checking |
35-
| [deepFreeze(object)](./kibana-plugin-core-public.deepfreeze.md) | Apply Object.freeze to a value recursively and convert the return type to Readonly variant recursively |
36-
| [getFlattenedObject(rootValue)](./kibana-plugin-core-public.getflattenedobject.md) | Flattens a deeply nested object to a map of dot-separated paths pointing to all primitive values \*\*and arrays\*\* from <code>rootValue</code>.<!-- -->example: getFlattenedObject(<!-- -->{ a: { b: 1, c: \[2,3\] } }<!-- -->) // =<!-- -->&gt; { 'a.b': 1, 'a.c': \[2,3\] } |
37-
| [isRelativeUrl(candidatePath)](./kibana-plugin-core-public.isrelativeurl.md) | Determine if a url is relative. Any url including a protocol, hostname, or port is not considered relative. This means that absolute \*paths\* are considered to be relative \*urls\* |
38-
| [modifyUrl(url, urlModifier)](./kibana-plugin-core-public.modifyurl.md) | Takes a URL and a function that takes the meaningful parts of the URL as a key-value object, modifies some or all of the parts, and returns the modified parts formatted again as a url.<!-- -->Url Parts sent: - protocol - slashes (does the url have the //) - auth - hostname (just the name of the host, no port or auth information) - port - pathname (the path after the hostname, no query or hash, starts with a slash if there was a path) - query (always an object, even when no query on original url) - hash<!-- -->Why? - The default url library in node produces several conflicting properties on the "parsed" output. Modifying any of these might lead to the modifications being ignored (depending on which property was modified) - It's not always clear whether to use path/pathname, host/hostname, so this tries to add helpful constraints |
39-
4030
## Interfaces
4131

4232
| Interface | Description |
@@ -128,7 +118,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
128118
| [ToastOptions](./kibana-plugin-core-public.toastoptions.md) | Options available for [IToasts](./kibana-plugin-core-public.itoasts.md) APIs. |
129119
| [UiSettingsParams](./kibana-plugin-core-public.uisettingsparams.md) | UiSettings parameters defined by the plugins. |
130120
| [UiSettingsState](./kibana-plugin-core-public.uisettingsstate.md) | |
131-
| [URLMeaningfulParts](./kibana-plugin-core-public.urlmeaningfulparts.md) | We define our own typings because the current version of @<!-- -->types/node declares properties to be optional "hostname?: string". Although, parse call returns "hostname: null \| string". |
132121
| [UserProvidedValues](./kibana-plugin-core-public.userprovidedvalues.md) | Describes the values explicitly set by user. |
133122

134123
## Variables
@@ -156,7 +145,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
156145
| [ChromeHelpExtensionMenuLink](./kibana-plugin-core-public.chromehelpextensionmenulink.md) | |
157146
| [ChromeNavLinkUpdateableFields](./kibana-plugin-core-public.chromenavlinkupdateablefields.md) | |
158147
| [FatalErrorsStart](./kibana-plugin-core-public.fatalerrorsstart.md) | FatalErrors stop the Kibana Public Core and displays a fatal error screen with details about the Kibana build and the error. |
159-
| [Freezable](./kibana-plugin-core-public.freezable.md) | |
160148
| [HandlerContextType](./kibana-plugin-core-public.handlercontexttype.md) | Extracts the type of the first argument of a [HandlerFunction](./kibana-plugin-core-public.handlerfunction.md) to represent the type of the context. |
161149
| [HandlerFunction](./kibana-plugin-core-public.handlerfunction.md) | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in [IContextContainer](./kibana-plugin-core-public.icontextcontainer.md) |
162150
| [HandlerParameters](./kibana-plugin-core-public.handlerparameters.md) | Extracts the types of the additional arguments of a [HandlerFunction](./kibana-plugin-core-public.handlerfunction.md)<!-- -->, excluding the [HandlerContextType](./kibana-plugin-core-public.handlercontexttype.md)<!-- -->. |

docs/development/core/public/kibana-plugin-core-public.modifyurl.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/development/core/public/kibana-plugin-core-public.urlmeaningfulparts.auth.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/development/core/public/kibana-plugin-core-public.urlmeaningfulparts.hash.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)