diff --git a/docker/entrypoint-extra.sh b/docker/entrypoint-extra.sh index eedd169a31..141a148771 100644 --- a/docker/entrypoint-extra.sh +++ b/docker/entrypoint-extra.sh @@ -36,7 +36,7 @@ fi # Setup Monaco temp directory for LSP mkdir -p /tmp/monaco if [ ! -f /tmp/monaco/go.mod ]; then - echo -e "module mymod\ngo 1.26" > /tmp/monaco/go.mod + echo -e "module mymod\ngo 1.25" > /tmp/monaco/go.mod fi echo "[entrypoint] Starting Windmill Extra Services" diff --git a/frontend/.vscode/settings.json b/frontend/.vscode/settings.json index bba9566a9a..3fa6fab23f 100644 --- a/frontend/.vscode/settings.json +++ b/frontend/.vscode/settings.json @@ -5,4 +5,4 @@ "onAutoForward": "openPreview" } } -} +} \ No newline at end of file diff --git a/frontend/res.json b/frontend/res.json index fd10281324..4c89aae894 100644 --- a/frontend/res.json +++ b/frontend/res.json @@ -1 +1 @@ -{ "started": true, "success": true, "completed": true, "result": "" } +{"started":true,"success":true,"completed":true,"result":""} \ No newline at end of file diff --git a/frontend/scripts/untar_ui_builder.js b/frontend/scripts/untar_ui_builder.js index 3a7d546904..0991589025 100644 --- a/frontend/scripts/untar_ui_builder.js +++ b/frontend/scripts/untar_ui_builder.js @@ -1,20 +1,22 @@ import path from 'path' import fs from 'fs' + // Check if we're in node_modules (installed as dependency) if (process.cwd().includes('node_modules')) { - console.log('Skipping postinstall - running as dependency') - process.exit(0) + console.log('Skipping postinstall - running as dependency'); + process.exit(0); } // Check if we're in the root project if (process.env.INIT_CWD && process.env.INIT_CWD !== process.cwd()) { - console.log('Skipping postinstall - not root project') - process.exit(0) + console.log('Skipping postinstall - not root project'); + process.exit(0); } // Your actual postinstall logic here -console.log('Running postinstall for root project') +console.log('Running postinstall for root project'); + import { x } from 'tar' @@ -33,6 +35,7 @@ const response = await fetch(tarUrl) const buffer = await response.arrayBuffer() await fs.promises.writeFile(outputTarPath, Buffer.from(buffer)) + // Create extract directory if it doesn't exist try { await fs.promises.mkdir(extractTo, { recursive: true }) diff --git a/frontend/src/lib/cloud.ts b/frontend/src/lib/cloud.ts index cc6319127a..a684153e7a 100644 --- a/frontend/src/lib/cloud.ts +++ b/frontend/src/lib/cloud.ts @@ -2,4 +2,4 @@ import { BROWSER } from 'esm-env' export function isCloudHosted(): boolean { return BROWSER && window.location.hostname == 'app.windmill.dev' -} +} \ No newline at end of file diff --git a/frontend/src/lib/components/apps/components/buttons/index.ts b/frontend/src/lib/components/apps/components/buttons/index.ts index 282a895a56..c192b70b75 100644 --- a/frontend/src/lib/components/apps/components/buttons/index.ts +++ b/frontend/src/lib/components/apps/components/buttons/index.ts @@ -1,3 +1,3 @@ export { default as AppButton } from './AppButton.svelte' export { default as AppForm } from './AppForm.svelte' -export { default as AppFormButton } from './AppFormButton.svelte' +export { default as AppFormButton } from './AppFormButton.svelte' \ No newline at end of file diff --git a/frontend/src/lib/components/apps/editor/appDeploy.svelte.ts b/frontend/src/lib/components/apps/editor/appDeploy.svelte.ts index f799cb864a..122c42bcf9 100644 --- a/frontend/src/lib/components/apps/editor/appDeploy.svelte.ts +++ b/frontend/src/lib/components/apps/editor/appDeploy.svelte.ts @@ -1,7 +1,7 @@ -import { base } from '$lib/base' -import { workspaceStore } from '$lib/stores' -import { get } from 'svelte/store' +import { base } from "$lib/base" +import { workspaceStore } from "$lib/stores" +import { get } from "svelte/store" export function computeSecretUrl(secretUrl: string) { - return `${window.location.origin}${base}/public/${get(workspaceStore)}/${secretUrl}` + return `${window.location.origin}${base}/public/${get(workspaceStore)}/${secretUrl}` } diff --git a/frontend/src/lib/components/apps/editor/component/default-codes.ts b/frontend/src/lib/components/apps/editor/component/default-codes.ts index c9a3b77c16..6a00a47cd9 100644 --- a/frontend/src/lib/components/apps/editor/component/default-codes.ts +++ b/frontend/src/lib/components/apps/editor/component/default-codes.ts @@ -24,7 +24,7 @@ export const DEFAULT_CODES: Partial< | 'snowflake' | 'mssql' | 'bigquery' - | 'oracledb', + | 'oracledb', string > > diff --git a/frontend/src/lib/components/apps/gridUtils.ts b/frontend/src/lib/components/apps/gridUtils.ts index 3682f93782..5944755ffa 100644 --- a/frontend/src/lib/components/apps/gridUtils.ts +++ b/frontend/src/lib/components/apps/gridUtils.ts @@ -10,6 +10,7 @@ const Breakpoints = { export const moveMode = writable<'move' | 'insert'>('move') + const WIDE_GRID_COLUMNS = 12 as const const NARROW_GRID_COLUMNS = 3 as const diff --git a/frontend/src/lib/components/apps/svelte-grid/utils/container.ts b/frontend/src/lib/components/apps/svelte-grid/utils/container.ts index d3d7d1d7b1..7139bc407d 100644 --- a/frontend/src/lib/components/apps/svelte-grid/utils/container.ts +++ b/frontend/src/lib/components/apps/svelte-grid/utils/container.ts @@ -1,5 +1,5 @@ -import { getRowsCount } from './other' +import { getRowsCount } from "./other"; export function getContainerHeight(items, yPerPx, cols) { - return getRowsCount(items, cols) * yPerPx + return getRowsCount(items, cols) * yPerPx; } diff --git a/frontend/src/lib/components/common/confirmationModal/unsavedTypes.ts b/frontend/src/lib/components/common/confirmationModal/unsavedTypes.ts index c3331b474a..72eef2c22e 100644 --- a/frontend/src/lib/components/common/confirmationModal/unsavedTypes.ts +++ b/frontend/src/lib/components/common/confirmationModal/unsavedTypes.ts @@ -1,8 +1,8 @@ -import type { Value } from '$lib/utils' +import type { Value } from "$lib/utils" export type GetInitialAndModifiedValues = (() => SavedAndModifiedValue) | undefined export type SavedAndModifiedValue = { - savedValue: Value | undefined - modifiedValue: Value | undefined -} + savedValue: Value | undefined + modifiedValue: Value | undefined +} \ No newline at end of file diff --git a/frontend/src/lib/components/common/contextmenu/contextMenuStyles.ts b/frontend/src/lib/components/common/contextmenu/contextMenuStyles.ts index 4102b8916d..ecbe6c6f87 100644 --- a/frontend/src/lib/components/common/contextmenu/contextMenuStyles.ts +++ b/frontend/src/lib/components/common/contextmenu/contextMenuStyles.ts @@ -42,3 +42,4 @@ export const CONTEXT_MENU_DIVIDER_CLASS = 'my-1 h-px bg-border-light' */ export const CONTEXT_MENU_ANIMATION_CLASSES = 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2' + diff --git a/frontend/src/lib/components/copilot/chat/api/core.ts b/frontend/src/lib/components/copilot/chat/api/core.ts index 7836183992..4e47baea72 100644 --- a/frontend/src/lib/components/copilot/chat/api/core.ts +++ b/frontend/src/lib/components/copilot/chat/api/core.ts @@ -8,7 +8,7 @@ import { getDocumentationTool } from '../navigator/core' import { userStore } from '$lib/stores' import { get } from 'svelte/store' -export const CHAT_SYSTEM_PROMPT = (username: string) => ` +export const CHAT_SYSTEM_PROMPT = (username: string) =>` You are Windmill's intelligent assistant, designed to interact with the platform via API endpoints and answer questions about its functionality. Your purpose is to help the user directly query and manipulate Windmill resources through API calls. Windmill is an open-source developer platform for building internal tools, API integrations, background jobs, workflows, and user interfaces. It offers a unified system where scripts are automatically turned into sharable UIs and can be composed into flows or embedded in custom applications. @@ -76,4 +76,4 @@ export function prepareApiUserMessage(instructions: string): ChatCompletionUserM role: 'user', content: instructions } -} +} \ No newline at end of file diff --git a/frontend/src/lib/components/copilot/utils.ts b/frontend/src/lib/components/copilot/utils.ts index 5318b602e5..8e5150cda6 100644 --- a/frontend/src/lib/components/copilot/utils.ts +++ b/frontend/src/lib/components/copilot/utils.ts @@ -177,3 +177,4 @@ export function supportsAutocomplete(model: string): boolean { const lower = model.toLowerCase() return lower.includes('codestral') && !lower.includes('embed') } + diff --git a/frontend/src/lib/components/diff_drawer.ts b/frontend/src/lib/components/diff_drawer.ts index 35bd31ab19..108eddf8fc 100644 --- a/frontend/src/lib/components/diff_drawer.ts +++ b/frontend/src/lib/components/diff_drawer.ts @@ -1,24 +1,24 @@ -import type { Value } from '$lib/utils' +import type { Value } from "$lib/utils" -export type DiffDrawerDiff = - | { - mode: 'normal' - deployed: Value - draft: Value | undefined - current: Value - defaultDiffType?: 'deployed' | 'draft' - button?: { text: string; onClick: () => void } - } - | { - mode: 'simple' - original: Value - current: Value - title: string - button?: { text: string; onClick: () => void } - } +export type DiffDrawerDiff = +| { + mode: 'normal' + deployed: Value + draft: Value | undefined + current: Value + defaultDiffType?: 'deployed' | 'draft' + button?: { text: string; onClick: () => void } +} +| { + mode: 'simple' + original: Value + current: Value + title: string + button?: { text: string; onClick: () => void } +} export interface DiffDrawerI { - openDrawer: () => void - closeDrawer: () => void - setDiff: (diff: DiffDrawerDiff) => void -} + openDrawer: () => void + closeDrawer: () => void + setDiff: (diff: DiffDrawerDiff) => void +} \ No newline at end of file diff --git a/frontend/src/lib/components/flow_builder.ts b/frontend/src/lib/components/flow_builder.ts index 396089f473..d847664fa7 100644 --- a/frontend/src/lib/components/flow_builder.ts +++ b/frontend/src/lib/components/flow_builder.ts @@ -8,44 +8,44 @@ import type { ScheduleTrigger } from './triggers' import type { stepState } from './stepHistoryLoader.svelte' export type FlowBuilderProps = { - initialPath?: string - pathStoreInit?: string | undefined - newFlow: boolean - selectedId: string | undefined - initialArgs?: Record - loading?: boolean - flowStore: StateStore - flowStateStore: StateStore - savedFlow?: FlowWithDraftAndDraftTriggers | undefined - diffDrawer?: DiffDrawerI | undefined - customUi?: FlowBuilderWhitelabelCustomUi - disableAi?: boolean - disabledFlowInputs?: boolean - savedPrimarySchedule?: ScheduleTrigger | undefined // used to set the primary schedule in the legacy primaryScheduleStore - version?: number | undefined - setSavedraftCb?: ((cb: () => void) => void) | undefined - draftTriggersFromUrl?: Trigger[] | undefined - selectedTriggerIndexFromUrl?: number | undefined - children?: import('svelte').Snippet - loadedFromHistoryFromUrl?: { - flowJobInitial: boolean | undefined - stepsState: Record - } - noInitial?: boolean - onSaveInitial?: ({ path, id }: { path: string; id: string }) => void - onSaveDraft?: ({ - path, - savedAtNewPath, - newFlow - }: { - path: string - savedAtNewPath: boolean - newFlow: boolean - }) => void - onSaveDraftError?: ({ error }: { error: any }) => void - onSaveDraftOnlyAtNewPath?: ({ path, selectedId }: { path: string; selectedId: string }) => void - onDeploy?: ({ path }: { path: string }) => void - onDeployError?: ({ error }: { error: any }) => void - onDetails?: ({ path }: { path: string }) => void - onHistoryRestore?: () => void + initialPath?: string + pathStoreInit?: string | undefined + newFlow: boolean + selectedId: string | undefined + initialArgs?: Record + loading?: boolean + flowStore: StateStore + flowStateStore: StateStore + savedFlow?: FlowWithDraftAndDraftTriggers | undefined + diffDrawer?: DiffDrawerI | undefined + customUi?: FlowBuilderWhitelabelCustomUi + disableAi?: boolean + disabledFlowInputs?: boolean + savedPrimarySchedule?: ScheduleTrigger | undefined // used to set the primary schedule in the legacy primaryScheduleStore + version?: number | undefined + setSavedraftCb?: ((cb: () => void) => void) | undefined + draftTriggersFromUrl?: Trigger[] | undefined + selectedTriggerIndexFromUrl?: number | undefined + children?: import('svelte').Snippet + loadedFromHistoryFromUrl?: { + flowJobInitial: boolean | undefined + stepsState: Record + } + noInitial?: boolean + onSaveInitial?: ({ path, id }: { path: string; id: string }) => void + onSaveDraft?: ({ + path, + savedAtNewPath, + newFlow + }: { + path: string + savedAtNewPath: boolean + newFlow: boolean + }) => void + onSaveDraftError?: ({ error }: { error: any }) => void + onSaveDraftOnlyAtNewPath?: ({ path, selectedId }: { path: string; selectedId: string }) => void + onDeploy?: ({ path }: { path: string }) => void + onDeployError?: ({ error }: { error: any }) => void + onDetails?: ({ path }: { path: string }) => void + onHistoryRestore?: () => void } diff --git a/frontend/src/lib/components/flows/content/s3Scripts/deno.ts b/frontend/src/lib/components/flows/content/s3Scripts/deno.ts index be05a160a9..ba21426ebb 100644 --- a/frontend/src/lib/components/flows/content/s3Scripts/deno.ts +++ b/frontend/src/lib/components/flows/content/s3Scripts/deno.ts @@ -1,5 +1,5 @@ const deno = { - s3_client: `import type { S3Object } from "npm:windmill-client@${__pkg__.version}"; + s3_client: `import type { S3Object } from "npm:windmill-client@${__pkg__.version}"; import * as wmill from "npm:windmill-client@${__pkg__.version}"; import { S3Client } from "https://deno.land/x/s3_lite_client@0.2.0/mod.ts"; diff --git a/frontend/src/lib/components/flows/pickers/model.ts b/frontend/src/lib/components/flows/pickers/model.ts index d055139c1e..a0599ea1ce 100644 --- a/frontend/src/lib/components/flows/pickers/model.ts +++ b/frontend/src/lib/components/flows/pickers/model.ts @@ -1,5 +1,5 @@ export interface HubItem { - app: string + app: string; summary: string path: string version?: string diff --git a/frontend/src/lib/components/jobs/utils.ts b/frontend/src/lib/components/jobs/utils.ts index 8c097f137a..294df7c3ff 100644 --- a/frontend/src/lib/components/jobs/utils.ts +++ b/frontend/src/lib/components/jobs/utils.ts @@ -15,7 +15,7 @@ type RunScriptOptions = { * @function runScript * @param {RunScriptPreviewData | RunScriptByPathData} data - Data for running the script. * @returns {Promise} A UUID representing the running script. - * + * * @example * const uuid = await runScript(data) */ @@ -36,7 +36,7 @@ export async function runScript(data: RunScriptPreviewData | RunScriptByPathData * @param {string} workspace - Workspace identifier. * @param {RunScriptOptions} [options] - Optional settings like retries and job data inclusion. * @returns {Promise} Final job result or throws error if it fails. - * + * * @example * const result = await pollJobResult(uuid, 'my-workspace', { maxRetries: 5, withJobData: true }); */ diff --git a/frontend/src/lib/components/scriptBuilder.ts b/frontend/src/lib/components/scriptBuilder.ts index a7fa1e9a97..a93dae9d97 100644 --- a/frontend/src/lib/components/scriptBuilder.ts +++ b/frontend/src/lib/components/scriptBuilder.ts @@ -1,8 +1,8 @@ -import type { Script } from '$lib/gen' +import type { Script } from "$lib/gen" export type ScriptBuilderFunctionExports = { - setPreviewArgs: (args: Record) => void - runPreview: () => Promise - setCode: (code: string, language?: Script['language']) => void - getCode: () => string -} + setPreviewArgs: (args: Record) => void + runPreview: () => Promise + setCode: (code: string, language?: Script["language"]) => void + getCode: () => string +} \ No newline at end of file diff --git a/frontend/src/lib/components/sidebar/changelogs.ts b/frontend/src/lib/components/sidebar/changelogs.ts index ed3237f926..80851e64ec 100644 --- a/frontend/src/lib/components/sidebar/changelogs.ts +++ b/frontend/src/lib/components/sidebar/changelogs.ts @@ -384,4 +384,4 @@ const changelogs: Changelog[] = [ } ] -export { changelogs } +export { changelogs } \ No newline at end of file diff --git a/frontend/src/lib/components/sidebar/settings.ts b/frontend/src/lib/components/sidebar/settings.ts index eb83444eea..99eaa31e22 100644 --- a/frontend/src/lib/components/sidebar/settings.ts +++ b/frontend/src/lib/components/sidebar/settings.ts @@ -1,2 +1,2 @@ -export const USER_SETTINGS_HASH = '#user-settings' as const -export const SUPERADMIN_SETTINGS_HASH = '#superadmin-settings' as const +export const USER_SETTINGS_HASH = '#user-settings' as const; +export const SUPERADMIN_SETTINGS_HASH = '#superadmin-settings' as const; \ No newline at end of file diff --git a/frontend/src/lib/components/triggers/scheduled/utils.ts b/frontend/src/lib/components/triggers/scheduled/utils.ts index cd0dc5948e..a0a1b8daad 100644 --- a/frontend/src/lib/components/triggers/scheduled/utils.ts +++ b/frontend/src/lib/components/triggers/scheduled/utils.ts @@ -1,33 +1,33 @@ -import { JobService, ScheduleService } from '$lib/gen' -import { sendUserToast } from '$lib/utils' +import { JobService, ScheduleService } from "$lib/gen" +import { sendUserToast } from "$lib/utils" export async function runScheduleNow( - path: string, - schedulePath: string, - isFlow: boolean, - workspace_id: string + path: string, + schedulePath: string, + isFlow: boolean, + workspace_id: string ): Promise { - try { - const runByPath = isFlow ? JobService.runFlowByPath : JobService.runScriptByPath - const args = ( - await ScheduleService.getSchedule({ - workspace: workspace_id, - path: schedulePath - }) - ).args - const run = await runByPath({ - path, - requestBody: args ?? {}, - workspace: workspace_id - }) + try { + const runByPath = isFlow ? JobService.runFlowByPath : JobService.runScriptByPath + const args = ( + await ScheduleService.getSchedule({ + workspace: workspace_id, + path: schedulePath + }) + ).args + const run = await runByPath({ + path, + requestBody: args ?? {}, + workspace: workspace_id + }) - sendUserToast(`Schedule ${path} will run now`, false, [ - { - label: 'Go to the run page', - callback: () => window.open('/run/' + run + '?workspace=' + workspace_id, '_blank') - } - ]) - } catch (err) { - sendUserToast(`Cannot run schedule now: ${err.body}`, true) - } -} + sendUserToast(`Schedule ${path} will run now`, false, [ + { + label: 'Go to the run page', + callback: () => window.open('/run/' + run + '?workspace=' + workspace_id, '_blank') + } + ]) + } catch (err) { + sendUserToast(`Cannot run schedule now: ${err.body}`, true) + } +} \ No newline at end of file diff --git a/frontend/src/lib/components/tutorials/utils.ts b/frontend/src/lib/components/tutorials/utils.ts index aad0a0b9a1..083e9712dd 100644 --- a/frontend/src/lib/components/tutorials/utils.ts +++ b/frontend/src/lib/components/tutorials/utils.ts @@ -310,18 +310,18 @@ export async function animateCursorToElementAndClick( startOffset: number = CURSOR_START_OFFSET ): Promise { const rect = element.getBoundingClientRect() - + // Set initial position (off-screen to the left) cursor.style.left = `${rect.left + startOffset}px` cursor.style.top = `${rect.top + rect.height / 2}px` await wait(DELAY_SHORT) - + // Animate to target position cursor.style.left = `${rect.left + rect.width / 2}px` cursor.style.top = `${rect.top + rect.height / 2}px` await wait(DELAY_ANIMATION) await wait(DELAY_MEDIUM) - + // Click on the element element.click() await wait(DELAY_SHORT) diff --git a/frontend/src/lib/cookies.ts b/frontend/src/lib/cookies.ts index 9555027af9..22d162bf03 100644 --- a/frontend/src/lib/cookies.ts +++ b/frontend/src/lib/cookies.ts @@ -10,18 +10,20 @@ export function getCookie(name: string): string | undefined { return match ? decodeURIComponent(match[1]) : undefined } + + // this only check the last 2 segments to work for popup on shared top-domain export function sameTopDomainOrigin(origin: string | null, desktopOrigin: string): boolean { if (origin == null) { return false } const getLastTwoSegments = (url: string) => { - const parts = url.split('.') - return parts.length >= 2 ? parts.slice(-2).join('.') : url - } + const parts = url.split('.'); + return parts.length >= 2 ? parts.slice(-2).join('.') : url; + }; if (origin.includes('.') && desktopOrigin.includes('.')) { - return getLastTwoSegments(origin) === getLastTwoSegments(desktopOrigin) + return getLastTwoSegments(origin) === getLastTwoSegments(desktopOrigin); } else { - return origin === desktopOrigin + return origin === desktopOrigin; } -} +} \ No newline at end of file diff --git a/frontend/svelte-fast-check.config.ts b/frontend/svelte-fast-check.config.ts index b03ec763a7..b28b46c413 100644 --- a/frontend/svelte-fast-check.config.ts +++ b/frontend/svelte-fast-check.config.ts @@ -1,5 +1,5 @@ -import type { FastCheckConfig } from 'svelte-fast-check' +import type { FastCheckConfig } from 'svelte-fast-check'; export default { exclude: ['../src/lib/monaco_workers/**'] -} satisfies FastCheckConfig +} satisfies FastCheckConfig; diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js index b5e57b34a5..8ba411c131 100644 --- a/frontend/svelte.config.js +++ b/frontend/svelte.config.js @@ -28,7 +28,7 @@ const config = { base: process.env.VITE_BASE_URL ?? '' }, alias: { - $system_prompts: '../system_prompts/auto-generated' + '$system_prompts': '../system_prompts/auto-generated' } }, diff --git a/lsp/pyls_launcher.py b/lsp/pyls_launcher.py index c77a08c35c..e41c3a3bd3 100644 --- a/lsp/pyls_launcher.py +++ b/lsp/pyls_launcher.py @@ -97,7 +97,7 @@ if __name__ == "__main__": go_mod_path = os.path.join(monaco_path, "go.mod") if not os.path.exists(go_mod_path): f = open(go_mod_path, "w") - f.write("module mymod\ngo 1.26") + f.write("module mymod\ngo 1.25") f.close() port = int(os.environ.get("PORT", "3001")) app = web.Application( diff --git a/python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl b/python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl new file mode 100644 index 0000000000..5e487f5b88 Binary files /dev/null and b/python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl differ diff --git a/python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz b/python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz new file mode 100644 index 0000000000..e539cc5f88 Binary files /dev/null and b/python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz differ