@budibase/server 2.4.44-alpha.1 → 2.4.44-alpha.2

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.
@@ -8,7 +8,7 @@
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" />
9
9
  <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
10
10
  rel="stylesheet" />
11
- <script type="module" crossorigin src="/builder/assets/index.76deb808.js"></script>
11
+ <script type="module" crossorigin src="/builder/assets/index.8021c5c2.js"></script>
12
12
  <link rel="stylesheet" href="/builder/assets/index.7f9a008b.css">
13
13
  </head>
14
14
 
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/server",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.4.44-alpha.0",
4
+ "version": "2.4.44-alpha.1",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -44,12 +44,12 @@
44
44
  "license": "GPL-3.0",
45
45
  "dependencies": {
46
46
  "@apidevtools/swagger-parser": "10.0.3",
47
- "@budibase/backend-core": "2.4.44-alpha.0",
48
- "@budibase/client": "2.4.44-alpha.0",
49
- "@budibase/pro": "2.4.44-alpha.0",
50
- "@budibase/shared-core": "2.4.44-alpha.0",
51
- "@budibase/string-templates": "2.4.44-alpha.0",
52
- "@budibase/types": "2.4.44-alpha.0",
47
+ "@budibase/backend-core": "2.4.44-alpha.1",
48
+ "@budibase/client": "2.4.44-alpha.1",
49
+ "@budibase/pro": "2.4.44-alpha.1",
50
+ "@budibase/shared-core": "2.4.44-alpha.1",
51
+ "@budibase/string-templates": "2.4.44-alpha.1",
52
+ "@budibase/types": "2.4.44-alpha.1",
53
53
  "@bull-board/api": "3.7.0",
54
54
  "@bull-board/koa": "3.9.4",
55
55
  "@elastic/elasticsearch": "7.10.0",
@@ -58,8 +58,8 @@ const CRON_STEP_ID = triggerInfo_1.definitions.CRON.stepId;
58
58
  const STOPPED_STATUS = { success: true, status: types_1.AutomationStatus.STOPPED };
59
59
  function getLoopIterations(loopStep, input) {
60
60
  const binding = automationUtils.typecastForLooping(loopStep, input);
61
- if (!loopStep || !binding) {
62
- return 1;
61
+ if (!binding) {
62
+ return 0;
63
63
  }
64
64
  if (Array.isArray(binding)) {
65
65
  return binding.length;
@@ -67,7 +67,7 @@ function getLoopIterations(loopStep, input) {
67
67
  if (typeof binding === "string") {
68
68
  return automationUtils.stringSplit(binding).length;
69
69
  }
70
- return 1;
70
+ return 0;
71
71
  }
72
72
  /**
73
73
  * The automation orchestrator is a class responsible for executing automations.
@@ -372,6 +372,17 @@ class Orchestrator {
372
372
  }
373
373
  }
374
374
  }
375
+ if (loopStep && iterations === 0) {
376
+ loopStep = undefined;
377
+ this.executionOutput.steps.splice(loopStepNumber + 1, 0, {
378
+ id: step.id,
379
+ stepId: step.stepId,
380
+ outputs: { status: types_1.AutomationStatus.NO_ITERATIONS, success: true },
381
+ inputs: {},
382
+ });
383
+ this._context.steps.splice(loopStepNumber, 1);
384
+ iterations = 1;
385
+ }
375
386
  // Delete the step after the loop step as it's irrelevant, since information is included
376
387
  // in the loop step
377
388
  if (wasLoopStep && !loopStep) {