mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 19:34:38 +00:00
refactor(docker): run as non-root bun user and add agent tools
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user