Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

warnings.js 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. exports.unknownOptionWarning = void 0;
  6. function _chalk() {
  7. const data = _interopRequireDefault(require('chalk'));
  8. _chalk = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. var _utils = require('./utils');
  14. function _interopRequireDefault(obj) {
  15. return obj && obj.__esModule ? obj : {default: obj};
  16. }
  17. /**
  18. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  19. *
  20. * This source code is licensed under the MIT license found in the
  21. * LICENSE file in the root directory of this source tree.
  22. */
  23. const unknownOptionWarning = (config, exampleConfig, option, options, path) => {
  24. const didYouMean = (0, _utils.createDidYouMeanMessage)(
  25. option,
  26. Object.keys(exampleConfig)
  27. );
  28. const message =
  29. ` Unknown option ${_chalk().default.bold(
  30. `"${path && path.length > 0 ? path.join('.') + '.' : ''}${option}"`
  31. )} with value ${_chalk().default.bold(
  32. (0, _utils.format)(config[option])
  33. )} was found.` +
  34. (didYouMean && ` ${didYouMean}`) +
  35. `\n This is probably a typing mistake. Fixing it will remove this message.`;
  36. const comment = options.comment;
  37. const name = (options.title && options.title.warning) || _utils.WARNING;
  38. (0, _utils.logValidationWarning)(name, message, comment);
  39. };
  40. exports.unknownOptionWarning = unknownOptionWarning;