toolcraft-openapi 0.0.164 → 0.0.165
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/composition.json
CHANGED
|
@@ -48,7 +48,7 @@ export declare class Prompt<Value> extends EventEmitter {
|
|
|
48
48
|
get cursor(): number;
|
|
49
49
|
prompt(): Promise<Value | typeof CANCEL>;
|
|
50
50
|
protected promptNonTty(): Promise<Value | typeof CANCEL>;
|
|
51
|
-
protected readNonTtyLine(): Promise<string>;
|
|
51
|
+
protected readNonTtyLine(): Promise<string | typeof CANCEL>;
|
|
52
52
|
protected setValue(value: Value | undefined): void;
|
|
53
53
|
protected setError(message: string): void;
|
|
54
54
|
protected setUserInput(value: string): void;
|
|
@@ -117,11 +117,20 @@ export class Prompt extends EventEmitter {
|
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
settled = true;
|
|
120
|
+
this.signal?.removeEventListener("abort", onAbort);
|
|
120
121
|
rl.close();
|
|
121
122
|
resolve(value);
|
|
122
123
|
};
|
|
124
|
+
const onAbort = () => {
|
|
125
|
+
this.state = "cancel";
|
|
126
|
+
settle(CANCEL);
|
|
127
|
+
};
|
|
123
128
|
rl.once("line", settle);
|
|
124
129
|
rl.once("close", () => settle(rl.line));
|
|
130
|
+
this.signal?.addEventListener("abort", onAbort, { once: true });
|
|
131
|
+
if (this.signal?.aborted) {
|
|
132
|
+
onAbort();
|
|
133
|
+
}
|
|
125
134
|
});
|
|
126
135
|
}
|
|
127
136
|
setValue(value) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft-openapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.165",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"toolcraft-openapi-generate": "dist/bin/generate.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"toolcraft": "0.0.
|
|
33
|
+
"toolcraft": "0.0.165",
|
|
34
34
|
"fast-string-width": "^3.0.2",
|
|
35
35
|
"fast-wrap-ansi": "^0.2.0",
|
|
36
36
|
"sisteransi": "^1.0.5",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"directory": "packages/toolcraft-openapi"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"toolcraft-schema": "0.0.
|
|
48
|
+
"toolcraft-schema": "0.0.165",
|
|
49
49
|
"toolcraft-design": "*",
|
|
50
50
|
"@poe-code/frontmatter": "*"
|
|
51
51
|
},
|