mirror of
https://github.com/langgenius/dify.git
synced 2026-09-03 23:47:16 +08:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
d825dd75dc
commit
39b7b3ca51
@ -66,10 +66,18 @@ const frozenCollections = [
|
||||
|
||||
const frozenCollectionPlugins: Record<string, unknown[]> = {
|
||||
'e2e-frozen-featured': Array.from({ length: 8 }, (_, index) =>
|
||||
makeFrozenPlugin(`featured-plugin-${index + 1}`, `Featured Plugin ${index + 1}`, 12_000 - index * 100),
|
||||
makeFrozenPlugin(
|
||||
`featured-plugin-${index + 1}`,
|
||||
`Featured Plugin ${index + 1}`,
|
||||
12_000 - index * 100,
|
||||
),
|
||||
),
|
||||
'e2e-frozen-popular': Array.from({ length: 8 }, (_, index) =>
|
||||
makeFrozenPlugin(`popular-plugin-${index + 1}`, `Popular Plugin ${index + 1}`, 8_000 - index * 100),
|
||||
makeFrozenPlugin(
|
||||
`popular-plugin-${index + 1}`,
|
||||
`Popular Plugin ${index + 1}`,
|
||||
8_000 - index * 100,
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
@ -138,7 +146,9 @@ const handleRequest = (request: IncomingMessage, response: ServerResponse) => {
|
||||
if (!stubResponse) {
|
||||
console.warn(`Marketplace stub has no fixture for ${method} ${url.pathname}; returning 404.`)
|
||||
response.writeHead(404, { 'Content-Type': 'application/json' })
|
||||
response.end(JSON.stringify({ code: 404, msg: 'Marketplace stub fixture not found', data: null }))
|
||||
response.end(
|
||||
JSON.stringify({ code: 404, msg: 'Marketplace stub fixture not found', data: null }),
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@ -91,9 +91,7 @@ describe('proxy frame options', () => {
|
||||
|
||||
it('should deny framing for the Marketplace OAuth authorize route', () => {
|
||||
const response = proxy(
|
||||
createRequest(
|
||||
'https://cloud.dify.ai/account/oauth/authorize?client_id=marketplace-client',
|
||||
),
|
||||
createRequest('https://cloud.dify.ai/account/oauth/authorize?client_id=marketplace-client'),
|
||||
)
|
||||
|
||||
expect(response.headers.get('x-frame-options')).toBe('DENY')
|
||||
|
||||
@ -59,7 +59,6 @@ describe('resolveLoginRedirectTarget', () => {
|
||||
}),
|
||||
).toEqual({ kind: 'absolute', href: 'https://self-hosted.example:8443/apps' })
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
describe('legacy encoding compatibility', () => {
|
||||
@ -140,7 +139,6 @@ describe('resolveLoginRedirectTarget', () => {
|
||||
}),
|
||||
).toBeNull()
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user