@openspecui/server 1.1.2 → 1.2.0
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/index.mjs +15 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -80,6 +80,8 @@ var PtySession = class extends EventEmitter {
|
|
|
80
80
|
command;
|
|
81
81
|
args;
|
|
82
82
|
platform;
|
|
83
|
+
closeTip;
|
|
84
|
+
closeCallbackUrl;
|
|
83
85
|
createdAt;
|
|
84
86
|
process;
|
|
85
87
|
titleInterval = null;
|
|
@@ -103,6 +105,8 @@ var PtySession = class extends EventEmitter {
|
|
|
103
105
|
this.command = resolvedCommand.command;
|
|
104
106
|
this.args = resolvedCommand.args;
|
|
105
107
|
this.platform = opts.platform;
|
|
108
|
+
this.closeTip = opts.closeTip;
|
|
109
|
+
this.closeCallbackUrl = opts.closeCallbackUrl;
|
|
106
110
|
this.maxBufferLines = opts.scrollback ?? DEFAULT_SCROLLBACK;
|
|
107
111
|
this.maxBufferBytes = opts.maxBufferBytes ?? DEFAULT_MAX_BUFFER_BYTES;
|
|
108
112
|
this.process = pty.spawn(this.command, this.args, {
|
|
@@ -183,6 +187,8 @@ var PtySession = class extends EventEmitter {
|
|
|
183
187
|
platform: this.platform,
|
|
184
188
|
isExited: this.isExited,
|
|
185
189
|
exitCode: this.exitCode,
|
|
190
|
+
closeTip: this.closeTip,
|
|
191
|
+
closeCallbackUrl: this.closeCallbackUrl,
|
|
186
192
|
createdAt: this.createdAt
|
|
187
193
|
};
|
|
188
194
|
}
|
|
@@ -202,6 +208,8 @@ var PtyManager = class {
|
|
|
202
208
|
rows: opts.rows,
|
|
203
209
|
command: opts.command,
|
|
204
210
|
args: opts.args,
|
|
211
|
+
closeTip: opts.closeTip,
|
|
212
|
+
closeCallbackUrl: opts.closeCallbackUrl,
|
|
205
213
|
cwd: this.defaultCwd,
|
|
206
214
|
scrollback: opts.scrollback,
|
|
207
215
|
maxBufferBytes: opts.maxBufferBytes,
|
|
@@ -306,11 +314,14 @@ function createPtyWebSocketHandler(ptyManager) {
|
|
|
306
314
|
switch (msg.type) {
|
|
307
315
|
case "create":
|
|
308
316
|
try {
|
|
317
|
+
const createMessage = msg;
|
|
309
318
|
const session = ptyManager.create({
|
|
310
319
|
cols: msg.cols,
|
|
311
320
|
rows: msg.rows,
|
|
312
321
|
command: msg.command,
|
|
313
|
-
args: msg.args
|
|
322
|
+
args: msg.args,
|
|
323
|
+
closeTip: createMessage.closeTip,
|
|
324
|
+
closeCallbackUrl: createMessage.closeCallbackUrl
|
|
314
325
|
});
|
|
315
326
|
send({
|
|
316
327
|
type: "created",
|
|
@@ -366,7 +377,9 @@ function createPtyWebSocketHandler(ptyManager) {
|
|
|
366
377
|
args: s.args,
|
|
367
378
|
platform: s.platform,
|
|
368
379
|
isExited: s.isExited,
|
|
369
|
-
exitCode: s.exitCode
|
|
380
|
+
exitCode: s.exitCode,
|
|
381
|
+
closeTip: s.closeTip,
|
|
382
|
+
closeCallbackUrl: s.closeCallbackUrl
|
|
370
383
|
}))
|
|
371
384
|
});
|
|
372
385
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openspecui/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"yaml": "^2.8.0",
|
|
21
21
|
"yargs": "^18.0.0",
|
|
22
22
|
"zod": "^3.24.1",
|
|
23
|
-
"@openspecui/core": "1.
|
|
23
|
+
"@openspecui/core": "1.2.0",
|
|
24
24
|
"@openspecui/search": "1.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|