chore: revert formatting-only changes to main branch state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Diego Imbert
2026-03-02 10:57:29 +01:00
co-authored by Claude Opus 4.5
parent c9db8c90dc
commit 7e9a44a2c5
30 changed files with 147 additions and 139 deletions
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -5,4 +5,4 @@
"onAutoForward": "openPreview"
}
}
}
}
+1 -1
View File
@@ -1 +1 @@
{ "started": true, "success": true, "completed": true, "result": "" }
{"started":true,"success":true,"completed":true,"result":""}
+8 -5
View File
@@ -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 })
+1 -1
View File
@@ -2,4 +2,4 @@ import { BROWSER } from 'esm-env'
export function isCloudHosted(): boolean {
return BROWSER && window.location.hostname == 'app.windmill.dev'
}
}
@@ -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'
@@ -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}`
}
@@ -24,7 +24,7 @@ export const DEFAULT_CODES: Partial<
| 'snowflake'
| 'mssql'
| 'bigquery'
| 'oracledb',
| 'oracledb',
string
>
>
@@ -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
@@ -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;
}
@@ -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
}
@@ -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'
@@ -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
}
}
}
@@ -177,3 +177,4 @@ export function supportsAutocomplete(model: string): boolean {
const lower = model.toLowerCase()
return lower.includes('codestral') && !lower.includes('embed')
}
+21 -21
View File
@@ -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
}
+40 -40
View File
@@ -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<string, any>
loading?: boolean
flowStore: StateStore<OpenFlow>
flowStateStore: StateStore<FlowState>
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<string, stepState>
}
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<string, any>
loading?: boolean
flowStore: StateStore<OpenFlow>
flowStateStore: StateStore<FlowState>
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<string, stepState>
}
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
}
@@ -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";
@@ -1,5 +1,5 @@
export interface HubItem {
app: string
app: string;
summary: string
path: string
version?: string
+2 -2
View File
@@ -15,7 +15,7 @@ type RunScriptOptions = {
* @function runScript
* @param {RunScriptPreviewData | RunScriptByPathData} data - Data for running the script.
* @returns {Promise<string>} 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<unknown>} Final job result or throws error if it fails.
*
*
* @example
* const result = await pollJobResult(uuid, 'my-workspace', { maxRetries: 5, withJobData: true });
*/
+6 -6
View File
@@ -1,8 +1,8 @@
import type { Script } from '$lib/gen'
import type { Script } from "$lib/gen"
export type ScriptBuilderFunctionExports = {
setPreviewArgs: (args: Record<string, any>) => void
runPreview: () => Promise<string | undefined>
setCode: (code: string, language?: Script['language']) => void
getCode: () => string
}
setPreviewArgs: (args: Record<string, any>) => void
runPreview: () => Promise<string | undefined>
setCode: (code: string, language?: Script["language"]) => void
getCode: () => string
}
@@ -384,4 +384,4 @@ const changelogs: Changelog[] = [
}
]
export { changelogs }
export { changelogs }
@@ -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;
@@ -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<void> {
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)
}
}
@@ -310,18 +310,18 @@ export async function animateCursorToElementAndClick(
startOffset: number = CURSOR_START_OFFSET
): Promise<void> {
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)
+8 -6
View File
@@ -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;
}
}
}
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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'
}
},
+1 -1
View File
@@ -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(
Binary file not shown.
Binary file not shown.