windmill-components 1.613.5 → 1.623.2

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.
Files changed (254) hide show
  1. package/package/cancelable-promise-utils.js +4 -2
  2. package/package/components/ApiConnectForm.svelte +6 -0
  3. package/package/components/AppConnectDrawer.svelte +1 -0
  4. package/package/components/AppConnectInner.svelte +1 -0
  5. package/package/components/AuthSettings.svelte +3 -1
  6. package/package/components/BedrockCredentialsCheck.svelte +241 -0
  7. package/package/components/BedrockCredentialsCheck.svelte.d.ts +3 -0
  8. package/package/components/CenteredPage.svelte +2 -1
  9. package/package/components/CenteredPage.svelte.d.ts +1 -0
  10. package/package/components/CompareWorkspaces.svelte +74 -16
  11. package/package/components/DBManager.svelte +35 -31
  12. package/package/components/DBManager.svelte.d.ts +13 -3
  13. package/package/components/DBManagerContent.svelte +23 -62
  14. package/package/components/DBManagerContent.svelte.d.ts +37 -3
  15. package/package/components/DBManagerDrawer.svelte +7 -9
  16. package/package/components/DBTable.svelte +1 -1
  17. package/package/components/DBTable.svelte.d.ts +3 -1
  18. package/package/components/DBTableEditor.svelte +66 -49
  19. package/package/components/DBTableEditor.svelte.d.ts +1 -1
  20. package/package/components/DateInput.svelte +29 -35
  21. package/package/components/DateInput.svelte.d.ts +10 -11
  22. package/package/components/DedicatedWorkersSelector.svelte +569 -0
  23. package/package/components/DedicatedWorkersSelector.svelte.d.ts +8 -0
  24. package/package/components/DeployWorkspace.svelte +106 -29
  25. package/package/components/DropdownV2.svelte +2 -1
  26. package/package/components/DropdownV2.svelte.d.ts +1 -0
  27. package/package/components/Editor.svelte +1 -10
  28. package/package/components/FlowGraphViewer.svelte +5 -2
  29. package/package/components/FlowGraphViewer.svelte.d.ts +2 -0
  30. package/package/components/FlowLoopIterationPreview.svelte.d.ts +1 -1
  31. package/package/components/FlowPreviewContent.svelte.d.ts +1 -1
  32. package/package/components/FlowStatusViewerInner.svelte +6 -3
  33. package/package/components/ForkWorkspaceBanner.svelte +16 -0
  34. package/package/components/InfiniteList.svelte +27 -20
  35. package/package/components/InfiniteList.svelte.d.ts +2 -0
  36. package/package/components/JobLoader.svelte.d.ts +1 -1
  37. package/package/components/Login.svelte +6 -0
  38. package/package/components/NextcloudSetting.svelte +1 -1
  39. package/package/components/OAuthSetting.svelte +12 -23
  40. package/package/components/PocketIdSetting.svelte +82 -0
  41. package/package/components/PocketIdSetting.svelte.d.ts +6 -0
  42. package/package/components/ResourceEditor.svelte +4 -4
  43. package/package/components/ResourcePicker.svelte +1 -0
  44. package/package/components/RunForm.svelte +9 -17
  45. package/package/components/RunForm.svelte.d.ts +0 -1
  46. package/package/components/RunsPage.svelte +34 -0
  47. package/package/components/SavedInputsPicker.svelte +1 -1
  48. package/package/components/SavedInputsV2.svelte +35 -36
  49. package/package/components/Section.svelte +1 -1
  50. package/package/components/Star.svelte +8 -12
  51. package/package/components/Star.svelte.d.ts +6 -19
  52. package/package/components/StringTypeNarrowing.svelte.d.ts +1 -1
  53. package/package/components/TimeAgo.svelte +49 -7
  54. package/package/components/TimeAgo.svelte.d.ts +1 -0
  55. package/package/components/Toast.svelte +5 -1
  56. package/package/components/WorkerGroup.svelte +35 -20
  57. package/package/components/WorkerGroup.svelte.d.ts +1 -0
  58. package/package/components/apps/components/display/InsertRowDrawerButton.svelte +1 -1
  59. package/package/components/apps/components/display/dbtable/AppDbExplorer.svelte +2 -1
  60. package/package/components/apps/components/display/dbtable/dbFeatures.d.ts +9 -0
  61. package/package/components/apps/components/display/dbtable/dbFeatures.js +32 -0
  62. package/package/components/apps/components/display/dbtable/metadata.d.ts +3 -3
  63. package/package/components/apps/components/display/dbtable/metadata.js +120 -130
  64. package/package/components/apps/components/display/dbtable/queries/alterTable.js +13 -5
  65. package/package/components/apps/components/display/dbtable/queries/alterTable.test.js +1 -1
  66. package/package/components/apps/components/display/dbtable/queries/createTable.js +2 -0
  67. package/package/components/apps/components/display/dbtable/queries/relationalKeys.d.ts +1 -3
  68. package/package/components/apps/components/display/dbtable/queries/relationalKeys.js +41 -42
  69. package/package/components/apps/components/display/dbtable/tableEditor.js +18 -0
  70. package/package/components/apps/components/display/dbtable/utils.d.ts +1 -8
  71. package/package/components/apps/components/display/dbtable/utils.js +27 -34
  72. package/package/components/apps/components/display/table/AppAggridTable.svelte +8 -0
  73. package/package/components/apps/components/display/table/AppAggridTableActions.svelte +9 -9
  74. package/package/components/apps/components/display/table/AppAggridTableActions.svelte.d.ts +1 -1
  75. package/package/components/apps/components/inputs/AppMultiSelectV2.svelte +2 -4
  76. package/package/components/assets/AssetsDropdownButton.svelte +1 -1
  77. package/package/components/assets/AssetsUsageDrawer.svelte +98 -27
  78. package/package/components/assets/AssetsUsageDrawer.svelte.d.ts +5 -6
  79. package/package/components/assets/lib.d.ts +3 -2
  80. package/package/components/assets/lib.js +3 -1
  81. package/package/components/common/CloseButton.svelte +2 -1
  82. package/package/components/common/CloseButton.svelte.d.ts +1 -0
  83. package/package/components/common/badge/CountBadge.svelte +4 -3
  84. package/package/components/common/badge/CountBadge.svelte.d.ts +1 -0
  85. package/package/components/common/button/Button.svelte +1 -1
  86. package/package/components/common/confirmationModal/ConfirmationModal.svelte +2 -1
  87. package/package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +1 -0
  88. package/package/components/common/drawer/Drawer.svelte +4 -1
  89. package/package/components/common/drawer/DrawerContent.svelte +6 -3
  90. package/package/components/common/drawer/DrawerContent.svelte.d.ts +1 -0
  91. package/package/components/common/modal/Modal2.svelte +1 -0
  92. package/package/components/common/table/AppRow.svelte +4 -1
  93. package/package/components/common/table/FlowRow.svelte +4 -1
  94. package/package/components/common/table/RawAppRow.svelte +4 -1
  95. package/package/components/common/table/Row.svelte +11 -21
  96. package/package/components/common/table/Row.svelte.d.ts +4 -20
  97. package/package/components/common/table/RowIcon.svelte +6 -2
  98. package/package/components/common/table/RowIcon.svelte.d.ts +1 -1
  99. package/package/components/common/table/ScriptRow.svelte +4 -1
  100. package/package/components/copilot/autocomplete/Autocompletor.d.ts +1 -1
  101. package/package/components/copilot/autocomplete/Autocompletor.js +4 -4
  102. package/package/components/copilot/autocomplete/request.js +13 -9
  103. package/package/components/copilot/chat/script/core.js +5 -4
  104. package/package/components/copilot/lib.js +2 -9
  105. package/package/components/copilot/utils.d.ts +5 -0
  106. package/package/components/copilot/utils.js +8 -0
  107. package/package/components/dbOps.d.ts +1 -1
  108. package/package/components/dbOps.js +2 -2
  109. package/package/components/details/DetailPageHeader.svelte +21 -7
  110. package/package/components/details/DetailPageHeader.svelte.d.ts +2 -1
  111. package/package/components/details/DetailPageLayout.svelte +10 -1
  112. package/package/components/details/DetailPageLayout.svelte.d.ts +1 -0
  113. package/package/components/flows/conversations/FlowConversationsSidebar.svelte +79 -77
  114. package/package/components/flows/propPicker/OutputPickerInner.svelte.d.ts +1 -1
  115. package/package/components/graph/FlowGraphV2.svelte +7 -1
  116. package/package/components/graph/renderers/triggers/TriggersBadge.svelte +41 -24
  117. package/package/components/home/ItemsList.svelte +2 -1
  118. package/package/components/home/treeViewUtils.js +1 -1
  119. package/package/components/icons/NextcloudIcon.svelte +3 -2
  120. package/package/components/icons/NextcloudIcon.svelte.d.ts +2 -0
  121. package/package/components/icons/PocketIdIcon.svelte +9 -0
  122. package/package/components/icons/PocketIdIcon.svelte.d.ts +9 -0
  123. package/package/components/icons/index.js +3 -1
  124. package/package/components/instanceSettings.d.ts +1 -1
  125. package/package/components/instanceSettings.js +1 -0
  126. package/package/components/raw_apps/RawAppDataTableDrawer.svelte +1 -3
  127. package/package/components/raw_apps/datatableUtils.svelte.js +1 -1
  128. package/package/components/schema/EditableSchemaWrapper.svelte +2 -2
  129. package/package/components/select/MultiSelect.svelte +1 -1
  130. package/package/components/select/SelectDropdown.svelte +15 -3
  131. package/package/components/settings/ChangeWorkspaceId.svelte +8 -7
  132. package/package/components/settings/CreateToken.svelte +3 -3
  133. package/package/components/settings/WorkspaceUserSettings.svelte +6 -5
  134. package/package/components/sidebar/MenuButton.svelte +13 -5
  135. package/package/components/sidebar/MultiplayerMenu.svelte +2 -2
  136. package/package/components/sidebar/SidebarContent.svelte +32 -4
  137. package/package/components/sidebar/UserMenu.svelte +2 -2
  138. package/package/components/table/DataTable.svelte +6 -2
  139. package/package/components/table/DataTable.svelte.d.ts +1 -0
  140. package/package/components/triggers/AddTriggersButton.svelte +17 -4
  141. package/package/components/triggers/TriggersEditor.svelte +4 -0
  142. package/package/components/triggers/TriggersWrapper.svelte +14 -0
  143. package/package/components/triggers/native/NativeTriggerEditor.svelte +379 -0
  144. package/package/components/triggers/native/NativeTriggerEditor.svelte.d.ts +26 -0
  145. package/package/components/triggers/native/NativeTriggerTable.svelte +155 -0
  146. package/package/components/triggers/native/NativeTriggerTable.svelte.d.ts +16 -0
  147. package/package/components/triggers/native/NativeTriggersPanel.svelte +40 -0
  148. package/package/components/triggers/native/NativeTriggersPanel.svelte.d.ts +15 -0
  149. package/package/components/triggers/native/services/nextcloud/NextcloudTriggerForm.svelte +104 -0
  150. package/package/components/triggers/native/services/nextcloud/NextcloudTriggerForm.svelte.d.ts +18 -0
  151. package/package/components/triggers/native/utils.d.ts +74 -0
  152. package/package/components/triggers/native/utils.js +152 -0
  153. package/package/components/triggers/triggers.svelte.d.ts +2 -1
  154. package/package/components/triggers/triggers.svelte.js +36 -8
  155. package/package/components/triggers/utils.js +18 -5
  156. package/package/components/triggers.d.ts +1 -1
  157. package/package/components/workspaceSettings/AISettings.svelte +2 -1
  158. package/package/components/workspaceSettings/CustomInstanceDbSelect.svelte +1 -0
  159. package/package/components/workspaceSettings/CustomInstanceDbWizardModal.svelte +3 -1
  160. package/package/components/workspaceSettings/DataTableSettings.svelte +2 -1
  161. package/package/components/workspaceSettings/DucklakeSettings.svelte +8 -3
  162. package/package/components/workspaceSettings/OAuthClientConfig.svelte +180 -0
  163. package/package/components/workspaceSettings/OAuthClientConfig.svelte.d.ts +14 -0
  164. package/package/components/workspaceSettings/StorageSettings.svelte +7 -2
  165. package/package/components/workspaceSettings/WorkspaceIntegrations.svelte +302 -0
  166. package/package/components/workspaceSettings/WorkspaceIntegrations.svelte.d.ts +3 -0
  167. package/package/consts.js +0 -2
  168. package/package/gen/core/OpenAPI.js +1 -1
  169. package/package/gen/schemas.gen.d.ts +384 -3
  170. package/package/gen/schemas.gen.js +390 -3
  171. package/package/gen/services.gen.d.ts +200 -13
  172. package/package/gen/services.gen.js +383 -24
  173. package/package/gen/types.gen.d.ts +884 -94
  174. package/package/hub.js +2 -2
  175. package/package/hubPaths.json +1 -1
  176. package/package/refreshUser.d.ts +5 -1
  177. package/package/refreshUser.js +20 -30
  178. package/package/storeUtils.js +2 -0
  179. package/package/svelte5Utils.svelte.d.ts +61 -0
  180. package/package/svelte5Utils.svelte.js +170 -0
  181. package/package/utils.js +3 -0
  182. package/package.json +4 -6
  183. package/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +0 -2
  184. package/dist/sharedUtils/base.d.ts +0 -1
  185. package/dist/sharedUtils/cloud.d.ts +0 -1
  186. package/dist/sharedUtils/common.d.ts +0 -111
  187. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +0 -5
  188. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +0 -5
  189. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +0 -5
  190. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +0 -13
  191. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +0 -11
  192. package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +0 -95
  193. package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +0 -6
  194. package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +0 -7
  195. package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +0 -33
  196. package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +0 -10
  197. package/dist/sharedUtils/components/apps/editor/component/components.d.ts +0 -5371
  198. package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +0 -3
  199. package/dist/sharedUtils/components/apps/editor/component/index.d.ts +0 -3
  200. package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +0 -7
  201. package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +0 -3
  202. package/dist/sharedUtils/components/apps/gridUtils.d.ts +0 -14
  203. package/dist/sharedUtils/components/apps/inputType.d.ts +0 -178
  204. package/dist/sharedUtils/components/apps/rx.d.ts +0 -29
  205. package/dist/sharedUtils/components/apps/sharedTypes.d.ts +0 -21
  206. package/dist/sharedUtils/components/apps/types.d.ts +0 -274
  207. package/dist/sharedUtils/components/assets/lib.d.ts +0 -25
  208. package/dist/sharedUtils/components/common/alert/model.d.ts +0 -2
  209. package/dist/sharedUtils/components/common/badge/model.d.ts +0 -8
  210. package/dist/sharedUtils/components/common/button/model.d.ts +0 -45
  211. package/dist/sharedUtils/components/common/fileInput/model.d.ts +0 -1
  212. package/dist/sharedUtils/components/common/index.d.ts +0 -24
  213. package/dist/sharedUtils/components/common/skeleton/model.d.ts +0 -21
  214. package/dist/sharedUtils/components/dbTypes.d.ts +0 -14
  215. package/dist/sharedUtils/components/diff_drawer.d.ts +0 -26
  216. package/dist/sharedUtils/components/ducklake.d.ts +0 -1
  217. package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +0 -7
  218. package/dist/sharedUtils/components/icons/index.d.ts +0 -101
  219. package/dist/sharedUtils/components/random_positive_adjetive.d.ts +0 -1
  220. package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +0 -10
  221. package/dist/sharedUtils/components/raw_apps/utils.d.ts +0 -15
  222. package/dist/sharedUtils/components/triggers/email/utils.d.ts +0 -4
  223. package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +0 -2
  224. package/dist/sharedUtils/components/triggers/http/utils.d.ts +0 -11
  225. package/dist/sharedUtils/components/triggers/kafka/utils.d.ts +0 -2
  226. package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +0 -2
  227. package/dist/sharedUtils/components/triggers/nats/utils.d.ts +0 -2
  228. package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +0 -8
  229. package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +0 -2
  230. package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +0 -32
  231. package/dist/sharedUtils/components/triggers/utils.d.ts +0 -80
  232. package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +0 -2
  233. package/dist/sharedUtils/components/triggers.d.ts +0 -20
  234. package/dist/sharedUtils/gen/core/ApiError.d.ts +0 -10
  235. package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +0 -13
  236. package/dist/sharedUtils/gen/core/ApiResult.d.ts +0 -7
  237. package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +0 -26
  238. package/dist/sharedUtils/gen/core/OpenAPI.d.ts +0 -27
  239. package/dist/sharedUtils/gen/core/request.d.ts +0 -29
  240. package/dist/sharedUtils/gen/index.d.ts +0 -6
  241. package/dist/sharedUtils/gen/schemas.gen.d.ts +0 -7036
  242. package/dist/sharedUtils/gen/services.gen.d.ts +0 -6047
  243. package/dist/sharedUtils/gen/types.gen.d.ts +0 -21881
  244. package/dist/sharedUtils/history.svelte.d.ts +0 -9
  245. package/dist/sharedUtils/hub.d.ts +0 -49
  246. package/dist/sharedUtils/jsr.json +0 -6
  247. package/dist/sharedUtils/lib.d.ts +0 -5
  248. package/dist/sharedUtils/lib.es.js +0 -1588
  249. package/dist/sharedUtils/package.json +0 -12
  250. package/dist/sharedUtils/schema.d.ts +0 -3
  251. package/dist/sharedUtils/stores.d.ts +0 -97
  252. package/dist/sharedUtils/svelte5Utils.svelte.d.ts +0 -80
  253. package/dist/sharedUtils/toast.d.ts +0 -8
  254. package/dist/sharedUtils/utils.d.ts +0 -265
@@ -29,8 +29,10 @@ export var CancelablePromiseUtils;
29
29
  }
30
30
  CancelablePromiseUtils.map = map;
31
31
  function pipe(promise, f) {
32
- promise.then((value) => {
33
- f(value);
32
+ promise
33
+ .then((value) => f(value))
34
+ .catch(() => {
35
+ // we are just piping, ignore errors
34
36
  });
35
37
  return promise;
36
38
  }
@@ -11,6 +11,8 @@ import { Loader2 } from 'lucide-svelte';
11
11
  import { untrack } from 'svelte';
12
12
  import { base } from '../base';
13
13
  import GitHubAppIntegration from './GitHubAppIntegration.svelte';
14
+ import BedrockCredentialsCheck from './BedrockCredentialsCheck.svelte';
15
+ import { isCloudHosted } from '../cloud';
14
16
  let { resourceType, resourceTypeInfo, args = $bindable({}), linkedSecret = $bindable(undefined), isValid = $bindable(true), linkedSecretCandidates = undefined, description = $bindable(undefined) } = $props();
15
17
  let schema = $state(emptySchema());
16
18
  let notFound = $state(false);
@@ -117,6 +119,7 @@ $effect(() => {
117
119
  options={{
118
120
  right: 'As JSON'
119
121
  }}
122
+ class="as-json-toggle"
120
123
  />
121
124
  <TestConnection {resourceType} {args} />
122
125
  {#if resourceType == 'postgresql'}
@@ -181,6 +184,9 @@ $effect(() => {
181
184
  onDescriptionUpdate={(newDescription) => (description = newDescription)}
182
185
  />
183
186
  </div>
187
+ {#if resourceType?.includes('bedrock') && !isCloudHosted()}
188
+ <BedrockCredentialsCheck />
189
+ {/if}
184
190
  {:else}
185
191
  <p class="text-primary font-normal text-xs mb-4"
186
192
  >No corresponding resource type found in your workspace for {resourceType}. Define the value in
@@ -36,6 +36,7 @@ let darkMode = false;
36
36
  >
37
37
  <DrawerContent
38
38
  title="Add a resource"
39
+ id="add-resource-drawer"
39
40
  on:close={drawer.closeDrawer}
40
41
  tooltip="Resources represent connections to third party systems. Learn more on how to integrate external APIs."
41
42
  documentationLink="https://www.windmill.dev/docs/integrations/integrations_on_windmill"
@@ -470,6 +470,7 @@ let hubRtSync = usePromise(async () => {
470
470
  placeholder="Search resource type"
471
471
  bind:value={filter}
472
472
  class="text-2xl grow"
473
+ id="search-resource-type"
473
474
  />
474
475
  </div>
475
476
 
@@ -7,6 +7,7 @@ import KeycloakSetting from './KeycloakSetting.svelte';
7
7
  import CustomSso from './CustomSso.svelte';
8
8
  import AuthentikSetting from './AuthentikSetting.svelte';
9
9
  import AutheliaSetting from './AutheliaSetting.svelte';
10
+ import PocketIdSetting from './PocketIdSetting.svelte';
10
11
  import KanidmSetting from './KanidmSetting.svelte';
11
12
  import ZitadelSetting from './ZitadelSetting.svelte';
12
13
  import NextcloudSetting from './NextcloudSetting.svelte';
@@ -223,11 +224,12 @@ function generateOAuthDropdownItems() {
223
224
  <KeycloakSetting bind:value={oauths['keycloak']} />
224
225
  <AuthentikSetting bind:value={oauths['authentik']} />
225
226
  <AutheliaSetting bind:value={oauths['authelia']} />
227
+ <PocketIdSetting bind:value={oauths['pocketid']} />
226
228
  <KanidmSetting bind:value={oauths['kanidm']} />
227
229
  <ZitadelSetting bind:value={oauths['zitadel']} />
228
230
  <NextcloudSetting bind:value={oauths['nextcloud']} {baseUrl} />
229
231
  {#each Object.keys(oauths) as k}
230
- {#if !['authelia', 'authentik', 'google', 'microsoft', 'github', 'gitlab', 'jumpcloud', 'okta', 'auth0', 'keycloak', 'slack', 'kanidm', 'zitadel', 'nextcloud'].includes(k) && oauths[k] && 'login_config' in oauths[k]}
232
+ {#if !['authelia', 'authentik', 'google', 'microsoft', 'github', 'gitlab', 'jumpcloud', 'okta', 'auth0', 'keycloak', 'slack', 'kanidm', 'zitadel', 'nextcloud', 'pocketid'].includes(k) && oauths[k] && 'login_config' in oauths[k]}
231
233
  {#if oauths[k]}
232
234
  <div class="flex flex-col gap-2 pb-4">
233
235
  <div class="flex flex-row items-center gap-2">
@@ -0,0 +1,241 @@
1
+ <script lang="ts">import { JobService } from '../gen';
2
+ import { workspaceStore } from '../stores';
3
+ import { tryEvery } from '../utils';
4
+ import { Check, LoaderCircle, Server, X, Cpu } from 'lucide-svelte';
5
+ import Button from './common/button/Button.svelte';
6
+ let apiStatus = $state('idle');
7
+ let apiResult = $state(null);
8
+ let workerStatus = $state('idle');
9
+ let workerResult = $state(null);
10
+ let isChecking = $state(false);
11
+ async function checkApiCredentials() {
12
+ apiStatus = 'loading';
13
+ apiResult = null;
14
+ try {
15
+ const response = await fetch(`/api/w/${$workspaceStore}/ai/check_bedrock_credentials`);
16
+ if (!response.ok) {
17
+ throw new Error(`HTTP error: ${response.status}`);
18
+ }
19
+ apiResult = await response.json();
20
+ apiStatus = apiResult?.available ? 'success' : 'error';
21
+ }
22
+ catch (err) {
23
+ apiResult = {
24
+ available: false,
25
+ error: err instanceof Error ? err.message : 'Unknown error'
26
+ };
27
+ apiStatus = 'error';
28
+ }
29
+ }
30
+ async function checkWorkerCredentials() {
31
+ workerStatus = 'loading';
32
+ workerResult = null;
33
+ try {
34
+ // Create minimal flow with AI agent dry_run step
35
+ const flowValue = {
36
+ modules: [
37
+ {
38
+ id: 'a',
39
+ value: {
40
+ type: 'aiagent',
41
+ input_transforms: {
42
+ provider: {
43
+ type: 'static',
44
+ value: {
45
+ kind: 'aws_bedrock',
46
+ resource: {
47
+ api_key: 'dry_run_placeholder',
48
+ region: 'us-east-1'
49
+ },
50
+ model: 'dry_run_placeholder'
51
+ }
52
+ },
53
+ user_message: { type: 'static', value: 'dry_run_placeholder' },
54
+ output_type: { type: 'static', value: 'text' },
55
+ credentials_check: { type: 'static', value: true }
56
+ },
57
+ tools: []
58
+ }
59
+ }
60
+ ]
61
+ };
62
+ const job = await JobService.runFlowPreview({
63
+ workspace: $workspaceStore,
64
+ requestBody: {
65
+ value: flowValue,
66
+ args: {}
67
+ }
68
+ });
69
+ tryEvery({
70
+ tryCode: async () => {
71
+ const testResult = await JobService.getCompletedJob({
72
+ workspace: $workspaceStore,
73
+ id: job
74
+ });
75
+ if (testResult.success && testResult.result) {
76
+ const result = testResult.result;
77
+ if (result?.credentials_check && result?.credentials) {
78
+ workerResult = {
79
+ ...result.credentials,
80
+ source: 'worker_process',
81
+ worker: testResult.worker ?? undefined
82
+ };
83
+ workerStatus = workerResult.available ? 'success' : 'error';
84
+ }
85
+ else {
86
+ workerResult = {
87
+ available: false,
88
+ error: 'Unexpected response format',
89
+ worker: testResult.worker ?? undefined
90
+ };
91
+ workerStatus = 'error';
92
+ }
93
+ }
94
+ else {
95
+ workerResult = {
96
+ available: false,
97
+ error: testResult.result?.['error']?.['message'] ?? 'Job failed',
98
+ worker: testResult.worker ?? undefined
99
+ };
100
+ workerStatus = 'error';
101
+ }
102
+ },
103
+ timeoutCode: async () => {
104
+ workerResult = {
105
+ available: false,
106
+ error: 'Timeout: job did not complete within 10s'
107
+ };
108
+ workerStatus = 'error';
109
+ try {
110
+ await JobService.cancelQueuedJob({
111
+ workspace: $workspaceStore,
112
+ id: job,
113
+ requestBody: {
114
+ reason: 'Timeout checking Bedrock credentials'
115
+ }
116
+ });
117
+ }
118
+ catch (err) {
119
+ console.error(err);
120
+ }
121
+ },
122
+ interval: 500,
123
+ timeout: 10000
124
+ });
125
+ }
126
+ catch (err) {
127
+ workerResult = {
128
+ available: false,
129
+ error: err instanceof Error ? err.message : 'Unknown error'
130
+ };
131
+ workerStatus = 'error';
132
+ }
133
+ }
134
+ async function checkBoth() {
135
+ if (isChecking)
136
+ return;
137
+ isChecking = true;
138
+ try {
139
+ await Promise.all([checkApiCredentials(), checkWorkerCredentials()]);
140
+ }
141
+ finally {
142
+ isChecking = false;
143
+ }
144
+ }
145
+ </script>
146
+
147
+ <div class="flex flex-col gap-3 p-3 border rounded-md bg-surface-secondary">
148
+ <div class="flex items-center justify-between">
149
+ <h4 class="text-sm font-semibold">AWS Environment Credentials Check</h4>
150
+ <Button size="xs" variant="border" on:click={checkBoth} disabled={isChecking}>
151
+ {#if isChecking}
152
+ <LoaderCircle class="animate-spin mr-1.5 h-3.5 w-3.5" />
153
+ {/if}
154
+ Check Credentials
155
+ </Button>
156
+ </div>
157
+
158
+ <p class="text-xs text-secondary">
159
+ Check if AWS credentials are available from the environment. If available, you do not need to
160
+ configure credentials manually.
161
+ </p>
162
+
163
+ <div class="grid grid-cols-2 gap-3">
164
+ <!-- API Server Check -->
165
+ <div class="flex flex-col gap-1.5 p-2 border rounded bg-surface">
166
+ <div class="flex items-center gap-1.5 text-xs font-medium">
167
+ <Server class="h-3.5 w-3.5" />
168
+ <span>API Server</span>
169
+ {#if apiStatus === 'loading'}
170
+ <LoaderCircle class="animate-spin h-3.5 w-3.5 ml-auto text-blue-500" />
171
+ {:else if apiStatus === 'success'}
172
+ <Check class="h-3.5 w-3.5 ml-auto text-green-500" />
173
+ {:else if apiStatus === 'error'}
174
+ <X class="h-3.5 w-3.5 ml-auto text-red-500" />
175
+ {/if}
176
+ </div>
177
+
178
+ {#if apiResult}
179
+ <div class="text-xs">
180
+ {#if apiResult.available}
181
+ <div class="text-green-600 dark:text-green-400">
182
+ Available: {apiResult.access_key_id_prefix}
183
+ </div>
184
+ {#if apiResult.region}
185
+ <div class="text-secondary">Region: {apiResult.region}</div>
186
+ {/if}
187
+ {:else}
188
+ <div class="text-red-600 dark:text-red-400 break-words">
189
+ {apiResult.error ?? 'Not available'}
190
+ </div>
191
+ {/if}
192
+ </div>
193
+ {:else if apiStatus === 'idle'}
194
+ <div class="text-xs text-tertiary">Click "Check Credentials" to test</div>
195
+ {/if}
196
+ </div>
197
+
198
+ <!-- Worker Check -->
199
+ <div class="flex flex-col gap-1.5 p-2 border rounded bg-surface">
200
+ <div class="flex items-center gap-1.5 text-xs font-medium">
201
+ <Cpu class="h-3.5 w-3.5" />
202
+ <span>Worker</span>
203
+ {#if workerStatus === 'loading'}
204
+ <LoaderCircle class="animate-spin h-3.5 w-3.5 ml-auto text-blue-500" />
205
+ {:else if workerStatus === 'success'}
206
+ <Check class="h-3.5 w-3.5 ml-auto text-green-500" />
207
+ {:else if workerStatus === 'error'}
208
+ <X class="h-3.5 w-3.5 ml-auto text-red-500" />
209
+ {/if}
210
+ </div>
211
+
212
+ {#if workerResult}
213
+ <div class="text-xs">
214
+ {#if workerResult.available}
215
+ <div class="text-green-600 dark:text-green-400">
216
+ Available: {workerResult.access_key_id_prefix}
217
+ </div>
218
+ {#if workerResult.region}
219
+ <div class="text-secondary">Region: {workerResult.region}</div>
220
+ {/if}
221
+ {#if workerResult.source}
222
+ <div class="text-secondary">Source: {workerResult.source}</div>
223
+ {/if}
224
+ {#if workerResult.worker}
225
+ <div class="text-secondary">Worker: {workerResult.worker}</div>
226
+ {/if}
227
+ {:else}
228
+ <div class="text-red-600 dark:text-red-400 break-words">
229
+ {workerResult.error ?? 'Not available'}
230
+ </div>
231
+ {#if workerResult.worker}
232
+ <div class="text-secondary">Worker: {workerResult.worker}</div>
233
+ {/if}
234
+ {/if}
235
+ </div>
236
+ {:else if workerStatus === 'idle'}
237
+ <div class="text-xs text-tertiary">Click "Check Credentials" to test</div>
238
+ {/if}
239
+ </div>
240
+ </div>
241
+ </div>
@@ -0,0 +1,3 @@
1
+ declare const BedrockCredentialsCheck: import("svelte").Component<Record<string, never>, {}, "">;
2
+ type BedrockCredentialsCheck = ReturnType<typeof BedrockCredentialsCheck>;
3
+ export default BedrockCredentialsCheck;
@@ -1,11 +1,12 @@
1
1
  <script lang="ts">import { twMerge } from 'tailwind-merge';
2
- let { class: clazz = '', children, wrapperClasses = '', handleOverflow = true } = $props();
2
+ let { class: clazz = '', id, children, wrapperClasses = '', handleOverflow = true } = $props();
3
3
  let width = $state(0);
4
4
  </script>
5
5
 
6
6
  <div
7
7
  class={twMerge('pb-8', wrapperClasses, handleOverflow ? 'h-full overflow-y-auto' : '')}
8
8
  style={handleOverflow ? 'scrollbar-gutter: stable both-edges;' : ''}
9
+ {id}
9
10
  >
10
11
  <div class={twMerge('max-w-7xl mx-auto px-4 sm:px-6 md:px-8', clazz)} bind:clientWidth={width}
11
12
  >{@render children?.({ width })}</div
@@ -1,5 +1,6 @@
1
1
  interface Props {
2
2
  class?: string;
3
+ id?: string;
3
4
  children?: import('svelte').Snippet<[{
4
5
  width: number;
5
6
  }]>;
@@ -55,6 +55,10 @@ async function fetchSummary(kind, path, workspace) {
55
55
  const app = await AppService.getAppByPath({ workspace, path });
56
56
  return app.summary;
57
57
  }
58
+ else if (kind === 'folder') {
59
+ const folder = await FolderService.getFolder({ workspace, name: path.slice(2) });
60
+ return folder.summary;
61
+ }
58
62
  }
59
63
  catch (error) {
60
64
  console.error(`Failed to fetch summary for ${kind}:${path}`, error);
@@ -63,7 +67,7 @@ async function fetchSummary(kind, path, workspace) {
63
67
  }
64
68
  async function fetchSummaries(diffs) {
65
69
  // Only fetch summaries for scripts, flows, and apps
66
- const itemsToFetch = diffs.filter((diff) => ['script', 'flow', 'app'].includes(diff.kind));
70
+ const itemsToFetch = diffs.filter((diff) => ['script', 'flow', 'app', 'folder'].includes(diff.kind));
67
71
  for (const diff of itemsToFetch) {
68
72
  const key = getItemKey(diff);
69
73
  // Skip if already cached or loading
@@ -367,21 +371,70 @@ async function deploy(kind, path, workspaceToDeployTo, workspaceFrom) {
367
371
  path: path
368
372
  });
369
373
  if (alreadyExists) {
370
- await AppService.updateApp({
371
- workspace: workspaceToDeployTo,
372
- path: path,
373
- requestBody: {
374
- ...app
375
- }
376
- });
374
+ if (app.raw_app) {
375
+ const secret = await AppService.getPublicSecretOfLatestVersionOfApp({
376
+ workspace: workspaceFrom,
377
+ path: app.path
378
+ });
379
+ const js = await AppService.getRawAppData({
380
+ secretWithExtension: `${secret}.js`,
381
+ workspace: workspaceFrom
382
+ });
383
+ const css = await AppService.getRawAppData({
384
+ secretWithExtension: `${secret}.css`,
385
+ workspace: workspaceFrom
386
+ });
387
+ await AppService.updateAppRaw({
388
+ workspace: workspaceToDeployTo,
389
+ path: path,
390
+ formData: {
391
+ app,
392
+ css,
393
+ js
394
+ }
395
+ });
396
+ }
397
+ else {
398
+ await AppService.updateApp({
399
+ workspace: workspaceToDeployTo,
400
+ path: path,
401
+ requestBody: {
402
+ ...app
403
+ }
404
+ });
405
+ }
377
406
  }
378
407
  else {
379
- await AppService.createApp({
380
- workspace: workspaceToDeployTo,
381
- requestBody: {
382
- ...app
383
- }
384
- });
408
+ if (app.raw_app) {
409
+ const secret = await AppService.getPublicSecretOfLatestVersionOfApp({
410
+ workspace: workspaceFrom,
411
+ path: app.path
412
+ });
413
+ const js = await AppService.getRawAppData({
414
+ secretWithExtension: `${secret}.js`,
415
+ workspace: workspaceFrom
416
+ });
417
+ const css = await AppService.getRawAppData({
418
+ secretWithExtension: `${secret}.css`,
419
+ workspace: workspaceFrom
420
+ });
421
+ await AppService.createAppRaw({
422
+ workspace: workspaceToDeployTo,
423
+ formData: {
424
+ app,
425
+ css,
426
+ js
427
+ }
428
+ });
429
+ }
430
+ else {
431
+ await AppService.createApp({
432
+ workspace: workspaceToDeployTo,
433
+ requestBody: {
434
+ ...app
435
+ }
436
+ });
437
+ }
385
438
  }
386
439
  }
387
440
  else if (kind == 'variable') {
@@ -746,7 +799,8 @@ $effect(() => {
746
799
  This fork is ahead of its parent
747
800
  {/if}
748
801
  and some of the changes are not visible by you. Only a user with access to the whole context
749
- may deploy or update this fork. You can share the link to this page to someone with proper permissions to get it deployed.
802
+ may deploy or update this fork. You can share the link to this page to someone with proper permissions
803
+ to get it deployed.
750
804
  </Alert>
751
805
  {/if}
752
806
 
@@ -792,7 +846,11 @@ $effect(() => {
792
846
  disabled={!isSelectable}
793
847
  selected={isSelected && !(deploymentStatus[key]?.status == 'deployed')}
794
848
  onSelect={() => toggleItem(diff)}
795
- path={diff.kind != 'resource' && diff.kind != 'variable' ? diff.path : ''}
849
+ path={diff.kind != 'resource' &&
850
+ diff.kind != 'variable' &&
851
+ diff.kind != 'resource_type'
852
+ ? diff.path
853
+ : ''}
796
854
  marked={undefined}
797
855
  kind={diff.kind}
798
856
  canFavorite={false}
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">import {} from '../stores';
2
- import { ChevronDownIcon, EditIcon, Loader2, MoreVertical, Plus, Table2, Trash2Icon } from 'lucide-svelte';
2
+ import { ChevronDownIcon, EditIcon, Loader2, Plus, Table2, Trash2Icon } from 'lucide-svelte';
3
3
  import { Pane, Splitpanes } from 'svelte-splitpanes';
4
4
  import { ClearableInput, Drawer, DrawerContent } from './common';
5
5
  import { sendUserToast } from '../toast';
@@ -14,8 +14,8 @@ import Select from './select/Select.svelte';
14
14
  import { safeSelectItems } from './select/utils.svelte';
15
15
  import { dbSupportsTransactionalDdl, diffTableEditorValues } from './apps/components/display/dbtable/queries/alterTable';
16
16
  import { resource } from 'runed';
17
- import { capitalize, pluralize } from '../utils';
18
- let { dbType, dbSchema, dbTableOpsFactory, dbSchemaOps, getColDefs, dbSupportsSchemas, refresh, initialSchemaKey, initialTableKey, selectedSchemaKey = $bindable(undefined), selectedTableKey = $bindable(undefined), dbSelector, multiSelectMode = false, selectedTables = $bindable([]), disabledTables = [], features } = $props();
17
+ import { capitalize, onlyAlphaNumAndUnderscore, pluralize } from '../utils';
18
+ let { dbType, dbSchema, dbTableOpsFactory, dbSchemaOps, dbSupportsSchemas, colDefs, refresh, initialSchemaKey, initialTableKey, selectedSchemaKey = $bindable(undefined), selectedTableKey = $bindable(undefined), dbSelector, multiSelectMode = false, selectedTables = $bindable([]), disabledTables = [], features } = $props();
19
19
  // Helper to check if a table is selected in multi-select mode
20
20
  function isTableSelected(schema, table) {
21
21
  return selectedTables.some((t) => t.schema === schema && t.table === table);
@@ -125,24 +125,31 @@ let askingForConfirmation = $state();
125
125
  let dbTableEditorState = $state({
126
126
  open: false
127
127
  });
128
- let dbTableEditorAlterTableData = resource(() => dbTableEditorState.alterTableKey, async (table) => {
128
+ let dbTableEditorAlterTableData = resource([() => dbTableEditorState.alterTableKey, () => colDefs], async ([table]) => {
129
129
  if (!table)
130
130
  return;
131
131
  let tableKey2 = dbSupportsSchemas && selected.schemaKey ? `${selected.schemaKey}.${table}` : table;
132
+ if (!colDefs?.[tableKey2])
133
+ return;
132
134
  return await dbSchemaOps.onFetchTableEditorDefinition({
133
135
  table: table,
134
136
  schema: selected.schemaKey,
135
- getColDefs: () => getColDefs(tableKey2)
137
+ colDefs: colDefs[tableKey2]
136
138
  });
137
139
  });
138
140
  let newSchemaDialogOpen = $state(false);
139
141
  let newSchemaName = $state('');
140
142
  // Check if the sanitized schema name already exists
141
- const sanitizedNewSchemaName = $derived(newSchemaName
142
- .trim()
143
- .toLowerCase()
144
- .replace(/[^a-zA-Z0-9_]/g, ''));
145
- const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys.includes(sanitizedNewSchemaName));
143
+ const sanitizedNewSchemaName = $derived.by(() => {
144
+ let s = newSchemaName.trim().replace(/[^a-zA-Z0-9_]/g, '');
145
+ if (dbType === 'snowflake')
146
+ s = s.toUpperCase();
147
+ return s;
148
+ });
149
+ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' &&
150
+ schemaKeys.map((s) => s.toLowerCase()).includes(sanitizedNewSchemaName.toLowerCase()));
151
+ let _dbTable = $state();
152
+ export const dbTable = () => _dbTable;
146
153
  </script>
147
154
 
148
155
  <Splitpanes>
@@ -155,20 +162,20 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
155
162
  <Select
156
163
  bind:value={selected.schemaKey}
157
164
  items={safeSelectItems(schemaKeys)}
165
+ id="db-schema-select"
158
166
  transformInputSelectedText={(s) => `Schema: ${s}`}
159
167
  RightIcon={ChevronDownIcon}
160
168
  placeholder="Search or create schema..."
161
169
  showPlaceholderOnOpen
162
170
  onCreateItem={(schema) => {
163
- schema = schema
164
- .trim()
165
- .toLowerCase()
166
- .replace(/[^a-zA-Z0-9_]/g, '')
171
+ schema = schema.trim().replace(/[^a-zA-Z0-9_]/g, '')
172
+ if (dbType === 'snowflake') schema = schema.toUpperCase()
167
173
  askingForConfirmation = {
168
174
  confirmationText: `Create ${schema}`,
169
175
  type: 'reload',
170
176
  title: `This will run 'CREATE SCHEMA ${schema}' on your database. Are you sure ?`,
171
177
  open: true,
178
+ id: 'db-create-schema-confirmation-modal',
172
179
  onConfirm: async () => {
173
180
  askingForConfirmation && (askingForConfirmation.loading = true)
174
181
  try {
@@ -359,7 +366,10 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
359
366
  onclick={() => (selected.tableKey = tableKey)}
360
367
  >
361
368
  <Table2 class="text-primary shrink-0" size={16} />
362
- <p class="truncate text-ellipsis grow text-left text-emphasis text-xs">{tableKey}</p>
369
+ <p
370
+ class="db-manager-table-key truncate text-ellipsis grow text-left text-emphasis text-xs"
371
+ >{tableKey}</p
372
+ >
363
373
  <DropdownV2
364
374
  items={() => [
365
375
  {
@@ -370,6 +380,7 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
370
380
  title: `Are you sure you want to delete ${tableKey} ? This action is irreversible`,
371
381
  confirmationText: 'Delete permanently',
372
382
  open: true,
383
+ id: 'db-manager-delete-table-confirmation-modal',
373
384
  onConfirm: async () => {
374
385
  askingForConfirmation && (askingForConfirmation.loading = true)
375
386
  try {
@@ -397,14 +408,8 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
397
408
  }
398
409
  ]}
399
410
  class="w-fit"
400
- >
401
- <svelte:fragment slot="buttonReplacement">
402
- <MoreVertical
403
- size={8}
404
- class="w-8 h-8 p-2 hover:bg-surface-hover cursor-pointer rounded-md"
405
- />
406
- </svelte:fragment>
407
- </DropdownV2>
411
+ btnId={'db-manager-table-actions-' + onlyAlphaNumAndUnderscore(tableKey)}
412
+ />
408
413
  </button>
409
414
  {/each}
410
415
  {/if}
@@ -421,13 +426,9 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
421
426
  {/if}
422
427
  </Pane>
423
428
  <Pane class="p-3 pt-1">
424
- {#if tableKey}
425
- {#await getColDefs(tableKey) then colDefs}
426
- {#if colDefs && colDefs?.length}
427
- {@const dbTableOps = dbTableOpsFactory({ colDefs, tableKey })}
428
- <DBTable {dbTableOps} />
429
- {/if}
430
- {/await}
429
+ {#if tableKey && colDefs?.[tableKey]?.length}
430
+ {@const dbTableOps = dbTableOpsFactory({ colDefs: colDefs[tableKey], tableKey })}
431
+ <DBTable {dbTableOps} bind:this={_dbTable} />
431
432
  {/if}
432
433
  </Pane>
433
434
  </Splitpanes>
@@ -446,6 +447,7 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
446
447
  on:close={() => (dbTableEditorState = { open: false })}
447
448
  >
448
449
  <DrawerContent
450
+ id="db-table-editor-drawer"
449
451
  on:close={() => (dbTableEditorState = { open: false })}
450
452
  title={dbTableEditorState.alterTableKey
451
453
  ? `Alter ${dbTableEditorState.alterTableKey}`
@@ -510,7 +512,7 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
510
512
  }
511
513
  }}
512
514
  />
513
- {:else if dbTableEditorAlterTableData.loading}
515
+ {:else if dbTableEditorAlterTableData.loading || !colDefs}
514
516
  <Loader2 class="animate-spin" size={32} />
515
517
  {:else}
516
518
  <p class="text-sm text-tertiary">Failed to load table definition.</p>
@@ -551,6 +553,7 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
551
553
  type: 'reload',
552
554
  title: `This will run 'CREATE SCHEMA ${sanitizedNewSchemaName}' on your database. Are you sure?`,
553
555
  open: true,
556
+ id: 'db-create-schema-confirmation-modal',
554
557
  onConfirm: async () => {
555
558
  askingForConfirmation && (askingForConfirmation.loading = true)
556
559
  try {
@@ -588,6 +591,7 @@ const schemaAlreadyExists = $derived(sanitizedNewSchemaName !== '' && schemaKeys
588
591
  type: 'reload',
589
592
  title: `This will run 'CREATE SCHEMA ${sanitizedNewSchemaName}' on your database. Are you sure?`,
590
593
  open: true,
594
+ id: 'db-create-schema-confirmation-modal',
591
595
  onConfirm: async () => {
592
596
  askingForConfirmation && (askingForConfirmation.loading = true)
593
597
  try {