Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
21
node_modules/axios/lib/helpers/validator.js
generated
vendored
21
node_modules/axios/lib/helpers/validator.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import {VERSION} from '../env/data.js';
|
||||
import { VERSION } from '../env/data.js';
|
||||
import AxiosError from '../core/AxiosError.js';
|
||||
|
||||
const validators = {};
|
||||
@@ -25,7 +25,15 @@ const deprecatedWarnings = {};
|
||||
*/
|
||||
validators.transitional = function transitional(validator, version, message) {
|
||||
function formatMessage(opt, desc) {
|
||||
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
||||
return (
|
||||
'[Axios v' +
|
||||
VERSION +
|
||||
"] Transitional option '" +
|
||||
opt +
|
||||
"'" +
|
||||
desc +
|
||||
(message ? '. ' + message : '')
|
||||
);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line func-names
|
||||
@@ -57,7 +65,7 @@ validators.spelling = function spelling(correctSpelling) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -83,7 +91,10 @@ function assertOptions(options, schema, allowUnknown) {
|
||||
const value = options[opt];
|
||||
const result = value === undefined || validator(value, opt, options);
|
||||
if (result !== true) {
|
||||
throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
||||
throw new AxiosError(
|
||||
'option ' + opt + ' must be ' + result,
|
||||
AxiosError.ERR_BAD_OPTION_VALUE
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -95,5 +106,5 @@ function assertOptions(options, schema, allowUnknown) {
|
||||
|
||||
export default {
|
||||
assertOptions,
|
||||
validators
|
||||
validators,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user