@useoptic/cli-config
Advanced tools
Comparing version 8.2.11 to 8.3.0
@@ -20,2 +20,7 @@ import { parseRule, parseIgnore, IIgnoreRunnable } from './helpers/ignore-parser'; | ||
} | ||
export interface IOpticScript { | ||
command: string; | ||
dependsOn?: string | string[]; | ||
install?: string; | ||
} | ||
export interface IOpticTaskAliases { | ||
@@ -30,2 +35,5 @@ inboundUrl?: string; | ||
}; | ||
scripts?: { | ||
[key: string]: string | IOpticScript; | ||
}; | ||
ignoreRequests?: string[]; | ||
@@ -32,0 +40,0 @@ } |
@@ -71,2 +71,7 @@ "use strict"; | ||
exports.TaskNotFoundError = TaskNotFoundError; | ||
function randomLowerBound() { | ||
const max = 3500; | ||
const min = 3300; | ||
return Math.floor(Math.random() * (max - min + 1)) + min; | ||
} | ||
async function TaskToStartConfig(aliasedTask) { | ||
@@ -90,3 +95,3 @@ const task = normalizeTask(aliasedTask); | ||
: 443 | ||
: await get_port_1.default({ port: get_port_1.default.makeRange(3300, 3900) }), | ||
: await get_port_1.default({ port: get_port_1.default.makeRange(randomLowerBound(), 3900) }), | ||
basePath: (targetUrl && targetUrl.path) || baseUrl.path || '/', | ||
@@ -93,0 +98,0 @@ }; |
{ | ||
"name": "@useoptic/cli-config", | ||
"version": "8.2.11", | ||
"version": "8.3.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "ws:test": "echo config", |
Sorry, the diff of this file is not supported yet
19144
403