@vertesia/ui 1.5.0 → 1.6.0-dev.20260918.061604Z
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/README.md +125 -0
- package/lib/boot/branding.d.ts +58 -0
- package/lib/boot/branding.d.ts.map +1 -0
- package/lib/boot/branding.js +62 -0
- package/lib/boot/branding.js.map +1 -0
- package/lib/boot/index.d.ts +27 -0
- package/lib/boot/index.d.ts.map +1 -0
- package/lib/boot/index.js +325 -0
- package/lib/boot/index.js.map +1 -0
- package/lib/boot/vite.d.ts +63 -0
- package/lib/boot/vite.d.ts.map +1 -0
- package/lib/boot/vite.js +108 -0
- package/lib/boot/vite.js.map +1 -0
- package/lib/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/core/components/shadcn/button.js +1 -2
- package/lib/core/components/shadcn/button.js.map +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.d.ts +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.js +4 -4
- package/lib/core/components/shadcn/label.js +1 -1
- package/lib/core/components/shadcn/label.js.map +1 -1
- package/lib/env/index.d.ts +32 -1
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +55 -3
- package/lib/env/index.js.map +1 -1
- package/lib/features/agent/PayloadBuilder.d.ts +4 -0
- package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/features/agent/PayloadBuilder.js +6 -1
- package/lib/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/features/agent/chat/AgentRunFeedback.d.ts +66 -0
- package/lib/features/agent/chat/AgentRunFeedback.d.ts.map +1 -0
- package/lib/features/agent/chat/AgentRunFeedback.js +298 -0
- package/lib/features/agent/chat/AgentRunFeedback.js.map +1 -0
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +7 -5
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +11 -10
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +28 -7
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js +2 -0
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentPlans.d.ts +1 -1
- package/lib/features/agent/chat/hooks/useAgentPlans.d.ts.map +1 -1
- package/lib/features/agent/chat/hooks/useAgentPlans.js +5 -5
- package/lib/features/agent/chat/hooks/useAgentPlans.js.map +1 -1
- package/lib/features/agent/chat/index.d.ts +1 -0
- package/lib/features/agent/chat/index.d.ts.map +1 -1
- package/lib/features/agent/chat/index.js +1 -0
- package/lib/features/agent/chat/index.js.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts +8 -0
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js +12 -0
- package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts +15 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +20 -12
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/features/store/objects/search/DocumentSearchContext.js +6 -1
- package/lib/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +130 -0
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +130 -0
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/i18n/index.d.ts +5 -4
- package/lib/i18n/index.d.ts.map +1 -1
- package/lib/i18n/index.js +16 -2
- package/lib/i18n/index.js.map +1 -1
- package/lib/i18n/locales/ar.json +30 -0
- package/lib/i18n/locales/de.json +30 -0
- package/lib/i18n/locales/en.json +30 -0
- package/lib/i18n/locales/es.json +30 -0
- package/lib/i18n/locales/fr.json +30 -0
- package/lib/i18n/locales/it.json +30 -0
- package/lib/i18n/locales/ja.json +30 -0
- package/lib/i18n/locales/ko.json +30 -0
- package/lib/i18n/locales/pt.json +30 -0
- package/lib/i18n/locales/ru.json +30 -0
- package/lib/i18n/locales/tr.json +30 -0
- package/lib/i18n/locales/zh-TW.json +30 -0
- package/lib/i18n/locales/zh.json +30 -0
- package/lib/layout/ErrorPage.js +1 -1
- package/lib/layout/ErrorPage.js.map +1 -1
- package/lib/layout/Navbar.d.ts.map +1 -1
- package/lib/layout/Navbar.js +3 -2
- package/lib/layout/Navbar.js.map +1 -1
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +2 -3
- package/lib/session/UserSession.js.map +1 -1
- package/lib/session/UserSessionProvider.d.ts +2 -1
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +13 -4
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +88 -3
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/auth/domainRouting.d.ts +22 -12
- package/lib/session/auth/domainRouting.d.ts.map +1 -1
- package/lib/session/auth/domainRouting.js +35 -21
- package/lib/session/auth/domainRouting.js.map +1 -1
- package/lib/session/auth/firebase.d.ts.map +1 -1
- package/lib/session/auth/firebase.js +10 -0
- package/lib/session/auth/firebase.js.map +1 -1
- package/lib/session/auth/useAuthState.d.ts +9 -4
- package/lib/session/auth/useAuthState.d.ts.map +1 -1
- package/lib/session/auth/useAuthState.js +9 -4
- package/lib/session/auth/useAuthState.js.map +1 -1
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +3 -1
- package/lib/session/index.js.map +1 -1
- package/lib/shell/AuthScreenPreview.d.ts +12 -0
- package/lib/shell/AuthScreenPreview.d.ts.map +1 -0
- package/lib/shell/AuthScreenPreview.js +140 -0
- package/lib/shell/AuthScreenPreview.js.map +1 -0
- package/lib/shell/BrandedAuthScreens.d.ts +19 -0
- package/lib/shell/BrandedAuthScreens.d.ts.map +1 -0
- package/lib/shell/BrandedAuthScreens.js +64 -0
- package/lib/shell/BrandedAuthScreens.js.map +1 -0
- package/lib/shell/SplashScreen.d.ts +13 -2
- package/lib/shell/SplashScreen.d.ts.map +1 -1
- package/lib/shell/SplashScreen.js +20 -19
- package/lib/shell/SplashScreen.js.map +1 -1
- package/lib/shell/VertesiaShell.d.ts +15 -4
- package/lib/shell/VertesiaShell.d.ts.map +1 -1
- package/lib/shell/VertesiaShell.js +8 -3
- package/lib/shell/VertesiaShell.js.map +1 -1
- package/lib/shell/apps/StandaloneApp.js +5 -1
- package/lib/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/shell/index.d.ts +6 -0
- package/lib/shell/index.d.ts.map +1 -1
- package/lib/shell/index.js +5 -0
- package/lib/shell/index.js.map +1 -1
- package/lib/shell/login/SignInAuthPending.js +1 -1
- package/lib/shell/login/SignInAuthPending.js.map +1 -1
- package/lib/shell/login/SignInEmailStep.d.ts.map +1 -1
- package/lib/shell/login/SignInEmailStep.js +2 -2
- package/lib/shell/login/SignInEmailStep.js.map +1 -1
- package/lib/shell/login/SignInFlow.d.ts +68 -0
- package/lib/shell/login/SignInFlow.d.ts.map +1 -0
- package/lib/shell/login/SignInFlow.js +108 -0
- package/lib/shell/login/SignInFlow.js.map +1 -0
- package/lib/shell/login/SignInIcons.d.ts +1 -1
- package/lib/shell/login/SignInIcons.d.ts.map +1 -1
- package/lib/shell/login/SignInPageShell.d.ts +13 -0
- package/lib/shell/login/SignInPageShell.d.ts.map +1 -0
- package/lib/shell/login/SignInPageShell.js +14 -0
- package/lib/shell/login/SignInPageShell.js.map +1 -0
- package/lib/shell/login/SignInPrimitives.d.ts +3 -3
- package/lib/shell/login/SignInPrimitives.d.ts.map +1 -1
- package/lib/shell/login/SignInPrimitives.js +13 -11
- package/lib/shell/login/SignInPrimitives.js.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts +5 -0
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.js +8 -4
- package/lib/shell/login/SignInRestrictedEnvStep.js.map +1 -1
- package/lib/shell/login/SigninScreen.d.ts +38 -3
- package/lib/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/shell/login/SigninScreen.js +33 -86
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/SignupForm.d.ts +3 -1
- package/lib/shell/login/SignupForm.d.ts.map +1 -1
- package/lib/shell/login/SignupForm.js +7 -3
- package/lib/shell/login/SignupForm.js.map +1 -1
- package/lib/shell/login/signInUtils.d.ts +12 -1
- package/lib/shell/login/signInUtils.d.ts.map +1 -1
- package/lib/shell/login/signInUtils.js +34 -11
- package/lib/shell/login/signInUtils.js.map +1 -1
- package/lib/vertesia-ui-boot.js +237 -0
- package/lib/vertesia-ui-boot.js.map +1 -0
- package/lib/vertesia-ui-core.js +88 -46
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +350 -317
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.B3NFclwl.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.B3NFclwl.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BWSrNIxc.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BWSrNIxc.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BWvWeB1p.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BWvWeB1p.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BZCXvTC1.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BZCXvTC1.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BbJMvFZW.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BbJMvFZW.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CE5ldwpt.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CE5ldwpt.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CMC0IShY.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CMC0IShY.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CkcRqBKU.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CkcRqBKU.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.D-Mq1sw_.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.D-Mq1sw_.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DkK68-A-.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DkK68-A-.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.XE_dcCg6.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.XE_dcCg6.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.js +2 -2
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-i18n.qgNqMPvK.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.qgNqMPvK.chunk.js.map +1 -0
- package/lib/vertesia-ui-layout.js +43 -19
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +123 -74
- package/lib/vertesia-ui-rich-text.js.map +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +87 -33
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +154 -98
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/xml-viewer/hooks/useCollapsible.d.ts +1 -1
- package/llms.txt +6 -2
- package/package.json +45 -36
- package/src/__tests__/a11y.test.tsx +25 -0
- package/src/__tests__/theme.test.ts +91 -0
- package/src/boot/branding.test.ts +72 -0
- package/src/boot/branding.ts +108 -0
- package/src/boot/index.test.ts +216 -0
- package/src/boot/index.ts +356 -0
- package/src/boot/vite.test.ts +93 -0
- package/src/boot/vite.ts +118 -0
- package/src/core/components/shadcn/button.tsx +1 -2
- package/src/core/components/shadcn/filters/filter-styles.ts +4 -4
- package/src/core/components/shadcn/label.tsx +1 -1
- package/src/env/index.test.ts +127 -0
- package/src/env/index.ts +73 -3
- package/src/features/agent/PayloadBuilder.tsx +10 -1
- package/src/features/agent/chat/AgentRunFeedback.test.tsx +347 -0
- package/src/features/agent/chat/AgentRunFeedback.tsx +465 -0
- package/src/features/agent/chat/ModernAgentConversation.test.tsx +1 -1
- package/src/features/agent/chat/ModernAgentConversation.tsx +52 -47
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +145 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +42 -24
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +4 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +38 -5
- package/src/features/agent/chat/ModernAgentOutput/SummaryConversation.ts +2 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +14 -0
- package/src/features/agent/chat/hooks/useAgentPlans.test.ts +52 -0
- package/src/features/agent/chat/hooks/useAgentPlans.ts +5 -5
- package/src/features/agent/chat/hooks/useFileProcessing.test.tsx +0 -5
- package/src/features/agent/chat/index.ts +6 -0
- package/src/features/facets/AgentRunnerFacetsNav.tsx +26 -0
- package/src/features/permissions/UserPermissionsProvider.test.tsx +50 -1
- package/src/features/permissions/UserPermissionsProvider.tsx +82 -44
- package/src/features/store/objects/search/DocumentSearchContext.ts +8 -3
- package/src/features/store/objects/selection/SelectionActions.tsx +4 -1
- package/src/i18n/index.tsx +25 -2
- package/src/i18n/locales/ar.json +30 -0
- package/src/i18n/locales/de.json +30 -0
- package/src/i18n/locales/en.json +30 -0
- package/src/i18n/locales/es.json +30 -0
- package/src/i18n/locales/fr.json +30 -0
- package/src/i18n/locales/it.json +30 -0
- package/src/i18n/locales/ja.json +30 -0
- package/src/i18n/locales/ko.json +30 -0
- package/src/i18n/locales/pt.json +30 -0
- package/src/i18n/locales/ru.json +30 -0
- package/src/i18n/locales/tr.json +30 -0
- package/src/i18n/locales/zh-TW.json +30 -0
- package/src/i18n/locales/zh.json +30 -0
- package/src/layout/ErrorPage.tsx +1 -1
- package/src/layout/Navbar.test.tsx +58 -0
- package/src/layout/Navbar.tsx +5 -2
- package/src/router/path.test.ts +5 -5
- package/src/session/UserSession.ts +2 -4
- package/src/session/UserSessionProvider.strict-mode.test.tsx +44 -0
- package/src/session/UserSessionProvider.test.ts +62 -1
- package/src/session/UserSessionProvider.tsx +12 -4
- package/src/session/auth/composable.renewal.test.ts +170 -0
- package/src/session/auth/composable.test.ts +23 -1
- package/src/session/auth/composable.ts +101 -2
- package/src/session/auth/domainRouting.test.ts +35 -65
- package/src/session/auth/domainRouting.ts +51 -34
- package/src/session/auth/firebase.test.ts +25 -0
- package/src/session/auth/firebase.ts +10 -0
- package/src/session/auth/useAuthState.ts +11 -4
- package/src/session/index.ts +3 -1
- package/src/shell/AuthScreenPreview.test.tsx +44 -0
- package/src/shell/AuthScreenPreview.tsx +228 -0
- package/src/shell/BrandedAuthScreens.test.tsx +181 -0
- package/src/shell/BrandedAuthScreens.tsx +117 -0
- package/src/shell/SplashScreen.test.tsx +37 -0
- package/src/shell/SplashScreen.tsx +44 -39
- package/src/shell/VertesiaShell.tsx +49 -22
- package/src/shell/apps/StandaloneApp.tsx +5 -1
- package/src/shell/index.tsx +6 -0
- package/src/shell/login/SignInAuthPending.tsx +3 -3
- package/src/shell/login/SignInEmailStep.test.tsx +32 -0
- package/src/shell/login/SignInEmailStep.tsx +13 -9
- package/src/shell/login/SignInFlow.tsx +213 -0
- package/src/shell/login/SignInPageShell.tsx +62 -0
- package/src/shell/login/SignInPrimitives.tsx +14 -11
- package/src/shell/login/SignInRestrictedEnvStep.tsx +19 -7
- package/src/shell/login/SigninScreen.test.tsx +104 -0
- package/src/shell/login/SigninScreen.tsx +115 -145
- package/src/shell/login/SignupForm.tsx +8 -3
- package/src/shell/login/signInUtils.ts +42 -9
- package/src/widgets/markdown/CollaborativeMarkdownRenderer.test.tsx +11 -3
- package/src/widgets/markdown/markdown.css +21 -21
- package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DN79y06J.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DN79y06J.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js.map +0 -1
- package/src/session/auth/authState.test.ts +0 -35
package/src/boot/vite.ts
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/** Node-only adapter. Import from @vertesia/ui/boot/vite, never from browser code. */
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { extname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { type AppBranding, brandedBootOptions, escapeBrandHtml } from './branding.js';
|
|
6
|
+
import { injectBootScreenHtml } from './index.js';
|
|
7
|
+
|
|
8
|
+
const VIRTUAL_ID = 'virtual:vertesia-branding';
|
|
9
|
+
const RESOLVED_ID = `\0${VIRTUAL_ID}`;
|
|
10
|
+
const MIME: Record<string, string> = {
|
|
11
|
+
'.svg': 'image/svg+xml',
|
|
12
|
+
'.png': 'image/png',
|
|
13
|
+
'.jpg': 'image/jpeg',
|
|
14
|
+
'.jpeg': 'image/jpeg',
|
|
15
|
+
'.webp': 'image/webp',
|
|
16
|
+
'.ico': 'image/x-icon',
|
|
17
|
+
'.woff2': 'font/woff2',
|
|
18
|
+
'.woff': 'font/woff',
|
|
19
|
+
'.otf': 'font/otf',
|
|
20
|
+
'.ttf': 'font/ttf',
|
|
21
|
+
'.avif': 'image/avif',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** Inline local assets so React and pre-React markup work under any gateway base path. */
|
|
25
|
+
export function resolveBrandingAssets(branding: AppBranding, moduleUrl: URL, watch: (file: string) => void = () => {}) {
|
|
26
|
+
function asset(value: string, base = moduleUrl): string {
|
|
27
|
+
if (/^(https?:|data:|#)/i.test(value)) return value;
|
|
28
|
+
const url = new URL(value, base);
|
|
29
|
+
if (url.protocol !== 'file:') throw new Error(`Unsupported branding asset URL: ${value}`);
|
|
30
|
+
const file = fileURLToPath(url);
|
|
31
|
+
const mime = MIME[extname(file).toLowerCase()];
|
|
32
|
+
if (!mime) throw new Error(`Unsupported branding asset type: ${file}`);
|
|
33
|
+
watch(file);
|
|
34
|
+
return `data:${mime};base64,${readFileSync(file).toString('base64')}`;
|
|
35
|
+
}
|
|
36
|
+
function source(value: string, css: boolean): string {
|
|
37
|
+
const url = new URL(value, moduleUrl);
|
|
38
|
+
const file = fileURLToPath(url);
|
|
39
|
+
watch(file);
|
|
40
|
+
const text = readFileSync(file, 'utf8');
|
|
41
|
+
return css
|
|
42
|
+
? text.replace(
|
|
43
|
+
/url\(\s*['"]?([^'"\s)]+)['"]?\s*\)/g,
|
|
44
|
+
(_match, path: string) => `url("${asset(path, url)}")`,
|
|
45
|
+
)
|
|
46
|
+
: text.replace(
|
|
47
|
+
/(<(?:img|source|link)\b[^>]*?\s)(src|href)=["']([^"']+)["']/gi,
|
|
48
|
+
(_match, tag: string, attr: string, path: string) =>
|
|
49
|
+
`${tag}${attr}="${escapeBrandHtml(asset(path, url))}"`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
...branding,
|
|
54
|
+
logo: branding.logo && {
|
|
55
|
+
...branding.logo,
|
|
56
|
+
light: asset(branding.logo.light),
|
|
57
|
+
dark: branding.logo.dark ? asset(branding.logo.dark) : undefined,
|
|
58
|
+
},
|
|
59
|
+
loadingIcon: branding.loadingIcon && {
|
|
60
|
+
...branding.loadingIcon,
|
|
61
|
+
light: asset(branding.loadingIcon.light),
|
|
62
|
+
dark: branding.loadingIcon.dark ? asset(branding.loadingIcon.dark) : undefined,
|
|
63
|
+
},
|
|
64
|
+
favicon: branding.favicon ? asset(branding.favicon) : undefined,
|
|
65
|
+
font: branding.font && {
|
|
66
|
+
...branding.font,
|
|
67
|
+
regular: asset(branding.font.regular),
|
|
68
|
+
bold: branding.font.bold ? asset(branding.font.bold) : undefined,
|
|
69
|
+
},
|
|
70
|
+
boot: branding.boot && {
|
|
71
|
+
html: branding.boot.html ? source(branding.boot.html, false) : undefined,
|
|
72
|
+
styles: branding.boot.styles ? source(branding.boot.styles, true) : undefined,
|
|
73
|
+
},
|
|
74
|
+
} satisfies AppBranding;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function createAppBrandingPlugin(branding: AppBranding, moduleUrl: URL) {
|
|
78
|
+
const watched = new Set<string>();
|
|
79
|
+
const resolve = () => resolveBrandingAssets(branding, moduleUrl, (file) => watched.add(file));
|
|
80
|
+
return {
|
|
81
|
+
name: 'vertesia-app-branding',
|
|
82
|
+
resolveId(id: string) {
|
|
83
|
+
if (id === VIRTUAL_ID) return RESOLVED_ID;
|
|
84
|
+
},
|
|
85
|
+
load(this: { addWatchFile(file: string): void }, id: string) {
|
|
86
|
+
if (id !== RESOLVED_ID) return;
|
|
87
|
+
const resolved = resolve();
|
|
88
|
+
for (const file of watched) this.addWatchFile(file);
|
|
89
|
+
return `export default ${JSON.stringify(resolved)};`;
|
|
90
|
+
},
|
|
91
|
+
handleHotUpdate<Module>(context: {
|
|
92
|
+
file: string;
|
|
93
|
+
server: {
|
|
94
|
+
moduleGraph: { getModuleById(id: string): Module | undefined; invalidateModule(module: Module): void };
|
|
95
|
+
ws: { send(payload: { type: 'full-reload' }): void };
|
|
96
|
+
};
|
|
97
|
+
}) {
|
|
98
|
+
if (!watched.has(context.file)) return;
|
|
99
|
+
const module = context.server.moduleGraph.getModuleById(RESOLVED_ID);
|
|
100
|
+
if (module) context.server.moduleGraph.invalidateModule(module);
|
|
101
|
+
context.server.ws.send({ type: 'full-reload' });
|
|
102
|
+
return [];
|
|
103
|
+
},
|
|
104
|
+
transformIndexHtml(html: string) {
|
|
105
|
+
const resolved = resolve();
|
|
106
|
+
const title = escapeBrandHtml(resolved.title ?? resolved.name);
|
|
107
|
+
let result = html.replace(/<title\b[^>]*>[\s\S]*?<\/title>/i, `<title>${title}</title>`);
|
|
108
|
+
if (resolved.favicon) {
|
|
109
|
+
result = result.replace(/<link\b(?=[^>]*\brel=["'](?:shortcut )?icon["'])[^>]*>/gi, '');
|
|
110
|
+
result = result.replace(
|
|
111
|
+
'</head>',
|
|
112
|
+
`<link rel="icon" href="${escapeBrandHtml(resolved.favicon)}"></head>`,
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
return injectBootScreenHtml(result, brandedBootOptions(resolved));
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
}
|
|
@@ -5,7 +5,6 @@ import { Slot } from '@radix-ui/react-slot';
|
|
|
5
5
|
// pinned to the fallback language regardless of LanguageProvider changes.
|
|
6
6
|
import { useUITranslation } from '@vertesia/ui/i18n';
|
|
7
7
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
8
|
-
import clsx from 'clsx';
|
|
9
8
|
import { Check, CopyIcon, Loader2 } from 'lucide-react';
|
|
10
9
|
import * as React from 'react';
|
|
11
10
|
import { useEffect, useState } from 'react';
|
|
@@ -149,7 +148,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
149
148
|
|
|
150
149
|
const buttonElement = (
|
|
151
150
|
<Comp
|
|
152
|
-
className={
|
|
151
|
+
className={cn(buttonVariants({ variant, size }), className)}
|
|
153
152
|
disabled={isDisabled || isLoading || props.disabled}
|
|
154
153
|
ref={ref}
|
|
155
154
|
onClick={onClick}
|
|
@@ -20,13 +20,13 @@ export const calendarStyles = `
|
|
|
20
20
|
min-width: 32px !important;
|
|
21
21
|
height: 32px !important;
|
|
22
22
|
border-radius: 4px !important;
|
|
23
|
-
border: 1px solid
|
|
24
|
-
background:
|
|
25
|
-
color:
|
|
23
|
+
border: 1px solid var(--border) !important;
|
|
24
|
+
background: var(--background) !important;
|
|
25
|
+
color: var(--foreground) !important;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.calendar-wrapper .react-calendar__navigation__arrow:hover {
|
|
29
|
-
background:
|
|
29
|
+
background: var(--muted) !important;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.calendar-wrapper .react-calendar__tile {
|
|
@@ -17,7 +17,7 @@ const Label: React.ForwardRefExoticComponent<
|
|
|
17
17
|
({ className, required, ...props }, ref) => (
|
|
18
18
|
<LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props}>
|
|
19
19
|
{props.children}
|
|
20
|
-
{required && <span className="text-destructive
|
|
20
|
+
{required && <span className="text-destructive ms-1">*</span>}
|
|
21
21
|
</LabelPrimitive.Root>
|
|
22
22
|
),
|
|
23
23
|
);
|
package/src/env/index.test.ts
CHANGED
|
@@ -92,3 +92,130 @@ describe('VertesiaEnvironment runtime configuration', () => {
|
|
|
92
92
|
expect(window.AUTH_MODE).toBe('central');
|
|
93
93
|
});
|
|
94
94
|
});
|
|
95
|
+
|
|
96
|
+
describe('VertesiaEnvironment build configuration', () => {
|
|
97
|
+
const buildEnv = {
|
|
98
|
+
VITE_FIREBASE_API_KEY: 'build-key',
|
|
99
|
+
VITE_FIREBASE_AUTH_DOMAIN: 'project.firebaseapp.com',
|
|
100
|
+
VITE_FIREBASE_PROJECT_ID: 'project',
|
|
101
|
+
VITE_FIREBASE_APP_ID: 'build-app',
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
afterEach(() => vi.unstubAllGlobals());
|
|
105
|
+
|
|
106
|
+
it('enables Firebase only with an explicit mode and complete build settings', () => {
|
|
107
|
+
vi.stubGlobal('window', {});
|
|
108
|
+
const env = new VertesiaEnvironment().init(baseProps, { ...buildEnv, VITE_AUTH_MODE: 'firebase' });
|
|
109
|
+
expect(env.firebase?.apiKey).toBe('build-key');
|
|
110
|
+
expect(env.firebase?.authDomain).toBe('project.firebaseapp.com');
|
|
111
|
+
expect(window.AUTH_MODE).toBe('firebase');
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it.each([buildEnv, { VITE_FIREBASE_API_KEY: 'unused-key' }])(
|
|
115
|
+
'retains central auth when Firebase values exist without an explicit mode',
|
|
116
|
+
(settings) => {
|
|
117
|
+
vi.stubGlobal('window', {});
|
|
118
|
+
const env = new VertesiaEnvironment().init(baseProps, settings);
|
|
119
|
+
expect(env.firebase).toBeUndefined();
|
|
120
|
+
expect(window.AUTH_MODE).toBeUndefined();
|
|
121
|
+
},
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
it('allows explicit central mode even with Firebase build settings', () => {
|
|
125
|
+
vi.stubGlobal('window', {});
|
|
126
|
+
const env = new VertesiaEnvironment().init(baseProps, { ...buildEnv, VITE_AUTH_MODE: 'central' });
|
|
127
|
+
expect(env.firebase).toBeUndefined();
|
|
128
|
+
expect(window.AUTH_MODE).toBe('central');
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('rejects incomplete settings when Firebase is selected', () => {
|
|
132
|
+
vi.stubGlobal('window', {});
|
|
133
|
+
expect(() =>
|
|
134
|
+
new VertesiaEnvironment().init(baseProps, {
|
|
135
|
+
VITE_AUTH_MODE: 'firebase',
|
|
136
|
+
VITE_FIREBASE_API_KEY: 'key',
|
|
137
|
+
}),
|
|
138
|
+
).toThrow('VITE_FIREBASE_AUTH_DOMAIN, VITE_FIREBASE_PROJECT_ID, VITE_FIREBASE_APP_ID');
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('rejects an unknown mode', () => {
|
|
142
|
+
vi.stubGlobal('window', {});
|
|
143
|
+
expect(() => new VertesiaEnvironment().init(baseProps, { VITE_AUTH_MODE: 'typo' })).toThrow(
|
|
144
|
+
'VITE_AUTH_MODE must be firebase or central',
|
|
145
|
+
);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
it('preserves gateway Firebase configuration ahead of conflicting build settings', () => {
|
|
149
|
+
const firebase = {
|
|
150
|
+
apiKey: 'runtime-key',
|
|
151
|
+
authDomain: 'gateway.example.com',
|
|
152
|
+
projectId: 'runtime',
|
|
153
|
+
appId: 'runtime-app',
|
|
154
|
+
};
|
|
155
|
+
vi.stubGlobal('window', { __VERTESIA_RUNTIME_CONFIG__: { authMode: 'firebase', firebase } });
|
|
156
|
+
const env = new VertesiaEnvironment().init(baseProps, { VITE_AUTH_MODE: 'central' });
|
|
157
|
+
expect(env.firebase).toEqual(firebase);
|
|
158
|
+
expect(window.AUTH_MODE).toBe('firebase');
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('preserves gateway central mode ahead of Firebase build settings', () => {
|
|
162
|
+
vi.stubGlobal('window', { __VERTESIA_RUNTIME_CONFIG__: { authMode: 'central' } });
|
|
163
|
+
const env = new VertesiaEnvironment().init(baseProps, buildEnv);
|
|
164
|
+
expect(env.firebase).toBeUndefined();
|
|
165
|
+
expect(window.AUTH_MODE).toBe('central');
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it('leaves the existing central default unchanged without settings', () => {
|
|
169
|
+
vi.stubGlobal('window', {});
|
|
170
|
+
const env = new VertesiaEnvironment().init(baseProps, {});
|
|
171
|
+
expect(env.firebase).toBeUndefined();
|
|
172
|
+
expect(window.AUTH_MODE).toBeUndefined();
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
describe('build-time default workspace', () => {
|
|
177
|
+
it('reads and trims Vertesia IDs independently of the Firebase project', () => {
|
|
178
|
+
const env = new VertesiaEnvironment().init(baseProps, {
|
|
179
|
+
VITE_VERTESIA_ACCOUNT_ID: ' account-1 ',
|
|
180
|
+
VITE_VERTESIA_PROJECT_ID: ' project-1 ',
|
|
181
|
+
});
|
|
182
|
+
expect(env.defaultAuthSelection).toEqual({ accountId: 'account-1', projectId: 'project-1' });
|
|
183
|
+
});
|
|
184
|
+
it('ignores blank settings and preserves an explicit selection as a whole pair', () => {
|
|
185
|
+
expect(
|
|
186
|
+
new VertesiaEnvironment().init(baseProps, { VITE_VERTESIA_ACCOUNT_ID: ' ' }).defaultAuthSelection,
|
|
187
|
+
).toBeUndefined();
|
|
188
|
+
const env = new VertesiaEnvironment().init(
|
|
189
|
+
{ ...baseProps, defaultAuthSelection: { accountId: 'explicit' } },
|
|
190
|
+
{ VITE_VERTESIA_ACCOUNT_ID: 'build', VITE_VERTESIA_PROJECT_ID: 'other-project' },
|
|
191
|
+
);
|
|
192
|
+
expect(env.defaultAuthSelection).toEqual({ accountId: 'explicit' });
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
describe('fixed Firebase tenant', () => {
|
|
197
|
+
afterEach(() => vi.unstubAllGlobals());
|
|
198
|
+
|
|
199
|
+
it('combines an app tenant with gateway credentials', () => {
|
|
200
|
+
vi.stubGlobal('window', {
|
|
201
|
+
__VERTESIA_RUNTIME_CONFIG__: {
|
|
202
|
+
authMode: 'firebase',
|
|
203
|
+
firebase: {
|
|
204
|
+
apiKey: 'gateway',
|
|
205
|
+
authDomain: 'app.example.com',
|
|
206
|
+
projectId: 'project',
|
|
207
|
+
appId: 'app',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
const env = new VertesiaEnvironment().init(baseProps, { VITE_FIREBASE_TENANT_ID: ' example-tenant ' });
|
|
212
|
+
expect(env.firebase?.tenantId).toBe('example-tenant');
|
|
213
|
+
expect(env.firebase?.apiKey).toBe('gateway');
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
it('does not enable Firebase just because a tenant is supplied', () => {
|
|
217
|
+
vi.stubGlobal('window', {});
|
|
218
|
+
const env = new VertesiaEnvironment().init(baseProps, { VITE_FIREBASE_TENANT_ID: 'tenant' });
|
|
219
|
+
expect(env.firebase).toBeUndefined();
|
|
220
|
+
});
|
|
221
|
+
});
|
package/src/env/index.ts
CHANGED
|
@@ -15,6 +15,14 @@ export interface EnvProps {
|
|
|
15
15
|
zeno: string;
|
|
16
16
|
studio: string;
|
|
17
17
|
sts: string; // Security Token Service endpoint
|
|
18
|
+
/**
|
|
19
|
+
* Central Auth broker that issues the sign-in redirect and hosts `/logout`.
|
|
20
|
+
*
|
|
21
|
+
* Optional: when unset the session falls back to the long-standing broker, so an app that
|
|
22
|
+
* does not set it keeps its current behaviour exactly. Set it to move one environment at a
|
|
23
|
+
* time onto a different broker.
|
|
24
|
+
*/
|
|
25
|
+
auth?: string;
|
|
18
26
|
git?: string; // Smart HTTP app source git endpoint
|
|
19
27
|
mcp?: string;
|
|
20
28
|
/** Appgen app-gateway endpoint (serves live development previews and app bundles). */
|
|
@@ -26,7 +34,11 @@ export interface EnvProps {
|
|
|
26
34
|
projectId: string;
|
|
27
35
|
appId?: string;
|
|
28
36
|
providerType?: string;
|
|
37
|
+
/** Fixed Identity Platform tenant, preserved throughout sign-in. */
|
|
38
|
+
tenantId?: string;
|
|
29
39
|
};
|
|
40
|
+
/** Default workspace selection when the URL does not explicitly select an account or project. */
|
|
41
|
+
defaultAuthSelection?: { accountId?: string; projectId?: string };
|
|
30
42
|
region?: string;
|
|
31
43
|
datadogRum?: boolean;
|
|
32
44
|
datadogLogs?: boolean;
|
|
@@ -87,14 +99,68 @@ function injectedRuntimeConfig(): VertesiaRuntimeConfig | undefined {
|
|
|
87
99
|
return runtimeConfig;
|
|
88
100
|
}
|
|
89
101
|
|
|
102
|
+
/** Public build-time settings, for example Vite's import.meta.env. */
|
|
103
|
+
export type AppBuildEnvironment = Record<string, string | boolean | undefined>;
|
|
104
|
+
|
|
105
|
+
function buildRuntimeConfig(env?: AppBuildEnvironment): VertesiaRuntimeConfig | undefined {
|
|
106
|
+
if (!env) return undefined;
|
|
107
|
+
const value = (name: string) => (typeof env[name] === 'string' ? env[name].trim() : '');
|
|
108
|
+
const mode = value('VITE_AUTH_MODE');
|
|
109
|
+
if (mode && mode !== 'firebase' && mode !== 'central') {
|
|
110
|
+
throw new Error('VITE_AUTH_MODE must be firebase or central');
|
|
111
|
+
}
|
|
112
|
+
// Firebase build settings are only consumed after an explicit opt-in.
|
|
113
|
+
if (!mode) return undefined;
|
|
114
|
+
if (mode === 'central') return { authMode: 'central' };
|
|
115
|
+
const fields = {
|
|
116
|
+
apiKey: 'VITE_FIREBASE_API_KEY',
|
|
117
|
+
authDomain: 'VITE_FIREBASE_AUTH_DOMAIN',
|
|
118
|
+
projectId: 'VITE_FIREBASE_PROJECT_ID',
|
|
119
|
+
appId: 'VITE_FIREBASE_APP_ID',
|
|
120
|
+
};
|
|
121
|
+
const missing = Object.values(fields).filter((name) => !value(name));
|
|
122
|
+
if (missing.length) {
|
|
123
|
+
throw new Error(`Firebase authentication requires: ${missing.join(', ')}`);
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
authMode: 'firebase',
|
|
127
|
+
firebase: {
|
|
128
|
+
apiKey: value(fields.apiKey),
|
|
129
|
+
authDomain: value(fields.authDomain),
|
|
130
|
+
projectId: value(fields.projectId),
|
|
131
|
+
appId: value(fields.appId),
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
90
136
|
export class VertesiaEnvironment implements Readonly<EnvProps> {
|
|
91
137
|
constructor(private _props?: EnvProps | undefined) {}
|
|
92
138
|
|
|
93
|
-
init(props?: EnvProps) {
|
|
94
|
-
|
|
139
|
+
init(props?: EnvProps, buildEnv?: AppBuildEnvironment) {
|
|
140
|
+
// Host runtime configuration takes precedence over static deployment defaults.
|
|
141
|
+
const runtimeConfig = injectedRuntimeConfig() ?? buildRuntimeConfig(buildEnv);
|
|
95
142
|
const runtimeFirebase = runtimeConfig?.authMode === 'firebase' ? runtimeConfig.firebase : undefined;
|
|
96
143
|
this._props = props && runtimeFirebase && !props.firebase ? { ...props, firebase: runtimeFirebase } : props;
|
|
97
|
-
|
|
144
|
+
const tenantId =
|
|
145
|
+
typeof buildEnv?.VITE_FIREBASE_TENANT_ID === 'string' ? buildEnv.VITE_FIREBASE_TENANT_ID.trim() : '';
|
|
146
|
+
if (this._props?.firebase && tenantId && !this._props.firebase.tenantId) {
|
|
147
|
+
this._props = { ...this._props, firebase: { ...this._props.firebase, tenantId } };
|
|
148
|
+
}
|
|
149
|
+
if (this._props && this._props.defaultAuthSelection === undefined && buildEnv) {
|
|
150
|
+
const accountId =
|
|
151
|
+
typeof buildEnv.VITE_VERTESIA_ACCOUNT_ID === 'string'
|
|
152
|
+
? buildEnv.VITE_VERTESIA_ACCOUNT_ID.trim() || undefined
|
|
153
|
+
: undefined;
|
|
154
|
+
const projectId =
|
|
155
|
+
typeof buildEnv.VITE_VERTESIA_PROJECT_ID === 'string'
|
|
156
|
+
? buildEnv.VITE_VERTESIA_PROJECT_ID.trim() || undefined
|
|
157
|
+
: undefined;
|
|
158
|
+
if (accountId || projectId)
|
|
159
|
+
this._props = { ...this._props, defaultAuthSelection: { accountId, projectId } };
|
|
160
|
+
}
|
|
161
|
+
if (runtimeConfig && typeof window !== 'undefined' && window.AUTH_MODE === undefined) {
|
|
162
|
+
window.AUTH_MODE = runtimeConfig.authMode;
|
|
163
|
+
}
|
|
98
164
|
return this;
|
|
99
165
|
}
|
|
100
166
|
|
|
@@ -173,6 +239,10 @@ export class VertesiaEnvironment implements Readonly<EnvProps> {
|
|
|
173
239
|
return this._props?.devAuthToken;
|
|
174
240
|
}
|
|
175
241
|
|
|
242
|
+
get defaultAuthSelection() {
|
|
243
|
+
return this._props?.defaultAuthSelection;
|
|
244
|
+
}
|
|
245
|
+
|
|
176
246
|
get authTokenProvider() {
|
|
177
247
|
return this._props?.authTokenProvider;
|
|
178
248
|
}
|
|
@@ -39,6 +39,10 @@ function getExecutableProvider(provider: ExecutionEnvironmentRef['provider']): M
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export interface ScheduledWorkflowConfig {
|
|
42
|
+
run_as?: import('@vertesia/common').ScheduleRunAs;
|
|
43
|
+
/** Local datetime input; serialize as delegation_expires_at (ISO or null) for schedule requests. */
|
|
44
|
+
delegation_expiry_input?: string;
|
|
45
|
+
request_id?: string;
|
|
42
46
|
name: string;
|
|
43
47
|
description?: string;
|
|
44
48
|
cron_expression: string;
|
|
@@ -328,7 +332,12 @@ export class PayloadBuilder {
|
|
|
328
332
|
this._model_options = interaction.model_options as ModelOptions | undefined;
|
|
329
333
|
if (interaction.runtime?.environment) {
|
|
330
334
|
const envId = interaction.runtime.environment;
|
|
331
|
-
this.vertesia.environments
|
|
335
|
+
this.vertesia.environments
|
|
336
|
+
.retrieve(envId)
|
|
337
|
+
.then((environment) => (this.environment = environment))
|
|
338
|
+
.catch(() => {
|
|
339
|
+
this.environment = undefined;
|
|
340
|
+
});
|
|
332
341
|
}
|
|
333
342
|
}
|
|
334
343
|
this.onStateChanged();
|