assistsx-js 0.0.2042 → 0.0.2044
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.d.ts +2 -1
- package/dist/Step.js +9 -2
- package/package.json +1 -1
- package/src/Step.ts +9 -1
package/dist/Step.d.ts
CHANGED
|
@@ -23,7 +23,8 @@ export declare class Step {
|
|
|
23
23
|
* @param data 步骤数据
|
|
24
24
|
* @param delayMs 步骤延迟时间(毫秒)
|
|
25
25
|
*/
|
|
26
|
-
static run(impl: StepImpl, { tag, data, delayMs, }?: {
|
|
26
|
+
static run(impl: StepImpl, { stepId, tag, data, delayMs, }?: {
|
|
27
|
+
stepId?: string | undefined;
|
|
27
28
|
tag?: string | undefined;
|
|
28
29
|
data?: any | undefined;
|
|
29
30
|
delayMs?: number;
|
package/dist/Step.js
CHANGED
|
@@ -15,7 +15,7 @@ export class Step {
|
|
|
15
15
|
* @param data 步骤数据
|
|
16
16
|
* @param delayMs 步骤延迟时间(毫秒)
|
|
17
17
|
*/
|
|
18
|
-
static async run(impl, { tag, data, delayMs = Step.delayMsDefault, } = {}) {
|
|
18
|
+
static async run(impl, { stepId, tag, data, delayMs = Step.delayMsDefault, } = {}) {
|
|
19
19
|
var _a, _b, _c, _d, _e, _f;
|
|
20
20
|
const stepStore = useStepStore();
|
|
21
21
|
let implnName = impl.name;
|
|
@@ -23,7 +23,14 @@ export class Step {
|
|
|
23
23
|
let nextStep;
|
|
24
24
|
try {
|
|
25
25
|
//步骤开始
|
|
26
|
-
|
|
26
|
+
if (stepId) {
|
|
27
|
+
this._stepId = stepId;
|
|
28
|
+
console.log(`使用传入步骤ID: ${this._stepId}`);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
this._stepId = generateUUID();
|
|
32
|
+
console.log(`生成步骤ID: ${this._stepId}`);
|
|
33
|
+
}
|
|
27
34
|
stepStore.startStep(this._stepId, tag, data);
|
|
28
35
|
currentStep = new Step({
|
|
29
36
|
stepId: this._stepId,
|
package/package.json
CHANGED
package/src/Step.ts
CHANGED
|
@@ -45,10 +45,12 @@ export class Step {
|
|
|
45
45
|
static async run(
|
|
46
46
|
impl: StepImpl,
|
|
47
47
|
{
|
|
48
|
+
stepId,
|
|
48
49
|
tag,
|
|
49
50
|
data,
|
|
50
51
|
delayMs = Step.delayMsDefault,
|
|
51
52
|
}: {
|
|
53
|
+
stepId?: string | undefined;
|
|
52
54
|
tag?: string | undefined;
|
|
53
55
|
data?: any | undefined;
|
|
54
56
|
delayMs?: number;
|
|
@@ -60,7 +62,13 @@ export class Step {
|
|
|
60
62
|
let nextStep: Step | undefined;
|
|
61
63
|
try {
|
|
62
64
|
//步骤开始
|
|
63
|
-
|
|
65
|
+
if (stepId) {
|
|
66
|
+
this._stepId = stepId;
|
|
67
|
+
console.log(`使用传入步骤ID: ${this._stepId}`);
|
|
68
|
+
} else {
|
|
69
|
+
this._stepId = generateUUID();
|
|
70
|
+
console.log(`生成步骤ID: ${this._stepId}`);
|
|
71
|
+
}
|
|
64
72
|
|
|
65
73
|
stepStore.startStep(this._stepId, tag, data);
|
|
66
74
|
currentStep = new Step({
|