Skip to content

Commit

Permalink
all
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Jan 8, 2025
1 parent f3d1c77 commit ea0d0f7
Show file tree
Hide file tree
Showing 16 changed files with 1,644 additions and 48,305 deletions.
6 changes: 1 addition & 5 deletions backend/windmill-common/src/apps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ pub struct ListAppQuery {
pub with_deployment_msg: Option<bool>,
}

#[derive(Deserialize)]
pub struct AppFile {
pub code: String,
}
#[derive(Deserialize)]
pub struct RawAppValue {
pub files: HashMap<String, AppFile>,
pub files: HashMap<String, String>,
}
2 changes: 1 addition & 1 deletion backend/windmill-worker/src/worker_lockfiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ async fn upload_raw_app(
} else if file.0 == "/index.js" {
entrypoint = "index.js";
}
write_file(&job_dir, file.0, &file.1.code)?;
write_file(&job_dir, file.0, &file.1)?;
}
let common_bun_proc_envs: HashMap<String, String> = get_common_bun_proc_envs(None).await;

Expand Down
3,716 changes: 1,214 additions & 2,502 deletions frontend/package-lock.json

Large diffs are not rendered by default.

42 changes: 26 additions & 16 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"filter-classes": "node filterTailwindClasses.js"
},
"devDependencies": {
"@codesandbox/sandpack-client": "^2.19.8",
"@floating-ui/core": "^1.3.1",
"@hey-api/openapi-ts": "^0.43.0",
"@playwright/test": "^1.34.3",
Expand Down Expand Up @@ -85,15 +84,27 @@
"dependencies": {
"@anthropic-ai/sdk": "^0.32.1",
"@aws-crypto/sha256-js": "^4.0.0",
"@codingame/monaco-vscode-configuration-service-override": "~8.0.2",
"@codingame/monaco-vscode-files-service-override": "~8.0.2",
"@codingame/monaco-vscode-keybindings-service-override": "~8.0.2",
"@codingame/monaco-vscode-lifecycle-service-override": "~8.0.2",
"@codingame/monaco-vscode-localization-service-override": "~8.0.2",
"@codingame/monaco-vscode-standalone-css-language-features": "~8.0.2",
"@codingame/monaco-vscode-standalone-json-language-features": "~8.0.2",
"@codingame/monaco-vscode-standalone-languages": "~8.0.2",
"@codingame/monaco-vscode-standalone-typescript-language-features": "~8.0.2",
"@codingame/monaco-vscode-configuration-service-override": "~11.1.2",
"@codingame/monaco-vscode-explorer-service-override": "~11.1.2",
"@codingame/monaco-vscode-extensions-service-override": "~11.1.2",
"@codingame/monaco-vscode-files-service-override": "~11.1.2",
"@codingame/monaco-vscode-keybindings-service-override": "~11.1.2",
"@codingame/monaco-vscode-lifecycle-service-override": "~11.1.2",
"@codingame/monaco-vscode-localization-service-override": "~11.1.2",
"@codingame/monaco-vscode-markers-service-override": "^11.1.2",
"@codingame/monaco-vscode-search-service-override": "~11.1.2",
"@codingame/monaco-vscode-standalone-css-language-features": "~11.1.2",
"@codingame/monaco-vscode-standalone-json-language-features": "~11.1.2",
"@codingame/monaco-vscode-standalone-html-language-features": "~11.1.2",
"@codingame/monaco-vscode-standalone-languages": "~11.1.2",
"@codingame/monaco-vscode-standalone-typescript-language-features": "~11.1.2",
"@codingame/monaco-vscode-json-default-extension": "~11.1.2",
"@codingame/monaco-vscode-css-default-extension": "~11.1.2",
"@codingame/monaco-vscode-html-default-extension": "~11.1.2",
"@codingame/monaco-vscode-javascript-default-extension": "~11.1.2",
"@codingame/monaco-vscode-typescript-basics-default-extension": "~11.1.2",
"@codingame/monaco-vscode-typescript-language-features-default-extension": "~11.1.2",
"@codingame/monaco-vscode-views-service-override": "~11.1.2",
"@json2csv/plainjs": "^7.0.6",
"@leeoniya/ufuzzy": "^1.0.8",
"@mistralai/mistralai": "^1.3.0",
Expand Down Expand Up @@ -124,12 +135,11 @@
"lucide-svelte": "^0.399.0",
"memfs": "^4.15.3",
"minimatch": "^10.0.1",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~8.0.2",
"monaco-editor-wrapper": "^5.5.2",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~11.1.2",
"monaco-editor-wrapper": "~6.0.0",
"monaco-graphql": "^1.6.0",
"monaco-languageclient": "~8.8.2",
"monaco-languageclient": "~9.0.0",
"monaco-vim": "^0.4.1",
"npm-in-browser": "^0.1.3",
"ol": "^7.4.0",
"openai": "^4.57.2",
"p-limit": "^6.1.0",
Expand All @@ -145,10 +155,10 @@
"svelte-tiny-virtual-list": "^2.0.5",
"tailwind-merge": "^1.13.2",
"vite-plugin-node-polyfills": "^0.22.0",
"vscode": "npm:@codingame/monaco-vscode-api@~8.0.2",
"vscode": "npm:@codingame/monaco-vscode-api@~11.1.2",
"vscode-languageclient": "~9.0.1",
"vscode-uri": "~3.0.8",
"vscode-ws-jsonrpc": "~3.3.2",
"vscode-ws-jsonrpc": "~3.4.0",
"windmill-parser-wasm-csharp": "^1.437.1",
"windmill-parser-wasm-go": "^1.429.0",
"windmill-parser-wasm-php": "^1.429.0",
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/lib/components/AppConnectInner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@
async function loadConnects() {
if (!connects) {
connects = (await OauthService.listOauthConnects()).filter((x) => x != 'supabase_wizard')
try {
connects = (await OauthService.listOauthConnects()).filter((x) => x != 'supabase_wizard')
} catch (e) {
sendUserToast('Error loading connects', true)
connects = []
}
}
}
Expand Down
46 changes: 7 additions & 39 deletions frontend/src/lib/components/Editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@
languages.typescript.typescriptDefaults.addExtraLib(processStdContent, 'process.d.ts')
// languages.typescript.javascriptDefaults.setModeConfiguration({
// completionItems: true,
// hovers: true,
// documentSymbols: true,
// definitions: true,
// references: true,
// documentHighlights: true,
// rename: true,
// diagnostics: true,
// documentRangeFormattingEdits: true,
// signatureHelp: true,
// onTypeFormattingEdits: true,
// codeActions: true,
// inlayHints: true
// })
languages.typescript.typescriptDefaults.setModeConfiguration({
completionItems: true,
hovers: true,
Expand Down Expand Up @@ -85,21 +69,6 @@
moduleResolution: languages.typescript.ModuleResolutionKind.NodeJs,
jsx: languages.typescript.JsxEmit.React
})
// languages.typescript.javascriptDefaults.setCompilerOptions({
// target: languages.typescript.ScriptTarget.Latest,
// allowNonTsExtensions: true,
// noSemanticValidation: false,
// noSyntaxValidation: false,
// allowImportingTsExtensions: true,
// checkJs: true,
// allowJs: true,
// noUnusedParameters: true,
// noUnusedLocals: true,
// strict: true,
// noLib: true,
// moduleResolution: languages.typescript.ModuleResolutionKind.NodeJs
// })
</script>

<script lang="ts">
Expand All @@ -123,6 +92,8 @@
import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from 'vscode-ws-jsonrpc'
import { CloseAction, ErrorAction, RequestType } from 'vscode-languageclient'
import type { DocumentUri, MessageTransports } from 'vscode-languageclient'
import { MonacoBinding } from 'y-monaco'
import {
dbSchemas,
Expand All @@ -142,13 +113,14 @@
extToLang
} from '$lib/editorUtils'
import type { Disposable } from 'vscode'
import type { DocumentUri, MessageTransports } from 'vscode-languageclient'
import { workspaceStore } from '$lib/stores'
import { type Preview, UserService } from '$lib/gen'
import type { Text } from 'yjs'
import { initializeVscode } from '$lib/components/vscode'
import { initializeMode } from 'monaco-graphql/esm/initializeMode.js'
import type { MonacoGraphQLAPI } from 'monaco-graphql/esm/api.js'
import { sleep } from '$lib/utils'
import { editorCodeCompletion } from '$lib/components/copilot/completion'
import {
Expand All @@ -160,7 +132,6 @@
type IRange,
type IDisposable
} from 'monaco-editor'
import type { MonacoGraphQLAPI } from 'monaco-graphql/esm/api.js'
import EditorTheme from './EditorTheme.svelte'
import {
Expand Down Expand Up @@ -751,6 +722,7 @@
documentSelector: [lang],
errorHandler: {
error: () => ({ action: ErrorAction.Continue }),
closed: () => ({
action: CloseAction.Restart
})
Expand All @@ -777,11 +749,7 @@
}
}
},
connectionProvider: {
get: () => {
return Promise.resolve(transports)
}
}
messageTransports: transports
})
return client
}
Expand Down Expand Up @@ -1217,7 +1185,7 @@
try {
console.log("Loading Monaco's language client")
await initializeVscode('editor')
await initializeVscode('editor', divEl!)
console.log('done loading Monaco and vscode')
} catch (e) {
console.log('error initializing services', e)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/GraphqlSchemaViewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { BROWSER } from 'esm-env'
import { editor as meditor } from 'monaco-editor'
import '@codingame/monaco-vscode-standalone-languages'
// import '@codingame/monaco-vscode-standalone-languages'
import { onDestroy, onMount } from 'svelte'
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/lib/components/raw_apps/EsbuildBundler.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script lang="ts">
import { createEventDispatcher, onMount } from 'svelte'
import type { InstalledPackage } from './npm_install'
export let files: Record<string, { code: string }>
export let files: Record<string, string>
export let logs: string = ''
import NpmInstall from './NpmInstall.svelte'
import { wmillTs } from './utils'
let installed: InstalledPackage[] | undefined = []
export let installed: InstalledPackage[] | undefined = []
let npm_install: NpmInstall | undefined = undefined
const dispatch = createEventDispatcher()
Expand All @@ -25,6 +25,7 @@
export function onContentChange(activeFile: string) {
if (activeFile == '/package.json') {
updatePackageJson()
build('/index.ts')
} else {
build(activeFile)
}
Expand Down Expand Up @@ -60,7 +61,7 @@
// svelte-lsp error: seems cannot use local variable whose name is the same as imported store
let input = {}
Object.keys(files).forEach((path) => {
input[path] = files[path].code
input[path] = files[path]
})
input['/wmill.ts'] = wmillTs
Expand All @@ -87,8 +88,9 @@
}
async function updatePackageJson() {
installed = await npm_install?.parsePackageJson(files?.['/package.json']?.code, true)
installed = await npm_install?.parsePackageJson(files?.['/package.json'], true)
console.log('install done', installed)
dispatch('install', installed)
// const reactPkgJson = fs.read(cwd + '/package-lock.json', 'utf-8')
// console.log({ reactPkgJson })
Expand Down
Loading

0 comments on commit ea0d0f7

Please sign in to comment.