refactor(docker): run as non-root bun user and add agent tools

This commit is contained in:
yiling
2026-06-06 10:43:19 +08:00
parent 075755b4ad
commit 823175d487
3 changed files with 33 additions and 16 deletions
@@ -3,7 +3,7 @@ import { temporalWorkflow } from './bun-temporal-plugin'
import * as worker from '@temporalio/worker'
vi.mock('@temporalio/worker', () => ({
bundleWorkflowCode: vi.fn().mockResolvedValue({ code: 'mock-code', sourceMap: '' })
bundleWorkflowCode: vi.fn().mockResolvedValue({ code: 'mock-code', sourceMap: '' }),
}))
describe('temporalWorkflow plugin', () => {
@@ -13,14 +13,14 @@ describe('temporalWorkflow plugin', () => {
it('should register onLoad and configure webpackConfigHook with @temporalio/workflow alias', async () => {
const plugin = temporalWorkflow()
let onLoadCallback: ((...args: unknown[]) => unknown) | null = null
const mockBuild = {
onResolve: vi.fn(),
onLoad: vi.fn((opts, callback) => {
onLoadCallback = callback
})
}),
}
// Run setup
@@ -47,9 +47,7 @@ export function temporalWorkflow(options: TemporalWorkflowPluginOptions = {}): B
...config.resolve.alias,
'@shumai/workflow-core':
require.resolve('@shumai/workflow-core/src/workflow-utils.ts'),
'@temporalio/workflow': dirname(
require.resolve('@temporalio/workflow/package.json'),
),
'@temporalio/workflow': dirname(require.resolve('@temporalio/workflow/package.json')),
}
console.log('Webpack config aliases:', config.resolve.alias)
if (originalHook) {