index.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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, 'invariant', {
  60. enumerable: true,
  61. get: function () {
  62. return _invariant.default;
  63. }
  64. });
  65. Object.defineProperty(exports, 'isInteractive', {
  66. enumerable: true,
  67. get: function () {
  68. return _isInteractive.default;
  69. }
  70. });
  71. Object.defineProperty(exports, 'isNonNullable', {
  72. enumerable: true,
  73. get: function () {
  74. return _isNonNullable.default;
  75. }
  76. });
  77. Object.defineProperty(exports, 'isPromise', {
  78. enumerable: true,
  79. get: function () {
  80. return _isPromise.default;
  81. }
  82. });
  83. Object.defineProperty(exports, 'pluralize', {
  84. enumerable: true,
  85. get: function () {
  86. return _pluralize.default;
  87. }
  88. });
  89. exports.preRunMessage = void 0;
  90. Object.defineProperty(exports, 'replacePathSepForGlob', {
  91. enumerable: true,
  92. get: function () {
  93. return _replacePathSepForGlob.default;
  94. }
  95. });
  96. Object.defineProperty(exports, 'requireOrImportModule', {
  97. enumerable: true,
  98. get: function () {
  99. return _requireOrImportModule.default;
  100. }
  101. });
  102. Object.defineProperty(exports, 'setGlobal', {
  103. enumerable: true,
  104. get: function () {
  105. return _setGlobal.default;
  106. }
  107. });
  108. exports.specialChars = void 0;
  109. Object.defineProperty(exports, 'testPathPatternToRegExp', {
  110. enumerable: true,
  111. get: function () {
  112. return _testPathPatternToRegExp.default;
  113. }
  114. });
  115. Object.defineProperty(exports, 'tryRealpath', {
  116. enumerable: true,
  117. get: function () {
  118. return _tryRealpath.default;
  119. }
  120. });
  121. var preRunMessage = _interopRequireWildcard(require('./preRunMessage'));
  122. exports.preRunMessage = preRunMessage;
  123. var specialChars = _interopRequireWildcard(require('./specialChars'));
  124. exports.specialChars = specialChars;
  125. var _clearLine = _interopRequireDefault2(require('./clearLine'));
  126. var _createDirectory = _interopRequireDefault2(require('./createDirectory'));
  127. var _ErrorWithStack = _interopRequireDefault2(require('./ErrorWithStack'));
  128. var _installCommonGlobals = _interopRequireDefault2(
  129. require('./installCommonGlobals')
  130. );
  131. var _interopRequireDefault = _interopRequireDefault2(
  132. require('./interopRequireDefault')
  133. );
  134. var _isInteractive = _interopRequireDefault2(require('./isInteractive'));
  135. var _isPromise = _interopRequireDefault2(require('./isPromise'));
  136. var _setGlobal = _interopRequireDefault2(require('./setGlobal'));
  137. var _deepCyclicCopy = _interopRequireDefault2(require('./deepCyclicCopy'));
  138. var _convertDescriptorToString = _interopRequireDefault2(
  139. require('./convertDescriptorToString')
  140. );
  141. var _replacePathSepForGlob = _interopRequireDefault2(
  142. require('./replacePathSepForGlob')
  143. );
  144. var _testPathPatternToRegExp = _interopRequireDefault2(
  145. require('./testPathPatternToRegExp')
  146. );
  147. var _globsToMatcher = _interopRequireDefault2(require('./globsToMatcher'));
  148. var _pluralize = _interopRequireDefault2(require('./pluralize'));
  149. var _formatTime = _interopRequireDefault2(require('./formatTime'));
  150. var _tryRealpath = _interopRequireDefault2(require('./tryRealpath'));
  151. var _requireOrImportModule = _interopRequireDefault2(
  152. require('./requireOrImportModule')
  153. );
  154. var _invariant = _interopRequireDefault2(require('./invariant'));
  155. var _isNonNullable = _interopRequireDefault2(require('./isNonNullable'));
  156. function _interopRequireDefault2(obj) {
  157. return obj && obj.__esModule ? obj : {default: obj};
  158. }
  159. function _getRequireWildcardCache(nodeInterop) {
  160. if (typeof WeakMap !== 'function') return null;
  161. var cacheBabelInterop = new WeakMap();
  162. var cacheNodeInterop = new WeakMap();
  163. return (_getRequireWildcardCache = function (nodeInterop) {
  164. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  165. })(nodeInterop);
  166. }
  167. function _interopRequireWildcard(obj, nodeInterop) {
  168. if (!nodeInterop && obj && obj.__esModule) {
  169. return obj;
  170. }
  171. if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
  172. return {default: obj};
  173. }
  174. var cache = _getRequireWildcardCache(nodeInterop);
  175. if (cache && cache.has(obj)) {
  176. return cache.get(obj);
  177. }
  178. var newObj = {};
  179. var hasPropertyDescriptor =
  180. Object.defineProperty && Object.getOwnPropertyDescriptor;
  181. for (var key in obj) {
  182. if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {
  183. var desc = hasPropertyDescriptor
  184. ? Object.getOwnPropertyDescriptor(obj, key)
  185. : null;
  186. if (desc && (desc.get || desc.set)) {
  187. Object.defineProperty(newObj, key, desc);
  188. } else {
  189. newObj[key] = obj[key];
  190. }
  191. }
  192. }
  193. newObj.default = obj;
  194. if (cache) {
  195. cache.set(obj, newObj);
  196. }
  197. return newObj;
  198. }