@wandelbots/nova-js 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,9 +76,7 @@ export class ProgramStateConnection {
76
76
 
77
77
  if (runner.state === ProgramState.Failed) {
78
78
  try {
79
- const runnerState = await this.nova.api.program.getProgramRunner(
80
- runner.id,
81
- )
79
+ const runnerState = await this.nova.api.program.getProgramRun(runner.id)
82
80
 
83
81
  // TODO - wandelengine should send print statements in real time over
84
82
  // websocket as well, rather than at the end
@@ -100,9 +98,7 @@ export class ProgramStateConnection {
100
98
  this.gotoIdleState()
101
99
  } else if (runner.state === ProgramState.Stopped) {
102
100
  try {
103
- const runnerState = await this.nova.api.program.getProgramRunner(
104
- runner.id,
105
- )
101
+ const runnerState = await this.nova.api.program.getProgramRun(runner.id)
106
102
 
107
103
  const stdout = (runnerState as any).stdout
108
104
  if (stdout) {
@@ -120,9 +116,7 @@ export class ProgramStateConnection {
120
116
  this.gotoIdleState()
121
117
  } else if (runner.state === ProgramState.Completed) {
122
118
  try {
123
- const runnerState = await this.nova.api.program.getProgramRunner(
124
- runner.id,
125
- )
119
+ const runnerState = await this.nova.api.program.getProgramRun(runner.id)
126
120
 
127
121
  const stdout = (runnerState as any).stdout
128
122
  if (stdout) {
@@ -181,7 +175,7 @@ export class ProgramStateConnection {
181
175
  const trimmedCode = openProgram.wandelscript!.replaceAll(/^\s*$/gm, "")
182
176
 
183
177
  try {
184
- const programRunnerRef = await this.nova.api.program.createProgramRunner(
178
+ const programRunnerRef = await this.nova.api.program.createProgramRun(
185
179
  {
186
180
  code: trimmedCode,
187
181
  initial_state: initial_state,
@@ -220,7 +214,7 @@ export class ProgramStateConnection {
220
214
  })
221
215
 
222
216
  try {
223
- await this.nova.api.program.stopProgramRunner(
217
+ await this.nova.api.program.stopProgramRun(
224
218
  this.currentlyExecutingProgramRunnerId,
225
219
  )
226
220
  } catch (err) {