@databricks/appkit-ui 0.5.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +23 -1
- package/NOTICE.md +3 -1
- package/bin/appkit.js +0 -0
- package/dist/cli/commands/plugins-sync.js +369 -0
- package/dist/cli/commands/plugins-sync.js.map +1 -0
- package/dist/cli/commands/plugins.js +19 -0
- package/dist/cli/commands/plugins.js.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/react/charts/area/index.d.ts +2 -2
- package/dist/react/charts/bar/index.d.ts +2 -2
- package/dist/react/charts/base.d.ts +2 -2
- package/dist/react/charts/base.d.ts.map +1 -1
- package/dist/react/charts/create-chart.d.ts +2 -2
- package/dist/react/charts/create-chart.d.ts.map +1 -1
- package/dist/react/charts/heatmap/index.d.ts +2 -2
- package/dist/react/charts/line/index.d.ts +2 -2
- package/dist/react/charts/options.d.ts.map +1 -1
- package/dist/react/charts/pie/index.d.ts +3 -3
- package/dist/react/charts/radar/index.d.ts +2 -2
- package/dist/react/charts/scatter/index.d.ts +2 -2
- package/dist/react/charts/wrapper.d.ts +2 -2
- package/dist/react/charts/wrapper.d.ts.map +1 -1
- package/dist/react/table/data-table.d.ts +2 -2
- package/dist/react/table/data-table.d.ts.map +1 -1
- package/dist/react/ui/accordion.d.ts +5 -5
- package/dist/react/ui/accordion.d.ts.map +1 -1
- package/dist/react/ui/alert-dialog.d.ts +12 -12
- package/dist/react/ui/alert.d.ts +4 -4
- package/dist/react/ui/alert.d.ts.map +1 -1
- package/dist/react/ui/aspect-ratio.d.ts +2 -2
- package/dist/react/ui/avatar.d.ts +4 -4
- package/dist/react/ui/badge.d.ts +2 -2
- package/dist/react/ui/breadcrumb.d.ts +8 -8
- package/dist/react/ui/button-group.d.ts +4 -4
- package/dist/react/ui/button.d.ts +2 -2
- package/dist/react/ui/calendar.d.ts +3 -3
- package/dist/react/ui/card.d.ts +8 -8
- package/dist/react/ui/carousel.d.ts +6 -6
- package/dist/react/ui/chart.d.ts +5 -5
- package/dist/react/ui/checkbox.d.ts +2 -2
- package/dist/react/ui/collapsible.d.ts +4 -4
- package/dist/react/ui/command.d.ts +10 -10
- package/dist/react/ui/context-menu.d.ts +16 -16
- package/dist/react/ui/dialog.d.ts +11 -11
- package/dist/react/ui/drawer.d.ts +11 -11
- package/dist/react/ui/drawer.d.ts.map +1 -1
- package/dist/react/ui/dropdown-menu.d.ts +16 -16
- package/dist/react/ui/empty.d.ts +7 -7
- package/dist/react/ui/field.d.ts +11 -11
- package/dist/react/ui/form.d.ts +7 -7
- package/dist/react/ui/hover-card.d.ts +4 -4
- package/dist/react/ui/input-group.d.ts +7 -7
- package/dist/react/ui/input-otp.d.ts +5 -5
- package/dist/react/ui/input.d.ts +2 -2
- package/dist/react/ui/item.d.ts +11 -11
- package/dist/react/ui/kbd.d.ts +3 -3
- package/dist/react/ui/label.d.ts +2 -2
- package/dist/react/ui/menubar.d.ts +17 -17
- package/dist/react/ui/navigation-menu.d.ts +9 -9
- package/dist/react/ui/pagination.d.ts +8 -8
- package/dist/react/ui/popover.d.ts +5 -5
- package/dist/react/ui/progress.d.ts +2 -2
- package/dist/react/ui/radio-group.d.ts +3 -3
- package/dist/react/ui/resizable.d.ts +4 -4
- package/dist/react/ui/scroll-area.d.ts +3 -3
- package/dist/react/ui/select.d.ts +11 -11
- package/dist/react/ui/separator.d.ts +2 -2
- package/dist/react/ui/sheet.d.ts +9 -9
- package/dist/react/ui/sidebar.d.ts +24 -24
- package/dist/react/ui/skeleton.d.ts +2 -2
- package/dist/react/ui/slider.d.ts +2 -2
- package/dist/react/ui/sonner.d.ts +2 -2
- package/dist/react/ui/spinner.d.ts +2 -2
- package/dist/react/ui/switch.d.ts +2 -2
- package/dist/react/ui/table.d.ts +9 -9
- package/dist/react/ui/tabs.d.ts +5 -5
- package/dist/react/ui/textarea.d.ts +2 -2
- package/dist/react/ui/toggle-group.d.ts +3 -3
- package/dist/react/ui/toggle.d.ts +2 -2
- package/dist/react/ui/tooltip.d.ts +5 -5
- package/dist/react/ui/tooltip.d.ts.map +1 -1
- package/docs/docs/api/appkit/Class.AppKitError/index.html +5 -5
- package/docs/docs/api/appkit/Class.AuthenticationError/index.html +4 -4
- package/docs/docs/api/appkit/Class.ConfigurationError/index.html +4 -4
- package/docs/docs/api/appkit/Class.ConnectionError/index.html +4 -4
- package/docs/docs/api/appkit/Class.ExecutionError/index.html +4 -4
- package/docs/docs/api/appkit/Class.InitializationError/index.html +4 -4
- package/docs/docs/api/appkit/Class.Plugin/index.html +28 -16
- package/docs/docs/api/appkit/Class.Plugin.md +90 -30
- package/docs/docs/api/appkit/Class.ResourceRegistry/index.html +150 -0
- package/docs/docs/api/appkit/Class.ResourceRegistry.md +301 -0
- package/docs/docs/api/appkit/Class.ServerError/index.html +5 -5
- package/docs/docs/api/appkit/Class.TunnelError/index.html +4 -4
- package/docs/docs/api/appkit/Class.ValidationError/index.html +4 -4
- package/docs/docs/api/appkit/Enumeration.RequestedClaimsPermissionSet/index.html +21 -0
- package/docs/docs/api/appkit/Enumeration.RequestedClaimsPermissionSet.md +14 -0
- package/docs/docs/api/appkit/Enumeration.ResourceType/index.html +66 -0
- package/docs/docs/api/appkit/Enumeration.ResourceType.md +135 -0
- package/docs/docs/api/appkit/Function.appKitTypesPlugin/index.html +4 -4
- package/docs/docs/api/appkit/Function.createApp/index.html +5 -5
- package/docs/docs/api/appkit/Function.createLakebasePool/index.html +24 -0
- package/docs/docs/api/appkit/Function.createLakebasePool.md +20 -0
- package/docs/docs/api/appkit/Function.generateDatabaseCredential/index.html +30 -0
- package/docs/docs/api/appkit/Function.generateDatabaseCredential.md +57 -0
- package/docs/docs/api/appkit/Function.getExecutionContext/index.html +5 -5
- package/docs/docs/api/appkit/Function.getLakebaseOrmConfig/index.html +39 -0
- package/docs/docs/api/appkit/Function.getLakebaseOrmConfig.md +90 -0
- package/docs/docs/api/appkit/Function.getLakebasePgConfig/index.html +27 -0
- package/docs/docs/api/appkit/Function.getLakebasePgConfig.md +31 -0
- package/docs/docs/api/appkit/Function.getPluginManifest/index.html +26 -0
- package/docs/docs/api/appkit/Function.getPluginManifest.md +24 -0
- package/docs/docs/api/appkit/Function.getResourceRequirements/index.html +28 -0
- package/docs/docs/api/appkit/Function.getResourceRequirements.md +42 -0
- package/docs/docs/api/appkit/Function.getWorkspaceClient/index.html +22 -0
- package/docs/docs/api/appkit/Function.getWorkspaceClient.md +18 -0
- package/docs/docs/api/appkit/Function.isSQLTypeMarker/index.html +5 -5
- package/docs/docs/api/appkit/Interface.BasePluginConfig/index.html +4 -4
- package/docs/docs/api/appkit/Interface.CacheConfig/index.html +5 -5
- package/docs/docs/api/appkit/Interface.DatabaseCredential/index.html +28 -0
- package/docs/docs/api/appkit/Interface.DatabaseCredential.md +32 -0
- package/docs/docs/api/appkit/Interface.GenerateDatabaseCredentialRequest/index.html +38 -0
- package/docs/docs/api/appkit/Interface.GenerateDatabaseCredentialRequest.md +54 -0
- package/docs/docs/api/appkit/Interface.ITelemetry/index.html +5 -5
- package/docs/docs/api/appkit/Interface.LakebasePoolConfig/index.html +79 -0
- package/docs/docs/api/appkit/Interface.LakebasePoolConfig.md +126 -0
- package/docs/docs/api/appkit/Interface.PluginManifest/index.html +63 -0
- package/docs/docs/api/appkit/Interface.PluginManifest.md +135 -0
- package/docs/docs/api/appkit/Interface.RequestedClaims/index.html +26 -0
- package/docs/docs/api/appkit/Interface.RequestedClaims.md +25 -0
- package/docs/docs/api/appkit/Interface.RequestedResource/index.html +27 -0
- package/docs/docs/api/appkit/Interface.RequestedResource.md +32 -0
- package/docs/docs/api/appkit/Interface.ResourceEntry/index.html +83 -0
- package/docs/docs/api/appkit/Interface.ResourceEntry.md +156 -0
- package/docs/docs/api/appkit/Interface.ResourceFieldEntry/index.html +26 -0
- package/docs/docs/api/appkit/Interface.ResourceFieldEntry.md +25 -0
- package/docs/docs/api/appkit/Interface.ResourceRequirement/index.html +51 -0
- package/docs/docs/api/appkit/Interface.ResourceRequirement.md +84 -0
- package/docs/docs/api/appkit/Interface.StreamExecutionSettings/index.html +5 -5
- package/docs/docs/api/appkit/Interface.TelemetryConfig/index.html +5 -5
- package/docs/docs/api/appkit/Interface.ValidationResult/index.html +29 -0
- package/docs/docs/api/appkit/Interface.ValidationResult.md +36 -0
- package/docs/docs/api/appkit/TypeAlias.ConfigSchema/index.html +21 -0
- package/docs/docs/api/appkit/TypeAlias.ConfigSchema.md +12 -0
- package/docs/docs/api/appkit/TypeAlias.IAppRouter/index.html +5 -5
- package/docs/docs/api/appkit/TypeAlias.ResourcePermission/index.html +18 -0
- package/docs/docs/api/appkit/TypeAlias.ResourcePermission.md +20 -0
- package/docs/docs/api/appkit/Variable.sql/index.html +5 -5
- package/docs/docs/api/appkit/index.html +10 -8
- package/docs/docs/api/appkit-ui/data/AreaChart/index.html +3 -3
- package/docs/docs/api/appkit-ui/data/BarChart/index.html +3 -3
- package/docs/docs/api/appkit-ui/data/DataTable/index.html +3 -3
- package/docs/docs/api/appkit-ui/data/DonutChart/index.html +3 -3
- package/docs/docs/api/appkit-ui/data/HeatmapChart/index.html +3 -3
- package/docs/docs/api/appkit-ui/data/LineChart/index.html +3 -3
- package/docs/docs/api/appkit-ui/data/PieChart/index.html +3 -3
- package/docs/docs/api/appkit-ui/data/RadarChart/index.html +3 -3
- package/docs/docs/api/appkit-ui/data/ScatterChart/index.html +3 -3
- package/docs/docs/api/appkit-ui/index.html +3 -3
- package/docs/docs/api/appkit-ui/styling/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Accordion/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Alert/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/AlertDialog/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/AspectRatio/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Avatar/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Badge/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Breadcrumb/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Button/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/ButtonGroup/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Calendar/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Card/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Carousel/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/ChartContainer/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Checkbox/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Collapsible/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Command/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/ContextMenu/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Dialog/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Drawer/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/DropdownMenu/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Empty/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Field/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/FormControl/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/HoverCard/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Input/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/InputGroup/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/InputOTP/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Item/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Kbd/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Label/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Menubar/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/NavigationMenu/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Pagination/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Popover/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Progress/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/RadioGroup/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/ResizableHandle/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/ScrollArea/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Select/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Separator/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Sheet/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Sidebar/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Skeleton/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Slider/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Spinner/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Switch/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Table/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Tabs/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Textarea/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Toaster/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Toggle/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/ToggleGroup/index.html +3 -3
- package/docs/docs/api/appkit-ui/ui/Tooltip/index.html +3 -3
- package/docs/docs/api/appkit.md +55 -28
- package/docs/docs/api/index.html +3 -3
- package/docs/docs/app-management/index.html +3 -3
- package/docs/docs/architecture/index.html +4 -4
- package/docs/docs/architecture.md +1 -1
- package/docs/docs/category/development/index.html +3 -3
- package/docs/docs/configuration/index.html +3 -3
- package/docs/docs/core-principles/index.html +3 -3
- package/docs/docs/development/ai-assisted-development/index.html +3 -3
- package/docs/docs/development/index.html +3 -3
- package/docs/docs/development/llm-guide/index.html +3 -3
- package/docs/docs/development/local-development/index.html +3 -3
- package/docs/docs/development/project-setup/index.html +3 -3
- package/docs/docs/development/remote-bridge/index.html +3 -3
- package/docs/docs/development/type-generation/index.html +3 -3
- package/docs/docs/index.html +3 -3
- package/docs/docs/plugins/index.html +18 -8
- package/docs/docs/plugins.md +82 -4
- package/llms.txt +23 -1
- package/package.json +3 -1
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-api/appkit/Class.ResourceRegistry" data-has-hydrated="false">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="generator" content="Docusaurus v3.9.2">
|
|
6
|
+
<title data-rh="true">Class: ResourceRegistry | AppKit</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://databricks.github.io/appkit/docs/api/appkit/Class.ResourceRegistry"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="keywords" content="Databricks Apps, Node.js, React.js, SDK, TypeScript, SQL, Databricks, AI, full-stack, development"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Class: ResourceRegistry | AppKit"><meta data-rh="true" name="description" content="Central registry for tracking plugin resource requirements."><meta data-rh="true" property="og:description" content="Central registry for tracking plugin resource requirements."><link data-rh="true" rel="icon" href="/appkit/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://databricks.github.io/appkit/docs/api/appkit/Class.ResourceRegistry"><link data-rh="true" rel="alternate" href="https://databricks.github.io/appkit/docs/api/appkit/Class.ResourceRegistry" hreflang="en"><link data-rh="true" rel="alternate" href="https://databricks.github.io/appkit/docs/api/appkit/Class.ResourceRegistry" hreflang="x-default"><script data-rh="true" type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"API reference","item":"https://databricks.github.io/appkit/docs/api/"},{"@type":"ListItem","position":2,"name":"@databricks/appkit","item":"https://databricks.github.io/appkit/docs/api/appkit/"},{"@type":"ListItem","position":3,"name":"ResourceRegistry","item":"https://databricks.github.io/appkit/docs/api/appkit/Class.ResourceRegistry"}]}</script><link rel="stylesheet" href="/appkit/assets/css/styles.36a38b99.css">
|
|
7
|
+
<script src="/appkit/assets/js/runtime~main.f408c44d.js" defer="defer"></script>
|
|
8
|
+
<script src="/appkit/assets/js/main.64404990.js" defer="defer"></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body class="navigation-with-keyboard">
|
|
11
|
+
<svg style="display: none;"><defs>
|
|
12
|
+
<symbol id="theme-svg-external-link" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
|
|
13
|
+
</defs></svg>
|
|
14
|
+
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{const n=new URLSearchParams(window.location.search).entries();for(var[t,e]of n)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss")}catch(t){}return!1}())</script><div id="__docusaurus"><link rel="preload" as="image" href="/appkit/img/logo.png"><div role="region" aria-label="Skip to main content"><a class="skipToContent_R3I2" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><div class="theme-announcement-bar announcementBar_Upl7" style="background-color:#f0f0f0;color:#000000" role="banner"><div class="announcementBarPlaceholder_Lvio"></div><div class="content_vq0X announcementBarContent_FIMQ">⚠️ AppKit is in an early development phase and is subject to change without notice. <strong>DO NOT</strong> use in production environments.</div><button type="button" aria-label="Close" class="clean-btn close closeButton_J8WU announcementBarClose_jD94"><svg viewBox="0 0 15 15" width="14" height="14"><g stroke="currentColor" stroke-width="3.1"><path d="M.75.75l13.5 13.5M14.25.75L.75 14.25"></path></g></svg></button></div><nav aria-label="Main" class="theme-layout-navbar navbar navbar--fixed-top"><div class="navbar__inner"><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/appkit/"><div class="navbar__logo"><img src="/appkit/img/logo.png" alt="AppKit" class="themedComponent_hkXO themedComponent--light_BgK8"><img src="/appkit/img/logo.png" alt="AppKit" class="themedComponent_hkXO themedComponent--dark_RKPt"></div><b class="navbar__title text--truncate">AppKit</b></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/appkit/docs/">Documentation</a><a class="navbar__item navbar__link" href="/appkit/contributing">Contributing</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href="https://github.com/databricks/appkit" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-label="(opens in new tab)" class="iconExternalLink_miaU"><use href="#theme-svg-external-link"></use></svg></a><div class="toggle_eFYw colorModeToggle_EPbi"><button class="clean-btn toggleButton_HRKp toggleButtonDisabled_bICu" type="button" disabled="" title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_brDO lightToggleIcon_vxPA"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_brDO darkToggleIcon_PZNO"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_brDO systemToggleIcon_A7x6"><path fill="currentColor" d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"></path></svg></button></div><div class="navbarSearchContainer_cVhq"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input id="search_input_react" type="search" placeholder="Loading..." aria-label="Search" class="navbar__search-input search-bar" disabled=""></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="theme-layout-main main-wrapper mainWrapper__Y_W"><div class="docsWrapper_cIfN"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_xQFv" type="button"></button><div class="docRoot_FHtD"><aside class="theme-doc-sidebar-container docSidebarContainer_dvCd"><div class="sidebarViewport_GeRf"><div class="sidebar_T8N1"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_uyE9 menuWithAnnouncementBar_Bucd"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/appkit/docs/"><span title="Getting started" class="linkLabel_hZzm">Getting started</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/appkit/docs/app-management"><span title="App management" class="linkLabel_hZzm">App management</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/appkit/docs/plugins"><span title="Plugins" class="linkLabel_hZzm">Plugins</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/appkit/docs/architecture"><span title="Architecture" class="linkLabel_hZzm">Architecture</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/appkit/docs/configuration"><span title="Configuration" class="linkLabel_hZzm">Configuration</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="categoryLink_P6CU menu__link menu__link--sublist" href="/appkit/docs/category/development"><span title="Development" class="categoryLinkLabel_ShmP">Development</span></a><button aria-label="Collapse sidebar category 'Development'" aria-expanded="true" type="button" class="clean-btn menu__caret"></button></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/appkit/docs/development/local-development"><span title="Local development" class="linkLabel_hZzm">Local development</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/appkit/docs/development/ai-assisted-development"><span title="AI-Assisted development" class="linkLabel_hZzm">AI-Assisted development</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/appkit/docs/development/"><span title="Development" class="linkLabel_hZzm">Development</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/appkit/docs/development/remote-bridge"><span title="Remote Bridge" class="linkLabel_hZzm">Remote Bridge</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/appkit/docs/development/project-setup"><span title="Project setup" class="linkLabel_hZzm">Project setup</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/appkit/docs/development/type-generation"><span title="Type generation" class="linkLabel_hZzm">Type generation</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/appkit/docs/development/llm-guide"><span title="LLM Guide" class="linkLabel_hZzm">LLM Guide</span></a></li></ul></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/appkit/docs/core-principles"><span title="Core principles" class="linkLabel_hZzm">Core principles</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="categoryLink_P6CU menu__link menu__link--sublist menu__link--active" href="/appkit/docs/api/"><span title="API reference" class="categoryLinkLabel_ShmP">API reference</span></a><button aria-label="Collapse sidebar category 'API reference'" aria-expanded="true" type="button" class="clean-btn menu__caret"></button></div><ul class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="categoryLink_P6CU menu__link menu__link--sublist menu__link--active" tabindex="0" href="/appkit/docs/api/appkit/"><span title="@databricks/appkit" class="categoryLinkLabel_ShmP">@databricks/appkit</span></a><button aria-label="Collapse sidebar category '@databricks/appkit'" aria-expanded="true" type="button" class="clean-btn menu__caret"></button></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-enumeration"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Enumeration.RequestedClaimsPermissionSet"><span title="RequestedClaimsPermissionSet" class="linkLabel_hZzm">RequestedClaimsPermissionSet</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-enumeration"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Enumeration.ResourceType"><span title="ResourceType" class="linkLabel_hZzm">ResourceType</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.AppKitError"><span title="AppKitError" class="linkLabel_hZzm">AppKitError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.AuthenticationError"><span title="AuthenticationError" class="linkLabel_hZzm">AuthenticationError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.ConfigurationError"><span title="ConfigurationError" class="linkLabel_hZzm">ConfigurationError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.ConnectionError"><span title="ConnectionError" class="linkLabel_hZzm">ConnectionError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.ExecutionError"><span title="ExecutionError" class="linkLabel_hZzm">ExecutionError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.InitializationError"><span title="InitializationError" class="linkLabel_hZzm">InitializationError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.Plugin"><span title="Plugin" class="linkLabel_hZzm">Plugin</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/appkit/docs/api/appkit/Class.ResourceRegistry"><span title="ResourceRegistry" class="linkLabel_hZzm">ResourceRegistry</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.ServerError"><span title="ServerError" class="linkLabel_hZzm">ServerError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.TunnelError"><span title="TunnelError" class="linkLabel_hZzm">TunnelError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-class"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Class.ValidationError"><span title="ValidationError" class="linkLabel_hZzm">ValidationError</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.BasePluginConfig"><span title="BasePluginConfig" class="linkLabel_hZzm">BasePluginConfig</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.CacheConfig"><span title="CacheConfig" class="linkLabel_hZzm">CacheConfig</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.DatabaseCredential"><span title="DatabaseCredential" class="linkLabel_hZzm">DatabaseCredential</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.GenerateDatabaseCredentialRequest"><span title="GenerateDatabaseCredentialRequest" class="linkLabel_hZzm">GenerateDatabaseCredentialRequest</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.ITelemetry"><span title="ITelemetry" class="linkLabel_hZzm">ITelemetry</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.LakebasePoolConfig"><span title="LakebasePoolConfig" class="linkLabel_hZzm">LakebasePoolConfig</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.PluginManifest"><span title="PluginManifest" class="linkLabel_hZzm">PluginManifest</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.RequestedClaims"><span title="RequestedClaims" class="linkLabel_hZzm">RequestedClaims</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.RequestedResource"><span title="RequestedResource" class="linkLabel_hZzm">RequestedResource</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.ResourceEntry"><span title="ResourceEntry" class="linkLabel_hZzm">ResourceEntry</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.ResourceFieldEntry"><span title="ResourceFieldEntry" class="linkLabel_hZzm">ResourceFieldEntry</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.ResourceRequirement"><span title="ResourceRequirement" class="linkLabel_hZzm">ResourceRequirement</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.StreamExecutionSettings"><span title="StreamExecutionSettings" class="linkLabel_hZzm">StreamExecutionSettings</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.TelemetryConfig"><span title="TelemetryConfig" class="linkLabel_hZzm">TelemetryConfig</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-interface"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Interface.ValidationResult"><span title="ValidationResult" class="linkLabel_hZzm">ValidationResult</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-typealias"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/TypeAlias.ConfigSchema"><span title="ConfigSchema" class="linkLabel_hZzm">ConfigSchema</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-typealias"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/TypeAlias.IAppRouter"><span title="IAppRouter" class="linkLabel_hZzm">IAppRouter</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-typealias"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/TypeAlias.ResourcePermission"><span title="ResourcePermission" class="linkLabel_hZzm">ResourcePermission</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-variable"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Variable.sql"><span title="sql" class="linkLabel_hZzm">sql</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.appKitTypesPlugin"><span title="appKitTypesPlugin" class="linkLabel_hZzm">appKitTypesPlugin</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.createApp"><span title="createApp" class="linkLabel_hZzm">createApp</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.createLakebasePool"><span title="createLakebasePool" class="linkLabel_hZzm">createLakebasePool</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.generateDatabaseCredential"><span title="generateDatabaseCredential" class="linkLabel_hZzm">generateDatabaseCredential</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.getExecutionContext"><span title="getExecutionContext" class="linkLabel_hZzm">getExecutionContext</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.getLakebaseOrmConfig"><span title="getLakebaseOrmConfig" class="linkLabel_hZzm">getLakebaseOrmConfig</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.getLakebasePgConfig"><span title="getLakebasePgConfig" class="linkLabel_hZzm">getLakebasePgConfig</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.getPluginManifest"><span title="getPluginManifest" class="linkLabel_hZzm">getPluginManifest</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.getResourceRequirements"><span title="getResourceRequirements" class="linkLabel_hZzm">getResourceRequirements</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.getWorkspaceClient"><span title="getWorkspaceClient" class="linkLabel_hZzm">getWorkspaceClient</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item api-kind-function"><a class="menu__link" tabindex="0" href="/appkit/docs/api/appkit/Function.isSQLTypeMarker"><span title="isSQLTypeMarker" class="linkLabel_hZzm">isSQLTypeMarker</span></a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_P6CU menu__link menu__link--sublist" tabindex="0" href="/appkit/docs/api/appkit-ui/"><span title="@databricks/appkit-ui" class="categoryLinkLabel_ShmP">@databricks/appkit-ui</span></a><button aria-label="Expand sidebar category '@databricks/appkit-ui'" aria-expanded="false" type="button" class="clean-btn menu__caret"></button></div></li></ul></li></ul></nav></div></div></aside><main class="docMainContainer_P5br"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_poBZ"><div class="docItemContainer_TdBg"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_bEIa" aria-label="Breadcrumbs"><ul class="breadcrumbs"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/appkit/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_sma7"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><a class="breadcrumbs__link" href="/appkit/docs/api/"><span>API reference</span></a></li><li class="breadcrumbs__item"><a class="breadcrumbs__link" href="/appkit/docs/api/appkit/"><span>@databricks/appkit</span></a></li><li class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link">ResourceRegistry</span></li></ul></nav><div class="tocCollapsible_gJxE theme-doc-toc-mobile tocMobile_ZHYV"><button type="button" class="clean-btn tocCollapsibleButton_uxuR">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Class: ResourceRegistry</h1></header>
|
|
15
|
+
<p>Central registry for tracking plugin resource requirements.
|
|
16
|
+
Deduplication uses type + resourceKey (machine-stable); alias is for display only.</p>
|
|
17
|
+
<h2 class="anchor anchorTargetStickyNavbar_scV4" id="constructors">Constructors<a href="#constructors" class="hash-link" aria-label="Direct link to Constructors" title="Direct link to Constructors" translate="no"></a></h2>
|
|
18
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="constructor">Constructor<a href="#constructor" class="hash-link" aria-label="Direct link to Constructor" title="Direct link to Constructor" translate="no"></a></h3>
|
|
19
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token keyword" style="color:rgb(0, 0, 255)">new</span><span class="token plain"> </span><span class="token class-name" style="color:rgb(38, 127, 153)">ResourceRegistry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceRegistry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
20
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns">Returns<a href="#returns" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
21
|
+
<p><code>ResourceRegistry</code></p>
|
|
22
|
+
<h2 class="anchor anchorTargetStickyNavbar_scV4" id="methods">Methods<a href="#methods" class="hash-link" aria-label="Direct link to Methods" title="Direct link to Methods" translate="no"></a></h2>
|
|
23
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="clear">clear()<a href="#clear" class="hash-link" aria-label="Direct link to clear()" title="Direct link to clear()" translate="no"></a></h3>
|
|
24
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">clear</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(0, 0, 255)">void</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
25
|
+
<p>Clears all registered resources.
|
|
26
|
+
Useful for testing or when rebuilding the registry.</p>
|
|
27
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-1">Returns<a href="#returns-1" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
28
|
+
<p><code>void</code></p>
|
|
29
|
+
<hr>
|
|
30
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="collectresources">collectResources()<a href="#collectresources" class="hash-link" aria-label="Direct link to collectResources()" title="Direct link to collectResources()" translate="no"></a></h3>
|
|
31
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">collectResources</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">rawPlugins</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> PluginData</span><span class="token operator" style="color:rgb(0, 0, 0)"><</span><span class="token plain">PluginConstructor</span><span class="token punctuation" style="color:rgb(4, 81, 165)">,</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">unknown</span><span class="token punctuation" style="color:rgb(4, 81, 165)">,</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">string</span><span class="token operator" style="color:rgb(0, 0, 0)">></span><span class="token punctuation" style="color:rgb(4, 81, 165)">[</span><span class="token punctuation" style="color:rgb(4, 81, 165)">]</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(0, 0, 255)">void</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
32
|
+
<p>Collects and registers resource requirements from an array of plugins.
|
|
33
|
+
For each plugin, loads its manifest (required) and runtime resource requirements.</p>
|
|
34
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="parameters">Parameters<a href="#parameters" class="hash-link" aria-label="Direct link to Parameters" title="Direct link to Parameters" translate="no"></a></h4>
|
|
35
|
+
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>rawPlugins</code></td><td><code>PluginData</code><<code>PluginConstructor</code>, <code>unknown</code>, <code>string</code>>[]</td><td>Array of plugin data entries from createApp configuration</td></tr></tbody></table>
|
|
36
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-2">Returns<a href="#returns-2" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
37
|
+
<p><code>void</code></p>
|
|
38
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="throws">Throws<a href="#throws" class="hash-link" aria-label="Direct link to Throws" title="Direct link to Throws" translate="no"></a></h4>
|
|
39
|
+
<p>If any plugin is missing a manifest or manifest is invalid</p>
|
|
40
|
+
<hr>
|
|
41
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="enforcevalidation">enforceValidation()<a href="#enforcevalidation" class="hash-link" aria-label="Direct link to enforceValidation()" title="Direct link to enforceValidation()" translate="no"></a></h3>
|
|
42
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">enforceValidation</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ValidationResult</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
43
|
+
<p>Validates all registered resources and enforces the result.</p>
|
|
44
|
+
<ul>
|
|
45
|
+
<li class="">In production: throws a <a class="" href="/appkit/docs/api/appkit/Class.ConfigurationError">ConfigurationError</a> if any required resources are missing.</li>
|
|
46
|
+
<li class="">In development (<code>NODE_ENV=development</code>): logs a warning but continues, unless
|
|
47
|
+
<code>APPKIT_STRICT_VALIDATION=true</code> is set, in which case throws like production.</li>
|
|
48
|
+
<li class="">When all resources are valid: logs a debug message with the count.</li>
|
|
49
|
+
</ul>
|
|
50
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-3">Returns<a href="#returns-3" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
51
|
+
<p><a class="" href="/appkit/docs/api/appkit/Interface.ValidationResult"><code>ValidationResult</code></a></p>
|
|
52
|
+
<p>ValidationResult with validity status, missing resources, and all resources</p>
|
|
53
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="throws-1">Throws<a href="#throws-1" class="hash-link" aria-label="Direct link to Throws" title="Direct link to Throws" translate="no"></a></h4>
|
|
54
|
+
<p>In production when required resources are missing, or in dev when APPKIT_STRICT_VALIDATION=true</p>
|
|
55
|
+
<hr>
|
|
56
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="get">get()<a href="#get" class="hash-link" aria-label="Direct link to get()" title="Direct link to get()" translate="no"></a></h3>
|
|
57
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">get</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">type</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">string</span><span class="token punctuation" style="color:rgb(4, 81, 165)">,</span><span class="token plain"> resourceKey</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">string</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceEntry </span><span class="token operator" style="color:rgb(0, 0, 0)">|</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(0, 0, 255)">undefined</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
58
|
+
<p>Gets a specific resource by type and resourceKey (dedup key).</p>
|
|
59
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="parameters-1">Parameters<a href="#parameters-1" class="hash-link" aria-label="Direct link to Parameters" title="Direct link to Parameters" translate="no"></a></h4>
|
|
60
|
+
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>string</code></td><td>Resource type</td></tr><tr><td><code>resourceKey</code></td><td><code>string</code></td><td>Stable machine key (not alias; alias is for display only)</td></tr></tbody></table>
|
|
61
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-4">Returns<a href="#returns-4" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
62
|
+
<p><a class="" href="/appkit/docs/api/appkit/Interface.ResourceEntry"><code>ResourceEntry</code></a> | <code>undefined</code></p>
|
|
63
|
+
<p>The resource entry if found, undefined otherwise</p>
|
|
64
|
+
<hr>
|
|
65
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="getall">getAll()<a href="#getall" class="hash-link" aria-label="Direct link to getAll()" title="Direct link to getAll()" translate="no"></a></h3>
|
|
66
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">getAll</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceEntry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">[</span><span class="token punctuation" style="color:rgb(4, 81, 165)">]</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
67
|
+
<p>Retrieves all registered resources.
|
|
68
|
+
Returns a copy of the array to prevent external mutations.</p>
|
|
69
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-5">Returns<a href="#returns-5" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
70
|
+
<p><a class="" href="/appkit/docs/api/appkit/Interface.ResourceEntry"><code>ResourceEntry</code></a>[]</p>
|
|
71
|
+
<p>Array of all registered resource entries</p>
|
|
72
|
+
<hr>
|
|
73
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="getbyplugin">getByPlugin()<a href="#getbyplugin" class="hash-link" aria-label="Direct link to getByPlugin()" title="Direct link to getByPlugin()" translate="no"></a></h3>
|
|
74
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">getByPlugin</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">pluginName</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">string</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceEntry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">[</span><span class="token punctuation" style="color:rgb(4, 81, 165)">]</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
75
|
+
<p>Gets all resources required by a specific plugin.</p>
|
|
76
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="parameters-2">Parameters<a href="#parameters-2" class="hash-link" aria-label="Direct link to Parameters" title="Direct link to Parameters" translate="no"></a></h4>
|
|
77
|
+
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>pluginName</code></td><td><code>string</code></td><td>Name of the plugin</td></tr></tbody></table>
|
|
78
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-6">Returns<a href="#returns-6" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
79
|
+
<p><a class="" href="/appkit/docs/api/appkit/Interface.ResourceEntry"><code>ResourceEntry</code></a>[]</p>
|
|
80
|
+
<p>Array of resources where the plugin is listed as a requester</p>
|
|
81
|
+
<hr>
|
|
82
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="getoptional">getOptional()<a href="#getoptional" class="hash-link" aria-label="Direct link to getOptional()" title="Direct link to getOptional()" translate="no"></a></h3>
|
|
83
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">getOptional</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceEntry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">[</span><span class="token punctuation" style="color:rgb(4, 81, 165)">]</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
84
|
+
<p>Gets all optional resources (where required=false).</p>
|
|
85
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-7">Returns<a href="#returns-7" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
86
|
+
<p><a class="" href="/appkit/docs/api/appkit/Interface.ResourceEntry"><code>ResourceEntry</code></a>[]</p>
|
|
87
|
+
<p>Array of optional resource entries</p>
|
|
88
|
+
<hr>
|
|
89
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="getrequired">getRequired()<a href="#getrequired" class="hash-link" aria-label="Direct link to getRequired()" title="Direct link to getRequired()" translate="no"></a></h3>
|
|
90
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">getRequired</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceEntry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">[</span><span class="token punctuation" style="color:rgb(4, 81, 165)">]</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
91
|
+
<p>Gets all required resources (where required=true).</p>
|
|
92
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-8">Returns<a href="#returns-8" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
93
|
+
<p><a class="" href="/appkit/docs/api/appkit/Interface.ResourceEntry"><code>ResourceEntry</code></a>[]</p>
|
|
94
|
+
<p>Array of required resource entries</p>
|
|
95
|
+
<hr>
|
|
96
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="register">register()<a href="#register" class="hash-link" aria-label="Direct link to register()" title="Direct link to register()" translate="no"></a></h3>
|
|
97
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">register</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">plugin</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">string</span><span class="token punctuation" style="color:rgb(4, 81, 165)">,</span><span class="token plain"> resource</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceRequirement</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(0, 0, 255)">void</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
98
|
+
<p>Registers a resource requirement for a plugin.
|
|
99
|
+
If a resource with the same type+resourceKey already exists, merges them:</p>
|
|
100
|
+
<ul>
|
|
101
|
+
<li class="">Combines plugin names (comma-separated)</li>
|
|
102
|
+
<li class="">Uses the most permissive permission (per-type hierarchy)</li>
|
|
103
|
+
<li class="">Marks as required if any plugin requires it</li>
|
|
104
|
+
<li class="">Combines descriptions if they differ</li>
|
|
105
|
+
<li class="">Merges fields; warns when same field name uses different env vars</li>
|
|
106
|
+
</ul>
|
|
107
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="parameters-3">Parameters<a href="#parameters-3" class="hash-link" aria-label="Direct link to Parameters" title="Direct link to Parameters" translate="no"></a></h4>
|
|
108
|
+
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>plugin</code></td><td><code>string</code></td><td>Name of the plugin registering the resource</td></tr><tr><td><code>resource</code></td><td><a class="" href="/appkit/docs/api/appkit/Interface.ResourceRequirement"><code>ResourceRequirement</code></a></td><td>Resource requirement specification</td></tr></tbody></table>
|
|
109
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-9">Returns<a href="#returns-9" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
110
|
+
<p><code>void</code></p>
|
|
111
|
+
<hr>
|
|
112
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="size">size()<a href="#size" class="hash-link" aria-label="Direct link to size()" title="Direct link to size()" translate="no"></a></h3>
|
|
113
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">size</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">number</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
114
|
+
<p>Returns the number of registered resources.</p>
|
|
115
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-10">Returns<a href="#returns-10" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
116
|
+
<p><code>number</code></p>
|
|
117
|
+
<hr>
|
|
118
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="validate">validate()<a href="#validate" class="hash-link" aria-label="Direct link to validate()" title="Direct link to validate()" translate="no"></a></h3>
|
|
119
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token function" style="color:rgb(0, 0, 255)">validate</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ValidationResult</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
120
|
+
<p>Validates all registered resources against the environment.</p>
|
|
121
|
+
<p>Checks each resource's field environment variables to determine if it's resolved.
|
|
122
|
+
Updates the <code>resolved</code> and <code>values</code> fields on each resource entry.</p>
|
|
123
|
+
<p>Only required resources affect the <code>valid</code> status - optional resources
|
|
124
|
+
are checked but don't cause validation failure.</p>
|
|
125
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-11">Returns<a href="#returns-11" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
126
|
+
<p><a class="" href="/appkit/docs/api/appkit/Interface.ValidationResult"><code>ValidationResult</code></a></p>
|
|
127
|
+
<p>ValidationResult with validity status, missing resources, and all resources</p>
|
|
128
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="example">Example<a href="#example" class="hash-link" aria-label="Direct link to Example" title="Direct link to Example" translate="no"></a></h4>
|
|
129
|
+
<div class="language-typescript codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-typescript codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token keyword" style="color:rgb(0, 0, 255)">const</span><span class="token plain"> registry </span><span class="token operator" style="color:rgb(0, 0, 0)">=</span><span class="token plain"> ResourceRegistry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token function" style="color:rgb(0, 0, 255)">getInstance</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#000000"><span class="token plain"></span><span class="token keyword" style="color:rgb(0, 0, 255)">const</span><span class="token plain"> result </span><span class="token operator" style="color:rgb(0, 0, 0)">=</span><span class="token plain"> registry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token function" style="color:rgb(0, 0, 255)">validate</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#000000"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#000000"><span class="token plain"></span><span class="token keyword" style="color:rgb(0, 0, 255)">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token operator" style="color:rgb(0, 0, 0)">!</span><span class="token plain">result</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token plain">valid</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(4, 81, 165)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#000000"><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">console</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token function" style="color:rgb(0, 0, 255)">error</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token string" style="color:rgb(163, 21, 21)">"Missing resources:"</span><span class="token punctuation" style="color:rgb(4, 81, 165)">,</span><span class="token plain"> result</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token plain">missing</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token function" style="color:rgb(0, 0, 255)">map</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">r </span><span class="token operator" style="color:rgb(0, 0, 0)">=></span><span class="token plain"> Object</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token function" style="color:rgb(0, 0, 255)">values</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">r</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token plain">fields</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token function" style="color:rgb(0, 0, 255)">map</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">f </span><span class="token operator" style="color:rgb(0, 0, 0)">=></span><span class="token plain"> f</span><span class="token punctuation" style="color:rgb(4, 81, 165)">.</span><span class="token plain">env</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#000000"><span class="token plain"></span><span class="token punctuation" style="color:rgb(4, 81, 165)">}</span><br></span></code></pre></div></div>
|
|
130
|
+
<hr>
|
|
131
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="formatdevwarningbanner">formatDevWarningBanner()<a href="#formatdevwarningbanner" class="hash-link" aria-label="Direct link to formatDevWarningBanner()" title="Direct link to formatDevWarningBanner()" translate="no"></a></h3>
|
|
132
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token keyword" style="color:rgb(0, 0, 255)">static</span><span class="token plain"> </span><span class="token function" style="color:rgb(0, 0, 255)">formatDevWarningBanner</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">missing</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceEntry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">[</span><span class="token punctuation" style="color:rgb(4, 81, 165)">]</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">string</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
133
|
+
<p>Formats a highly visible warning banner for dev-mode missing resources.
|
|
134
|
+
Uses box drawing to ensure the message is impossible to miss in scrolling logs.</p>
|
|
135
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="parameters-4">Parameters<a href="#parameters-4" class="hash-link" aria-label="Direct link to Parameters" title="Direct link to Parameters" translate="no"></a></h4>
|
|
136
|
+
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>missing</code></td><td><a class="" href="/appkit/docs/api/appkit/Interface.ResourceEntry"><code>ResourceEntry</code></a>[]</td><td>Array of missing resource entries</td></tr></tbody></table>
|
|
137
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-12">Returns<a href="#returns-12" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
138
|
+
<p><code>string</code></p>
|
|
139
|
+
<p>Formatted banner string</p>
|
|
140
|
+
<hr>
|
|
141
|
+
<h3 class="anchor anchorTargetStickyNavbar_scV4" id="formatmissingresources">formatMissingResources()<a href="#formatmissingresources" class="hash-link" aria-label="Direct link to formatMissingResources()" title="Direct link to formatMissingResources()" translate="no"></a></h3>
|
|
142
|
+
<div class="language-ts codeBlockContainer_crgn theme-code-block" style="--prism-color:#000000;--prism-background-color:#ffffff"><div class="codeBlockContent__42J"><pre tabindex="0" class="prism-code language-ts codeBlock_CnLD thin-scrollbar" style="color:#000000;background-color:#ffffff"><code class="codeBlockLines_sJEA"><span class="token-line" style="color:#000000"><span class="token keyword" style="color:rgb(0, 0, 255)">static</span><span class="token plain"> </span><span class="token function" style="color:rgb(0, 0, 255)">formatMissingResources</span><span class="token punctuation" style="color:rgb(4, 81, 165)">(</span><span class="token plain">missing</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> ResourceEntry</span><span class="token punctuation" style="color:rgb(4, 81, 165)">[</span><span class="token punctuation" style="color:rgb(4, 81, 165)">]</span><span class="token punctuation" style="color:rgb(4, 81, 165)">)</span><span class="token operator" style="color:rgb(0, 0, 0)">:</span><span class="token plain"> </span><span class="token builtin" style="color:rgb(0, 112, 193)">string</span><span class="token punctuation" style="color:rgb(4, 81, 165)">;</span><br></span></code></pre></div></div>
|
|
143
|
+
<p>Formats missing resources into a human-readable error message.</p>
|
|
144
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="parameters-5">Parameters<a href="#parameters-5" class="hash-link" aria-label="Direct link to Parameters" title="Direct link to Parameters" translate="no"></a></h4>
|
|
145
|
+
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>missing</code></td><td><a class="" href="/appkit/docs/api/appkit/Interface.ResourceEntry"><code>ResourceEntry</code></a>[]</td><td>Array of missing resource entries</td></tr></tbody></table>
|
|
146
|
+
<h4 class="anchor anchorTargetStickyNavbar_scV4" id="returns-13">Returns<a href="#returns-13" class="hash-link" aria-label="Direct link to Returns" title="Direct link to Returns" translate="no"></a></h4>
|
|
147
|
+
<p><code>string</code></p>
|
|
148
|
+
<p>Formatted error message string</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="row margin-top--sm theme-doc-footer-edit-meta-row"><div class="col noPrint_Z6Q_"><a href="https://github.com/databricks/appkit/edit/main/docs/docs/api/appkit/Class.ResourceRegistry.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_kMm5" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_mnLK"></div></div></footer></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/appkit/docs/api/appkit/Class.Plugin"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Plugin</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/appkit/docs/api/appkit/Class.ServerError"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">ServerError</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_xfIk thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#constructors" class="table-of-contents__link toc-highlight">Constructors</a><ul><li><a href="#constructor" class="table-of-contents__link toc-highlight">Constructor</a></li></ul></li><li><a href="#methods" class="table-of-contents__link toc-highlight">Methods</a><ul><li><a href="#clear" class="table-of-contents__link toc-highlight">clear()</a></li><li><a href="#collectresources" class="table-of-contents__link toc-highlight">collectResources()</a></li><li><a href="#enforcevalidation" class="table-of-contents__link toc-highlight">enforceValidation()</a></li><li><a href="#get" class="table-of-contents__link toc-highlight">get()</a></li><li><a href="#getall" class="table-of-contents__link toc-highlight">getAll()</a></li><li><a href="#getbyplugin" class="table-of-contents__link toc-highlight">getByPlugin()</a></li><li><a href="#getoptional" class="table-of-contents__link toc-highlight">getOptional()</a></li><li><a href="#getrequired" class="table-of-contents__link toc-highlight">getRequired()</a></li><li><a href="#register" class="table-of-contents__link toc-highlight">register()</a></li><li><a href="#size" class="table-of-contents__link toc-highlight">size()</a></li><li><a href="#validate" class="table-of-contents__link toc-highlight">validate()</a></li><li><a href="#formatdevwarningbanner" class="table-of-contents__link toc-highlight">formatDevWarningBanner()</a></li><li><a href="#formatmissingresources" class="table-of-contents__link toc-highlight">formatMissingResources()</a></li></ul></li></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/appkit/docs/">Getting started</a></li><li class="footer__item"><a class="footer__link-item" href="/appkit/docs/api/">API reference</a></li></ul></div><div class="theme-layout-footer-column col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/appkit/contributing">Contributing</a></li><li class="footer__item"><a href="https://github.com/databricks/appkit" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-label="(opens in new tab)" class="iconExternalLink_miaU"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div><div class="theme-layout-footer-column col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://docs.databricks.com/aws/en/dev-tools/databricks-apps/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Databricks Apps docs<svg width="13.5" height="13.5" aria-label="(opens in new tab)" class="iconExternalLink_miaU"><use href="#theme-svg-external-link"></use></svg></a></li><li class="footer__item"><a href="https://github.com/databricks/cli" target="_blank" rel="noopener noreferrer" class="footer__link-item">Databricks CLI<svg width="13.5" height="13.5" aria-label="(opens in new tab)" class="iconExternalLink_miaU"><use href="#theme-svg-external-link"></use></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2026 Databricks, Inc.</div></div></div></footer></div>
|
|
149
|
+
</body>
|
|
150
|
+
</html>
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# Class: ResourceRegistry
|
|
2
|
+
|
|
3
|
+
Central registry for tracking plugin resource requirements. Deduplication uses type + resourceKey (machine-stable); alias is for display only.
|
|
4
|
+
|
|
5
|
+
## Constructors[](#constructors "Direct link to Constructors")
|
|
6
|
+
|
|
7
|
+
### Constructor[](#constructor "Direct link to Constructor")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
new ResourceRegistry(): ResourceRegistry;
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
#### Returns[](#returns "Direct link to Returns")
|
|
15
|
+
|
|
16
|
+
`ResourceRegistry`
|
|
17
|
+
|
|
18
|
+
## Methods[](#methods "Direct link to Methods")
|
|
19
|
+
|
|
20
|
+
### clear()[](#clear "Direct link to clear()")
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
clear(): void;
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Clears all registered resources. Useful for testing or when rebuilding the registry.
|
|
28
|
+
|
|
29
|
+
#### Returns[](#returns-1 "Direct link to Returns")
|
|
30
|
+
|
|
31
|
+
`void`
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### collectResources()[](#collectresources "Direct link to collectResources()")
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
collectResources(rawPlugins: PluginData<PluginConstructor, unknown, string>[]): void;
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Collects and registers resource requirements from an array of plugins. For each plugin, loads its manifest (required) and runtime resource requirements.
|
|
43
|
+
|
|
44
|
+
#### Parameters[](#parameters "Direct link to Parameters")
|
|
45
|
+
|
|
46
|
+
| Parameter | Type | Description |
|
|
47
|
+
| ------------ | --------------------------------------------------------- | --------------------------------------------------------- |
|
|
48
|
+
| `rawPlugins` | `PluginData`<`PluginConstructor`, `unknown`, `string`>\[] | Array of plugin data entries from createApp configuration |
|
|
49
|
+
|
|
50
|
+
#### Returns[](#returns-2 "Direct link to Returns")
|
|
51
|
+
|
|
52
|
+
`void`
|
|
53
|
+
|
|
54
|
+
#### Throws[](#throws "Direct link to Throws")
|
|
55
|
+
|
|
56
|
+
If any plugin is missing a manifest or manifest is invalid
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### enforceValidation()[](#enforcevalidation "Direct link to enforceValidation()")
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
enforceValidation(): ValidationResult;
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Validates all registered resources and enforces the result.
|
|
68
|
+
|
|
69
|
+
* In production: throws a [ConfigurationError](/appkit/docs/api/appkit/Class.ConfigurationError.md) if any required resources are missing.
|
|
70
|
+
* In development (`NODE_ENV=development`): logs a warning but continues, unless `APPKIT_STRICT_VALIDATION=true` is set, in which case throws like production.
|
|
71
|
+
* When all resources are valid: logs a debug message with the count.
|
|
72
|
+
|
|
73
|
+
#### Returns[](#returns-3 "Direct link to Returns")
|
|
74
|
+
|
|
75
|
+
[`ValidationResult`](/appkit/docs/api/appkit/Interface.ValidationResult.md)
|
|
76
|
+
|
|
77
|
+
ValidationResult with validity status, missing resources, and all resources
|
|
78
|
+
|
|
79
|
+
#### Throws[](#throws-1 "Direct link to Throws")
|
|
80
|
+
|
|
81
|
+
In production when required resources are missing, or in dev when APPKIT\_STRICT\_VALIDATION=true
|
|
82
|
+
|
|
83
|
+
***
|
|
84
|
+
|
|
85
|
+
### get()[](#get "Direct link to get()")
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
get(type: string, resourceKey: string): ResourceEntry | undefined;
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Gets a specific resource by type and resourceKey (dedup key).
|
|
93
|
+
|
|
94
|
+
#### Parameters[](#parameters-1 "Direct link to Parameters")
|
|
95
|
+
|
|
96
|
+
| Parameter | Type | Description |
|
|
97
|
+
| ------------- | -------- | --------------------------------------------------------- |
|
|
98
|
+
| `type` | `string` | Resource type |
|
|
99
|
+
| `resourceKey` | `string` | Stable machine key (not alias; alias is for display only) |
|
|
100
|
+
|
|
101
|
+
#### Returns[](#returns-4 "Direct link to Returns")
|
|
102
|
+
|
|
103
|
+
[`ResourceEntry`](/appkit/docs/api/appkit/Interface.ResourceEntry.md) | `undefined`
|
|
104
|
+
|
|
105
|
+
The resource entry if found, undefined otherwise
|
|
106
|
+
|
|
107
|
+
***
|
|
108
|
+
|
|
109
|
+
### getAll()[](#getall "Direct link to getAll()")
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
getAll(): ResourceEntry[];
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Retrieves all registered resources. Returns a copy of the array to prevent external mutations.
|
|
117
|
+
|
|
118
|
+
#### Returns[](#returns-5 "Direct link to Returns")
|
|
119
|
+
|
|
120
|
+
[`ResourceEntry`](/appkit/docs/api/appkit/Interface.ResourceEntry.md)\[]
|
|
121
|
+
|
|
122
|
+
Array of all registered resource entries
|
|
123
|
+
|
|
124
|
+
***
|
|
125
|
+
|
|
126
|
+
### getByPlugin()[](#getbyplugin "Direct link to getByPlugin()")
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
getByPlugin(pluginName: string): ResourceEntry[];
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Gets all resources required by a specific plugin.
|
|
134
|
+
|
|
135
|
+
#### Parameters[](#parameters-2 "Direct link to Parameters")
|
|
136
|
+
|
|
137
|
+
| Parameter | Type | Description |
|
|
138
|
+
| ------------ | -------- | ------------------ |
|
|
139
|
+
| `pluginName` | `string` | Name of the plugin |
|
|
140
|
+
|
|
141
|
+
#### Returns[](#returns-6 "Direct link to Returns")
|
|
142
|
+
|
|
143
|
+
[`ResourceEntry`](/appkit/docs/api/appkit/Interface.ResourceEntry.md)\[]
|
|
144
|
+
|
|
145
|
+
Array of resources where the plugin is listed as a requester
|
|
146
|
+
|
|
147
|
+
***
|
|
148
|
+
|
|
149
|
+
### getOptional()[](#getoptional "Direct link to getOptional()")
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
getOptional(): ResourceEntry[];
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Gets all optional resources (where required=false).
|
|
157
|
+
|
|
158
|
+
#### Returns[](#returns-7 "Direct link to Returns")
|
|
159
|
+
|
|
160
|
+
[`ResourceEntry`](/appkit/docs/api/appkit/Interface.ResourceEntry.md)\[]
|
|
161
|
+
|
|
162
|
+
Array of optional resource entries
|
|
163
|
+
|
|
164
|
+
***
|
|
165
|
+
|
|
166
|
+
### getRequired()[](#getrequired "Direct link to getRequired()")
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
getRequired(): ResourceEntry[];
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Gets all required resources (where required=true).
|
|
174
|
+
|
|
175
|
+
#### Returns[](#returns-8 "Direct link to Returns")
|
|
176
|
+
|
|
177
|
+
[`ResourceEntry`](/appkit/docs/api/appkit/Interface.ResourceEntry.md)\[]
|
|
178
|
+
|
|
179
|
+
Array of required resource entries
|
|
180
|
+
|
|
181
|
+
***
|
|
182
|
+
|
|
183
|
+
### register()[](#register "Direct link to register()")
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
register(plugin: string, resource: ResourceRequirement): void;
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Registers a resource requirement for a plugin. If a resource with the same type+resourceKey already exists, merges them:
|
|
191
|
+
|
|
192
|
+
* Combines plugin names (comma-separated)
|
|
193
|
+
* Uses the most permissive permission (per-type hierarchy)
|
|
194
|
+
* Marks as required if any plugin requires it
|
|
195
|
+
* Combines descriptions if they differ
|
|
196
|
+
* Merges fields; warns when same field name uses different env vars
|
|
197
|
+
|
|
198
|
+
#### Parameters[](#parameters-3 "Direct link to Parameters")
|
|
199
|
+
|
|
200
|
+
| Parameter | Type | Description |
|
|
201
|
+
| ---------- | --------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
202
|
+
| `plugin` | `string` | Name of the plugin registering the resource |
|
|
203
|
+
| `resource` | [`ResourceRequirement`](/appkit/docs/api/appkit/Interface.ResourceRequirement.md) | Resource requirement specification |
|
|
204
|
+
|
|
205
|
+
#### Returns[](#returns-9 "Direct link to Returns")
|
|
206
|
+
|
|
207
|
+
`void`
|
|
208
|
+
|
|
209
|
+
***
|
|
210
|
+
|
|
211
|
+
### size()[](#size "Direct link to size()")
|
|
212
|
+
|
|
213
|
+
```ts
|
|
214
|
+
size(): number;
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Returns the number of registered resources.
|
|
219
|
+
|
|
220
|
+
#### Returns[](#returns-10 "Direct link to Returns")
|
|
221
|
+
|
|
222
|
+
`number`
|
|
223
|
+
|
|
224
|
+
***
|
|
225
|
+
|
|
226
|
+
### validate()[](#validate "Direct link to validate()")
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
validate(): ValidationResult;
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Validates all registered resources against the environment.
|
|
234
|
+
|
|
235
|
+
Checks each resource's field environment variables to determine if it's resolved. Updates the `resolved` and `values` fields on each resource entry.
|
|
236
|
+
|
|
237
|
+
Only required resources affect the `valid` status - optional resources are checked but don't cause validation failure.
|
|
238
|
+
|
|
239
|
+
#### Returns[](#returns-11 "Direct link to Returns")
|
|
240
|
+
|
|
241
|
+
[`ValidationResult`](/appkit/docs/api/appkit/Interface.ValidationResult.md)
|
|
242
|
+
|
|
243
|
+
ValidationResult with validity status, missing resources, and all resources
|
|
244
|
+
|
|
245
|
+
#### Example[](#example "Direct link to Example")
|
|
246
|
+
|
|
247
|
+
```typescript
|
|
248
|
+
const registry = ResourceRegistry.getInstance();
|
|
249
|
+
const result = registry.validate();
|
|
250
|
+
|
|
251
|
+
if (!result.valid) {
|
|
252
|
+
console.error("Missing resources:", result.missing.map(r => Object.values(r.fields).map(f => f.env)));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
***
|
|
258
|
+
|
|
259
|
+
### formatDevWarningBanner()[](#formatdevwarningbanner "Direct link to formatDevWarningBanner()")
|
|
260
|
+
|
|
261
|
+
```ts
|
|
262
|
+
static formatDevWarningBanner(missing: ResourceEntry[]): string;
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Formats a highly visible warning banner for dev-mode missing resources. Uses box drawing to ensure the message is impossible to miss in scrolling logs.
|
|
267
|
+
|
|
268
|
+
#### Parameters[](#parameters-4 "Direct link to Parameters")
|
|
269
|
+
|
|
270
|
+
| Parameter | Type | Description |
|
|
271
|
+
| --------- | ------------------------------------------------------------------------ | --------------------------------- |
|
|
272
|
+
| `missing` | [`ResourceEntry`](/appkit/docs/api/appkit/Interface.ResourceEntry.md)\[] | Array of missing resource entries |
|
|
273
|
+
|
|
274
|
+
#### Returns[](#returns-12 "Direct link to Returns")
|
|
275
|
+
|
|
276
|
+
`string`
|
|
277
|
+
|
|
278
|
+
Formatted banner string
|
|
279
|
+
|
|
280
|
+
***
|
|
281
|
+
|
|
282
|
+
### formatMissingResources()[](#formatmissingresources "Direct link to formatMissingResources()")
|
|
283
|
+
|
|
284
|
+
```ts
|
|
285
|
+
static formatMissingResources(missing: ResourceEntry[]): string;
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Formats missing resources into a human-readable error message.
|
|
290
|
+
|
|
291
|
+
#### Parameters[](#parameters-5 "Direct link to Parameters")
|
|
292
|
+
|
|
293
|
+
| Parameter | Type | Description |
|
|
294
|
+
| --------- | ------------------------------------------------------------------------ | --------------------------------- |
|
|
295
|
+
| `missing` | [`ResourceEntry`](/appkit/docs/api/appkit/Interface.ResourceEntry.md)\[] | Array of missing resource entries |
|
|
296
|
+
|
|
297
|
+
#### Returns[](#returns-13 "Direct link to Returns")
|
|
298
|
+
|
|
299
|
+
`string`
|
|
300
|
+
|
|
301
|
+
Formatted error message string
|