wtt-connect 0.2.43 → 0.2.44
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/package.json +1 -1
- package/src/main.js +2 -1
package/package.json
CHANGED
package/src/main.js
CHANGED
|
@@ -146,9 +146,10 @@ async function previewPort(config, argv) {
|
|
|
146
146
|
if (!Number.isInteger(port) || port < 1024 || port > 65535 || port === 3000) {
|
|
147
147
|
throw new Error('preview-port requires --port <1024-65535>, excluding 3000');
|
|
148
148
|
}
|
|
149
|
+
const keepLast = previewKeepLast(config, argv);
|
|
149
150
|
const cleanup = cleanupOldPreviews(config, {
|
|
150
151
|
currentPort: port,
|
|
151
|
-
keepLast:
|
|
152
|
+
keepLast: Math.max(0, keepLast - 1),
|
|
152
153
|
});
|
|
153
154
|
const preview = await createSandboxPreviewFromOutbox(config, port, {
|
|
154
155
|
name: String(argv.previewName || argv.title || '').trim(),
|