assistsx-js 0.0.2051 → 0.0.2052

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.
package/dist/Step.js CHANGED
@@ -100,12 +100,12 @@ export class Step {
100
100
  else {
101
101
  nextStep = await ((_e = currentStep.impl) === null || _e === void 0 ? void 0 : _e.call(currentStep, currentStep));
102
102
  }
103
- if (currentStep.repeatCountMax > Step.repeatCountInfinite &&
104
- currentStep.repeatCount > currentStep.repeatCountMax) {
103
+ if (currentStep.repeatCountMax >= Step.repeatCountInfinite &&
104
+ currentStep.repeatCount >= currentStep.repeatCountMax) {
105
105
  if (Step.showLog) {
106
106
  console.log(`重复次数${currentStep.repeatCount}超过最大次数${currentStep.repeatCountMax},停止执行`);
107
107
  }
108
- break;
108
+ throw new StepError("步骤重复次数达到最大次数", { stepId: currentStep.stepId, repeatCount: currentStep.repeatCount, repeatCountMax: currentStep.repeatCountMax });
109
109
  }
110
110
  Step.assert(currentStep.stepId);
111
111
  if (nextStep) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.0.2051",
3
+ "version": "0.0.2052",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
package/src/Step.ts CHANGED
@@ -152,15 +152,15 @@ export class Step {
152
152
  nextStep = await currentStep.impl?.(currentStep);
153
153
  }
154
154
  if (
155
- currentStep.repeatCountMax > Step.repeatCountInfinite &&
156
- currentStep.repeatCount > currentStep.repeatCountMax
155
+ currentStep.repeatCountMax >= Step.repeatCountInfinite &&
156
+ currentStep.repeatCount >= currentStep.repeatCountMax
157
157
  ) {
158
158
  if (Step.showLog) {
159
159
  console.log(
160
160
  `重复次数${currentStep.repeatCount}超过最大次数${currentStep.repeatCountMax},停止执行`
161
161
  );
162
162
  }
163
- break;
163
+ throw new StepError("步骤重复次数达到最大次数", { stepId: currentStep.stepId, repeatCount: currentStep.repeatCount, repeatCountMax: currentStep.repeatCountMax });
164
164
  }
165
165
 
166
166
  Step.assert(currentStep.stepId);