index.js 5.3 KB

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