mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-29 00:07:30 +00:00
fix(frontend): keep url helpers in their own chunk
Fixes the release build and frontend checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8815c71d63
commit
dde36c1682
@@ -30,7 +30,11 @@ export function signedResumeUrl(
|
||||
): string | undefined {
|
||||
const url = httpUrl(value, base)
|
||||
if (!url || url.hash || !SIGNED_PATH[op].test(url.pathname)) return undefined
|
||||
if ([...url.searchParams.keys()].some((k) => k !== 'approver')) return undefined
|
||||
let otherParam = false
|
||||
url.searchParams.forEach((_, k) => {
|
||||
if (k !== 'approver') otherParam = true
|
||||
})
|
||||
if (otherParam) return undefined
|
||||
return url.href
|
||||
}
|
||||
|
||||
|
||||
+14
-1
@@ -253,7 +253,13 @@ function assertAiEngineFreeAppShell() {
|
||||
generateBundle(_options, bundle) {
|
||||
if (!isClientBuild(bundle)) return
|
||||
for (const entry of entries) {
|
||||
assertStaticClosureExcludes(this, bundle, entry, forbidden, 'sessionRuntimeRegistry.svelte.ts')
|
||||
assertStaticClosureExcludes(
|
||||
this,
|
||||
bundle,
|
||||
entry,
|
||||
forbidden,
|
||||
'sessionRuntimeRegistry.svelte.ts'
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -558,6 +564,13 @@ const config = {
|
||||
test: /[\\/]src[\\/]lib[\\/]gen[\\/]core[\\/]OpenAPI\.ts$/,
|
||||
priority: 1
|
||||
},
|
||||
// Imported by the generated client and by the public app routes alike, and
|
||||
// importing nothing: left alone they land in a chunk those routes may not load.
|
||||
{
|
||||
name: 'url-helpers',
|
||||
test: /[\\/]src[\\/]lib[\\/](apiPathParams|navigationTarget)\.ts$/,
|
||||
priority: 1
|
||||
},
|
||||
{ name: 'gen', test: /[\\/]src[\\/]lib[\\/]gen[\\/]/ }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ function skipRegex(src: string, start: number): number {
|
||||
/**
|
||||
* The names a v1 task job binds its arguments by, in order: the script parser names an
|
||||
* object pattern `anon<N>`, and an array pattern has no name (`""`).
|
||||
* @internal
|
||||
*/
|
||||
export function getParamNames(func: Function): string[] {
|
||||
const paramStr = parameterListSource(func.toString())?.trim();
|
||||
|
||||
Reference in New Issue
Block a user