Bump semver

This commit is contained in:
Henry Mercer 2023-07-11 20:48:06 +01:00
parent 863a05b28b
commit 4b7eb74ef5
579 changed files with 13988 additions and 29840 deletions

View file

@ -15,7 +15,7 @@ const debugObj = Object.assign((namespace) => {
enable,
enabled,
disable,
log
log,
});
function enable(namespaces) {
enabledString = namespaces;
@ -62,7 +62,7 @@ function createDebugger(namespace) {
destroy,
log: debugObj.log,
namespace,
extend
extend,
});
function debug(...args) {
if (!newDebugger.enabled) {

File diff suppressed because one or more lines are too long

View file

@ -24,7 +24,7 @@ if (logLevelFromEnv) {
}
}
/**
* Immediately enables logging at the specified log level.
* Immediately enables logging at the specified log level. If no level is specified, logging is disabled.
* @param level - The log level to enable for logging.
* Options from most verbose to least verbose are:
* - verbose
@ -55,7 +55,7 @@ const levelMap = {
verbose: 400,
info: 300,
warning: 200,
error: 100
error: 100,
};
/**
* Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.
@ -69,7 +69,7 @@ export function createClientLogger(namespace) {
error: createLogger(clientRootLogger, "error"),
warning: createLogger(clientRootLogger, "warning"),
info: createLogger(clientRootLogger, "info"),
verbose: createLogger(clientRootLogger, "verbose")
verbose: createLogger(clientRootLogger, "verbose"),
};
}
function patchLogMethod(parent, child) {
@ -79,7 +79,7 @@ function patchLogMethod(parent, child) {
}
function createLogger(parent, level) {
const logger = Object.assign(parent.extend(level), {
level
level,
});
patchLogMethod(parent, logger);
if (shouldEnable(logger)) {
@ -90,12 +90,7 @@ function createLogger(parent, level) {
return logger;
}
function shouldEnable(logger) {
if (azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]) {
return true;
}
else {
return false;
}
return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);
}
function isAzureLogLevel(logLevel) {
return AZURE_LOG_LEVELS.includes(logLevel);

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import util from "util";
import { EOL } from "os";
import util from "util";
export function log(message, ...args) {
process.stderr.write(`${util.format(message, ...args)}${EOL}`);
}

View file

@ -1 +1 @@
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;AAEzB,MAAM,UAAU,GAAG,CAAC,OAAgB,EAAE,GAAG,IAAW;IAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;AACjE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport util from \"util\";\nimport { EOL } from \"os\";\n\nexport function log(message: unknown, ...args: any[]): void {\n process.stderr.write(`${util.format(message, ...args)}${EOL}`);\n}\n"]}
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,UAAU,GAAG,CAAC,OAAgB,EAAE,GAAG,IAAW;IAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;AACjE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { EOL } from \"os\";\nimport util from \"util\";\n\nexport function log(message: unknown, ...args: any[]): void {\n process.stderr.write(`${util.format(message, ...args)}${EOL}`);\n}\n"]}