index.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. Object.defineProperty(exports, 'clearLine', {
  6. enumerable: true,
  7. get: function () {
  8. return _clearLine.default;
  9. }
  10. });
  11. Object.defineProperty(exports, 'createDirectory', {
  12. enumerable: true,
  13. get: function () {
  14. return _createDirectory.default;
  15. }
  16. });
  17. Object.defineProperty(exports, 'ErrorWithStack', {
  18. enumerable: true,
  19. get: function () {
  20. return _ErrorWithStack.default;
  21. }
  22. });
  23. Object.defineProperty(exports, 'installCommonGlobals', {
  24. enumerable: true,
  25. get: function () {
  26. return _installCommonGlobals.default;
  27. }
  28. });
  29. Object.defineProperty(exports, 'interopRequireDefault', {
  30. enumerable: true,
  31. get: function () {
  32. return _interopRequireDefault.default;
  33. }
  34. });
  35. Object.defineProperty(exports, 'isInteractive', {
  36. enumerable: true,
  37. get: function () {
  38. return _isInteractive.default;
  39. }
  40. });
  41. Object.defineProperty(exports, 'isPromise', {
  42. enumerable: true,
  43. get: function () {
  44. return _isPromise.default;
  45. }
  46. });
  47. Object.defineProperty(exports, 'setGlobal', {
  48. enumerable: true,
  49. get: function () {
  50. return _setGlobal.default;
  51. }
  52. });
  53. Object.defineProperty(exports, 'deepCyclicCopy', {
  54. enumerable: true,
  55. get: function () {
  56. return _deepCyclicCopy.default;
  57. }
  58. });
  59. Object.defineProperty(exports, 'convertDescriptorToString', {
  60. enumerable: true,
  61. get: function () {
  62. return _convertDescriptorToString.default;
  63. }
  64. });
  65. Object.defineProperty(exports, 'replacePathSepForGlob', {
  66. enumerable: true,
  67. get: function () {
  68. return _replacePathSepForGlob.default;
  69. }
  70. });
  71. Object.defineProperty(exports, 'testPathPatternToRegExp', {
  72. enumerable: true,
  73. get: function () {
  74. return _testPathPatternToRegExp.default;
  75. }
  76. });
  77. Object.defineProperty(exports, 'globsToMatcher', {
  78. enumerable: true,
  79. get: function () {
  80. return _globsToMatcher.default;
  81. }
  82. });
  83. Object.defineProperty(exports, 'pluralize', {
  84. enumerable: true,
  85. get: function () {
  86. return _pluralize.default;
  87. }
  88. });
  89. Object.defineProperty(exports, 'formatTime', {
  90. enumerable: true,
  91. get: function () {
  92. return _formatTime.default;
  93. }
  94. });
  95. Object.defineProperty(exports, 'tryRealpath', {
  96. enumerable: true,
  97. get: function () {
  98. return _tryRealpath.default;
  99. }
  100. });
  101. exports.preRunMessage = exports.specialChars = void 0;
  102. var _clearLine = _interopRequireDefault2(require('./clearLine'));
  103. var _createDirectory = _interopRequireDefault2(require('./createDirectory'));
  104. var _ErrorWithStack = _interopRequireDefault2(require('./ErrorWithStack'));
  105. var _installCommonGlobals = _interopRequireDefault2(
  106. require('./installCommonGlobals')
  107. );
  108. var _interopRequireDefault = _interopRequireDefault2(
  109. require('./interopRequireDefault')
  110. );
  111. var _isInteractive = _interopRequireDefault2(require('./isInteractive'));
  112. var _isPromise = _interopRequireDefault2(require('./isPromise'));
  113. var _setGlobal = _interopRequireDefault2(require('./setGlobal'));
  114. var _deepCyclicCopy = _interopRequireDefault2(require('./deepCyclicCopy'));
  115. var _convertDescriptorToString = _interopRequireDefault2(
  116. require('./convertDescriptorToString')
  117. );
  118. var _specialChars = _interopRequireWildcard(require('./specialChars'));
  119. exports.specialChars = _specialChars;
  120. var _replacePathSepForGlob = _interopRequireDefault2(
  121. require('./replacePathSepForGlob')
  122. );
  123. var _testPathPatternToRegExp = _interopRequireDefault2(
  124. require('./testPathPatternToRegExp')
  125. );
  126. var _globsToMatcher = _interopRequireDefault2(require('./globsToMatcher'));
  127. var _preRunMessage = _interopRequireWildcard(require('./preRunMessage'));
  128. exports.preRunMessage = _preRunMessage;
  129. var _pluralize = _interopRequireDefault2(require('./pluralize'));
  130. var _formatTime = _interopRequireDefault2(require('./formatTime'));
  131. var _tryRealpath = _interopRequireDefault2(require('./tryRealpath'));
  132. function _getRequireWildcardCache() {
  133. if (typeof WeakMap !== 'function') return null;
  134. var cache = new WeakMap();
  135. _getRequireWildcardCache = function () {
  136. return cache;
  137. };
  138. return cache;
  139. }
  140. function _interopRequireWildcard(obj) {
  141. if (obj && obj.__esModule) {
  142. return obj;
  143. }
  144. if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
  145. return {default: obj};
  146. }
  147. var cache = _getRequireWildcardCache();
  148. if (cache && cache.has(obj)) {
  149. return cache.get(obj);
  150. }
  151. var newObj = {};
  152. var hasPropertyDescriptor =
  153. Object.defineProperty && Object.getOwnPropertyDescriptor;
  154. for (var key in obj) {
  155. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  156. var desc = hasPropertyDescriptor
  157. ? Object.getOwnPropertyDescriptor(obj, key)
  158. : null;
  159. if (desc && (desc.get || desc.set)) {
  160. Object.defineProperty(newObj, key, desc);
  161. } else {
  162. newObj[key] = obj[key];
  163. }
  164. }
  165. }
  166. newObj.default = obj;
  167. if (cache) {
  168. cache.set(obj, newObj);
  169. }
  170. return newObj;
  171. }
  172. function _interopRequireDefault2(obj) {
  173. return obj && obj.__esModule ? obj : {default: obj};
  174. }