@microsoft/vscode-azext-utils
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -683,3 +683,3 @@ /*--------------------------------------------------------------------------------------------- | ||
* Wrapper interface of several methods that handle user input | ||
* The implementations of this interface are accessed through `IActionContext.ui` or `TestActionContext.ui` (in the "vscode-azureextensiondev" package) | ||
* The implementations of this interface are accessed through `IActionContext.ui` or `TestActionContext.ui` (in the "@microsoft/vscode-azext-dev" package) | ||
*/ | ||
@@ -1049,3 +1049,3 @@ export interface IAzureUserInput { | ||
/** | ||
* Set to true if not running under a webpacked 'dist' folder as defined in 'vscode-azureextensiondev' | ||
* Set to true if not running under a webpacked 'dist' folder as defined in '@microsoft/vscode-azext-dev' | ||
*/ | ||
@@ -1309,1 +1309,10 @@ ignoreBundle?: boolean; | ||
export function nonNullOrEmptyValue(value: string | undefined, propertyNameOrMessage?: string): string; | ||
/** | ||
* Finds an available port. | ||
* NOTE: If another listener is on '0.0.0.0', this will take the '127.0.0.1' allocation from them! | ||
* @param startPort (Optional) The first port to try. By default, a random port from 10000 (inclusive) to 64000 (exclusive) | ||
* @param maxAttempts (Optional) The maximum number of attempts. 25, by default. | ||
* @param timeout (Optional) The maximum time to spend. 500 ms, by default. | ||
*/ | ||
export function findFreePort(startPort?: number, maxAttempts?: number, timeout?: number): Promise<number>; |
@@ -51,3 +51,4 @@ "use strict"; | ||
__exportStar(require("./utils/nonNull"), exports); | ||
__exportStar(require("./utils/findFreePort"), exports); | ||
// NOTE: The auto-fix action "source.organizeImports" does weird things with this file, but there doesn't seem to be a way to disable it on a per-file basis so we'll just let it happen | ||
//# sourceMappingURL=index.js.map |
@@ -20,3 +20,10 @@ "use strict"; | ||
randomUtils.getRandomHexString = getRandomHexString; | ||
function getRandomInteger(minimumInclusive, maximumExclusive) { | ||
if (maximumExclusive <= minimumInclusive) { | ||
throw new Error(`Maximum must be strictly greater than minimum`); | ||
} | ||
return Math.floor(Math.random() * (maximumExclusive - minimumInclusive)) + minimumInclusive; | ||
} | ||
randomUtils.getRandomInteger = getRandomInteger; | ||
})(randomUtils = exports.randomUtils || (exports.randomUtils = {})); | ||
//# sourceMappingURL=randomUtils.js.map |
{ | ||
"name": "@microsoft/vscode-azext-utils", | ||
"author": "Microsoft Corporation", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Common UI tools for developing Azure extensions for VS Code", | ||
@@ -47,2 +47,3 @@ "tags": [ | ||
"@microsoft/eslint-config-azuretools": "^0.1.0", | ||
"@microsoft/vscode-azext-dev": "^0.1.1", | ||
"@types/fs-extra": "^8.1.0", | ||
@@ -63,5 +64,4 @@ "@types/html-to-text": "^1.4.31", | ||
"typescript": "^4.3.5", | ||
"vscode-azureextensiondev": "^0.10.4", | ||
"vscode-test": "^1.3.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
251331
54
4974