Skip to content

Commit

Permalink
chore: merge upstream main
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Nov 23, 2023
1 parent 1bb7520 commit 68be7e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtimes/nodejs/src/support/engine/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import { Console } from '.'
import * as vm from 'vm'
import { createRequire } from 'node:module'


const CUSTOM_DEPENDENCY_NODE_MODULES_PATH = `${Config.CUSTOM_DEPENDENCY_BASE_PATH}/node_modules/`

export class FunctionModule {
protected static cache: Map<string, any> = new Map()

private static customRequire = createRequire(CUSTOM_DEPENDENCY_NODE_MODULES_PATH)
private static customRequire = createRequire(
CUSTOM_DEPENDENCY_NODE_MODULES_PATH,
)

static get(functionName: string): any {
const moduleName = `@/${functionName}`
Expand Down

0 comments on commit 68be7e6

Please sign in to comment.