Is mock mode to fix errors when cap end or ids dont exist. (#1913)
* add is_mock Signed-off-by: Jess Frazelle <github@jessfraz.com> * js side Signed-off-by: Jess Frazelle <github@jessfraz.com> * is mock mode Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix cargo tests Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -127,13 +127,15 @@ export interface ProgramMemory {
|
||||
export const executor = async (
|
||||
node: Program,
|
||||
programMemory: ProgramMemory = { root: {}, return: null },
|
||||
engineCommandManager: EngineCommandManager
|
||||
engineCommandManager: EngineCommandManager,
|
||||
isMock: boolean = false
|
||||
): Promise<ProgramMemory> => {
|
||||
engineCommandManager.startNewSession()
|
||||
const _programMemory = await _executor(
|
||||
node,
|
||||
programMemory,
|
||||
engineCommandManager
|
||||
engineCommandManager,
|
||||
isMock
|
||||
)
|
||||
await engineCommandManager.waitForAllCommands()
|
||||
|
||||
@ -148,7 +150,8 @@ const getSettingsState = import('components/SettingsAuthProvider').then(
|
||||
export const _executor = async (
|
||||
node: Program,
|
||||
programMemory: ProgramMemory = { root: {}, return: null },
|
||||
engineCommandManager: EngineCommandManager
|
||||
engineCommandManager: EngineCommandManager,
|
||||
isMock: boolean
|
||||
): Promise<ProgramMemory> => {
|
||||
try {
|
||||
const baseUnit = (await getSettingsState)()?.baseUnit || 'mm'
|
||||
@ -157,7 +160,8 @@ export const _executor = async (
|
||||
JSON.stringify(programMemory),
|
||||
baseUnit,
|
||||
engineCommandManager,
|
||||
fileSystemManager
|
||||
fileSystemManager,
|
||||
isMock
|
||||
)
|
||||
return memory
|
||||
} catch (e: any) {
|
||||
|
Reference in New Issue
Block a user