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 +3 -3
- package/package.json +1 -1
- package/src/Step.ts +3 -3
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
|
|
104
|
-
currentStep.repeatCount
|
|
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
|
-
|
|
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
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
|
|
156
|
-
currentStep.repeatCount
|
|
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
|
-
|
|
163
|
+
throw new StepError("步骤重复次数达到最大次数", { stepId: currentStep.stepId, repeatCount: currentStep.repeatCount, repeatCountMax: currentStep.repeatCountMax });
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
Step.assert(currentStep.stepId);
|