projen 0.91.16 → 0.91.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/.jsii +62 -18
  2. package/lib/awscdk/auto-discover.js +5 -5
  3. package/lib/awscdk/awscdk-app-java.js +1 -1
  4. package/lib/awscdk/awscdk-app-py.js +1 -1
  5. package/lib/awscdk/awscdk-app-ts.js +1 -1
  6. package/lib/awscdk/awscdk-construct.js +2 -2
  7. package/lib/awscdk/awscdk-deps-java.js +1 -1
  8. package/lib/awscdk/awscdk-deps-js.js +1 -1
  9. package/lib/awscdk/awscdk-deps-py.js +1 -1
  10. package/lib/awscdk/awscdk-deps.js +1 -1
  11. package/lib/awscdk/cdk-config.js +1 -1
  12. package/lib/awscdk/cdk-tasks.js +1 -1
  13. package/lib/awscdk/integration-test.js +1 -1
  14. package/lib/awscdk/lambda-extension.js +1 -1
  15. package/lib/awscdk/lambda-function.js +2 -2
  16. package/lib/build/build-workflow.js +1 -1
  17. package/lib/cdk/auto-discover-base.js +2 -2
  18. package/lib/cdk/construct-lib.js +1 -1
  19. package/lib/cdk/integration-test-base.js +1 -1
  20. package/lib/cdk/jsii-docgen.js +1 -1
  21. package/lib/cdk/jsii-project.js +1 -1
  22. package/lib/cdk8s/auto-discover.js +2 -2
  23. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  24. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  25. package/lib/cdk8s/cdk8s-construct.js +1 -1
  26. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  27. package/lib/cdk8s/cdk8s-deps.js +1 -1
  28. package/lib/cdk8s/integration-test.js +1 -1
  29. package/lib/cdktf/cdktf-construct.js +1 -1
  30. package/lib/circleci/circleci.js +1 -1
  31. package/lib/component.js +1 -1
  32. package/lib/dependencies.js +1 -1
  33. package/lib/dev-env.js +1 -1
  34. package/lib/docker-compose/docker-compose-service.js +1 -1
  35. package/lib/docker-compose/docker-compose.js +1 -1
  36. package/lib/file.js +1 -1
  37. package/lib/gitattributes.js +1 -1
  38. package/lib/github/actions-provider.js +1 -1
  39. package/lib/github/auto-approve.js +1 -1
  40. package/lib/github/auto-merge.js +1 -1
  41. package/lib/github/auto-queue.js +1 -1
  42. package/lib/github/dependabot.js +1 -1
  43. package/lib/github/github-credentials.js +1 -1
  44. package/lib/github/github-project.js +1 -1
  45. package/lib/github/github.js +1 -1
  46. package/lib/github/merge-queue.js +1 -1
  47. package/lib/github/mergify.js +1 -1
  48. package/lib/github/pr-template.js +1 -1
  49. package/lib/github/pull-request-backport.js +1 -1
  50. package/lib/github/pull-request-lint.js +1 -1
  51. package/lib/github/stale.js +1 -1
  52. package/lib/github/task-workflow-job.js +1 -1
  53. package/lib/github/task-workflow.js +1 -1
  54. package/lib/github/workflow-actions.js +1 -1
  55. package/lib/github/workflow-jobs.js +1 -1
  56. package/lib/github/workflow-steps.js +1 -1
  57. package/lib/github/workflows.d.ts +10 -0
  58. package/lib/github/workflows.js +4 -2
  59. package/lib/gitlab/configuration.js +1 -1
  60. package/lib/gitlab/gitlab-configuration.js +1 -1
  61. package/lib/gitlab/nested-configuration.js +1 -1
  62. package/lib/gitpod.js +1 -1
  63. package/lib/ignore-file.js +1 -1
  64. package/lib/ini.js +1 -1
  65. package/lib/java/java-project.js +1 -1
  66. package/lib/java/junit.js +1 -1
  67. package/lib/java/maven-compile.js +1 -1
  68. package/lib/java/maven-packaging.js +1 -1
  69. package/lib/java/maven-sample.js +1 -1
  70. package/lib/java/pom.js +2 -2
  71. package/lib/java/projenrc.js +1 -1
  72. package/lib/javascript/bundler.js +1 -1
  73. package/lib/javascript/eslint.js +1 -1
  74. package/lib/javascript/jest.js +4 -4
  75. package/lib/javascript/license-checker.js +1 -1
  76. package/lib/javascript/node-package.js +1 -1
  77. package/lib/javascript/node-project.js +1 -1
  78. package/lib/javascript/npm-config.js +1 -1
  79. package/lib/javascript/prettier.js +1 -1
  80. package/lib/javascript/projenrc.js +1 -1
  81. package/lib/javascript/typescript-config.js +2 -2
  82. package/lib/javascript/upgrade-dependencies.js +2 -2
  83. package/lib/javascript/yarnrc.js +1 -1
  84. package/lib/json-patch.js +1 -1
  85. package/lib/json.js +1 -1
  86. package/lib/license.js +1 -1
  87. package/lib/logger.js +1 -1
  88. package/lib/makefile.js +1 -1
  89. package/lib/object-file.js +1 -1
  90. package/lib/project-build.js +1 -1
  91. package/lib/project-tree.js +1 -1
  92. package/lib/project.js +1 -1
  93. package/lib/projects.js +1 -1
  94. package/lib/projenrc-json.js +2 -2
  95. package/lib/projenrc.js +1 -1
  96. package/lib/python/pip.js +1 -1
  97. package/lib/python/poetry.js +2 -2
  98. package/lib/python/projenrc.js +1 -1
  99. package/lib/python/pytest-sample.js +1 -1
  100. package/lib/python/pytest.js +1 -1
  101. package/lib/python/python-project.js +1 -1
  102. package/lib/python/python-sample.js +1 -1
  103. package/lib/python/requirements-file.js +1 -1
  104. package/lib/python/setuppy.js +1 -1
  105. package/lib/python/setuptools.js +1 -1
  106. package/lib/python/venv.js +1 -1
  107. package/lib/readme.js +1 -1
  108. package/lib/release/publisher.js +1 -1
  109. package/lib/release/release-trigger.js +1 -1
  110. package/lib/release/release.js +1 -1
  111. package/lib/renovatebot.js +1 -1
  112. package/lib/sample-file.js +2 -2
  113. package/lib/semver.js +1 -1
  114. package/lib/source-code.js +1 -1
  115. package/lib/task-runtime.js +1 -1
  116. package/lib/task.js +1 -1
  117. package/lib/tasks.js +1 -1
  118. package/lib/testing.js +1 -1
  119. package/lib/textfile.js +1 -1
  120. package/lib/toml.js +1 -1
  121. package/lib/typescript/projenrc-ts.js +1 -1
  122. package/lib/typescript/projenrc.js +1 -1
  123. package/lib/typescript/typescript-typedoc.js +1 -1
  124. package/lib/typescript/typescript.js +6 -6
  125. package/lib/version.js +2 -2
  126. package/lib/vscode/devcontainer.js +1 -1
  127. package/lib/vscode/extensions.js +1 -1
  128. package/lib/vscode/launch-config.js +1 -1
  129. package/lib/vscode/settings.js +1 -1
  130. package/lib/vscode/vscode.js +1 -1
  131. package/lib/web/next.js +3 -3
  132. package/lib/web/postcss.js +1 -1
  133. package/lib/web/react.js +4 -4
  134. package/lib/web/tailwind.js +1 -1
  135. package/lib/xmlfile.js +1 -1
  136. package/lib/yaml.js +1 -1
  137. package/node_modules/{minimatch/node_modules/brace-expansion → @nodelib/fs.scandir}/LICENSE +2 -2
  138. package/node_modules/@nodelib/fs.scandir/README.md +171 -0
  139. package/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
  140. package/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
  141. package/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
  142. package/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
  143. package/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
  144. package/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
  145. package/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
  146. package/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
  147. package/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
  148. package/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
  149. package/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
  150. package/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
  151. package/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
  152. package/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
  153. package/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
  154. package/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
  155. package/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
  156. package/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
  157. package/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
  158. package/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
  159. package/node_modules/@nodelib/fs.scandir/package.json +44 -0
  160. package/node_modules/@nodelib/fs.stat/LICENSE +21 -0
  161. package/node_modules/@nodelib/fs.stat/README.md +126 -0
  162. package/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
  163. package/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
  164. package/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
  165. package/node_modules/@nodelib/fs.stat/out/index.js +26 -0
  166. package/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
  167. package/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
  168. package/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
  169. package/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
  170. package/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
  171. package/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
  172. package/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
  173. package/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
  174. package/node_modules/@nodelib/fs.stat/package.json +37 -0
  175. package/node_modules/@nodelib/fs.walk/LICENSE +21 -0
  176. package/node_modules/@nodelib/fs.walk/README.md +215 -0
  177. package/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
  178. package/node_modules/@nodelib/fs.walk/out/index.js +34 -0
  179. package/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
  180. package/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
  181. package/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
  182. package/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
  183. package/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
  184. package/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
  185. package/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
  186. package/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
  187. package/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
  188. package/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
  189. package/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
  190. package/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
  191. package/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
  192. package/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
  193. package/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
  194. package/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
  195. package/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
  196. package/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
  197. package/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
  198. package/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
  199. package/node_modules/@nodelib/fs.walk/package.json +44 -0
  200. package/node_modules/braces/LICENSE +21 -0
  201. package/node_modules/braces/README.md +586 -0
  202. package/node_modules/braces/index.js +170 -0
  203. package/node_modules/braces/lib/compile.js +60 -0
  204. package/node_modules/braces/lib/constants.js +57 -0
  205. package/node_modules/braces/lib/expand.js +113 -0
  206. package/node_modules/braces/lib/parse.js +331 -0
  207. package/node_modules/braces/lib/stringify.js +32 -0
  208. package/node_modules/braces/lib/utils.js +122 -0
  209. package/node_modules/braces/package.json +77 -0
  210. package/node_modules/end-of-stream/LICENSE +21 -0
  211. package/node_modules/end-of-stream/README.md +54 -0
  212. package/node_modules/end-of-stream/index.js +94 -0
  213. package/node_modules/end-of-stream/package.json +37 -0
  214. package/node_modules/execa/index.js +361 -0
  215. package/node_modules/execa/lib/errname.js +39 -0
  216. package/node_modules/execa/lib/stdio.js +41 -0
  217. package/node_modules/execa/license +9 -0
  218. package/node_modules/execa/node_modules/cross-spawn/LICENSE +21 -0
  219. package/node_modules/execa/node_modules/cross-spawn/README.md +94 -0
  220. package/node_modules/execa/node_modules/cross-spawn/index.js +39 -0
  221. package/node_modules/execa/node_modules/cross-spawn/lib/enoent.js +59 -0
  222. package/node_modules/execa/node_modules/cross-spawn/lib/parse.js +125 -0
  223. package/node_modules/execa/node_modules/cross-spawn/lib/util/escape.js +47 -0
  224. package/node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js +32 -0
  225. package/node_modules/execa/node_modules/cross-spawn/lib/util/resolveCommand.js +51 -0
  226. package/node_modules/execa/node_modules/cross-spawn/package.json +75 -0
  227. package/node_modules/execa/node_modules/semver/README.md +412 -0
  228. package/node_modules/execa/node_modules/semver/bin/semver +160 -0
  229. package/node_modules/execa/node_modules/semver/package.json +38 -0
  230. package/node_modules/execa/node_modules/semver/range.bnf +16 -0
  231. package/node_modules/execa/node_modules/semver/semver.js +1525 -0
  232. package/node_modules/execa/node_modules/shebang-command/index.js +19 -0
  233. package/node_modules/execa/node_modules/shebang-command/license +21 -0
  234. package/node_modules/execa/node_modules/shebang-command/package.json +39 -0
  235. package/node_modules/execa/node_modules/shebang-command/readme.md +39 -0
  236. package/node_modules/execa/node_modules/shebang-regex/index.js +2 -0
  237. package/node_modules/execa/node_modules/shebang-regex/package.json +32 -0
  238. package/node_modules/execa/node_modules/shebang-regex/readme.md +29 -0
  239. package/node_modules/{shelljs/node_modules/glob → execa/node_modules/which}/LICENSE +0 -6
  240. package/node_modules/execa/node_modules/which/README.md +51 -0
  241. package/node_modules/execa/node_modules/which/bin/which +52 -0
  242. package/node_modules/execa/node_modules/which/package.json +30 -0
  243. package/node_modules/execa/node_modules/which/which.js +135 -0
  244. package/node_modules/execa/package.json +69 -0
  245. package/node_modules/execa/readme.md +327 -0
  246. package/node_modules/fast-glob/LICENSE +21 -0
  247. package/node_modules/fast-glob/README.md +830 -0
  248. package/node_modules/fast-glob/node_modules/glob-parent/LICENSE +15 -0
  249. package/node_modules/fast-glob/node_modules/glob-parent/README.md +137 -0
  250. package/node_modules/fast-glob/node_modules/glob-parent/index.js +42 -0
  251. package/node_modules/fast-glob/node_modules/glob-parent/package.json +48 -0
  252. package/node_modules/fast-glob/out/index.d.ts +40 -0
  253. package/node_modules/fast-glob/out/index.js +102 -0
  254. package/node_modules/fast-glob/out/managers/tasks.d.ts +22 -0
  255. package/node_modules/fast-glob/out/managers/tasks.js +110 -0
  256. package/node_modules/fast-glob/out/providers/async.d.ts +9 -0
  257. package/node_modules/fast-glob/out/providers/async.js +23 -0
  258. package/node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0
  259. package/node_modules/fast-glob/out/providers/filters/deep.js +62 -0
  260. package/node_modules/fast-glob/out/providers/filters/entry.d.ts +17 -0
  261. package/node_modules/fast-glob/out/providers/filters/entry.js +85 -0
  262. package/node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0
  263. package/node_modules/fast-glob/out/providers/filters/error.js +15 -0
  264. package/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0
  265. package/node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0
  266. package/node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0
  267. package/node_modules/fast-glob/out/providers/matchers/partial.js +38 -0
  268. package/node_modules/fast-glob/out/providers/provider.d.ts +19 -0
  269. package/node_modules/fast-glob/out/providers/provider.js +48 -0
  270. package/node_modules/fast-glob/out/providers/stream.d.ts +11 -0
  271. package/node_modules/fast-glob/out/providers/stream.js +31 -0
  272. package/node_modules/fast-glob/out/providers/sync.d.ts +9 -0
  273. package/node_modules/fast-glob/out/providers/sync.js +23 -0
  274. package/node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0
  275. package/node_modules/fast-glob/out/providers/transformers/entry.js +26 -0
  276. package/node_modules/fast-glob/out/readers/async.d.ts +10 -0
  277. package/node_modules/fast-glob/out/readers/async.js +35 -0
  278. package/node_modules/fast-glob/out/readers/reader.d.ts +15 -0
  279. package/node_modules/fast-glob/out/readers/reader.js +33 -0
  280. package/node_modules/fast-glob/out/readers/stream.d.ts +14 -0
  281. package/node_modules/fast-glob/out/readers/stream.js +55 -0
  282. package/node_modules/fast-glob/out/readers/sync.d.ts +12 -0
  283. package/node_modules/fast-glob/out/readers/sync.js +43 -0
  284. package/node_modules/fast-glob/out/settings.d.ts +164 -0
  285. package/node_modules/fast-glob/out/settings.js +59 -0
  286. package/node_modules/fast-glob/out/types/index.d.ts +31 -0
  287. package/node_modules/fast-glob/out/types/index.js +2 -0
  288. package/node_modules/fast-glob/out/utils/array.d.ts +2 -0
  289. package/node_modules/fast-glob/out/utils/array.js +22 -0
  290. package/node_modules/fast-glob/out/utils/errno.d.ts +2 -0
  291. package/node_modules/fast-glob/out/utils/errno.js +7 -0
  292. package/node_modules/fast-glob/out/utils/fs.d.ts +4 -0
  293. package/node_modules/fast-glob/out/utils/fs.js +19 -0
  294. package/node_modules/fast-glob/out/utils/index.d.ts +8 -0
  295. package/node_modules/fast-glob/out/utils/index.js +17 -0
  296. package/node_modules/fast-glob/out/utils/path.d.ts +13 -0
  297. package/node_modules/fast-glob/out/utils/path.js +68 -0
  298. package/node_modules/fast-glob/out/utils/pattern.d.ts +49 -0
  299. package/node_modules/fast-glob/out/utils/pattern.js +206 -0
  300. package/node_modules/fast-glob/out/utils/stream.d.ts +4 -0
  301. package/node_modules/fast-glob/out/utils/stream.js +17 -0
  302. package/node_modules/fast-glob/out/utils/string.d.ts +2 -0
  303. package/node_modules/fast-glob/out/utils/string.js +11 -0
  304. package/node_modules/fast-glob/package.json +81 -0
  305. package/node_modules/fastq/.github/dependabot.yml +11 -0
  306. package/node_modules/fastq/.github/workflows/ci.yml +75 -0
  307. package/node_modules/fastq/LICENSE +13 -0
  308. package/node_modules/fastq/README.md +312 -0
  309. package/node_modules/fastq/SECURITY.md +15 -0
  310. package/node_modules/fastq/bench.js +66 -0
  311. package/node_modules/fastq/example.js +14 -0
  312. package/node_modules/fastq/example.mjs +11 -0
  313. package/node_modules/fastq/index.d.ts +57 -0
  314. package/node_modules/fastq/package.json +53 -0
  315. package/node_modules/fastq/queue.js +311 -0
  316. package/node_modules/fastq/test/example.ts +83 -0
  317. package/node_modules/fastq/test/promise.js +291 -0
  318. package/node_modules/fastq/test/test.js +653 -0
  319. package/node_modules/fastq/test/tsconfig.json +11 -0
  320. package/node_modules/fill-range/LICENSE +21 -0
  321. package/node_modules/fill-range/README.md +237 -0
  322. package/node_modules/fill-range/index.js +248 -0
  323. package/node_modules/fill-range/package.json +74 -0
  324. package/node_modules/get-stream/buffer-stream.js +51 -0
  325. package/node_modules/get-stream/index.js +50 -0
  326. package/node_modules/get-stream/license +9 -0
  327. package/node_modules/get-stream/package.json +46 -0
  328. package/node_modules/get-stream/readme.md +123 -0
  329. package/node_modules/is-extglob/LICENSE +21 -0
  330. package/node_modules/is-extglob/README.md +107 -0
  331. package/node_modules/is-extglob/index.js +20 -0
  332. package/node_modules/is-extglob/package.json +69 -0
  333. package/node_modules/is-glob/LICENSE +21 -0
  334. package/node_modules/is-glob/README.md +206 -0
  335. package/node_modules/is-glob/index.js +150 -0
  336. package/node_modules/is-glob/package.json +81 -0
  337. package/node_modules/is-number/LICENSE +21 -0
  338. package/node_modules/is-number/README.md +187 -0
  339. package/node_modules/is-number/index.js +18 -0
  340. package/node_modules/is-number/package.json +82 -0
  341. package/node_modules/is-stream/index.js +21 -0
  342. package/node_modules/is-stream/license +21 -0
  343. package/node_modules/is-stream/package.json +38 -0
  344. package/node_modules/is-stream/readme.md +42 -0
  345. package/node_modules/isexe/.npmignore +2 -0
  346. package/node_modules/isexe/LICENSE +15 -0
  347. package/node_modules/isexe/README.md +51 -0
  348. package/node_modules/isexe/index.js +57 -0
  349. package/node_modules/isexe/mode.js +41 -0
  350. package/node_modules/isexe/package.json +31 -0
  351. package/node_modules/isexe/test/basic.js +221 -0
  352. package/node_modules/isexe/windows.js +42 -0
  353. package/node_modules/merge2/LICENSE +21 -0
  354. package/node_modules/merge2/README.md +144 -0
  355. package/node_modules/merge2/index.js +144 -0
  356. package/node_modules/merge2/package.json +43 -0
  357. package/node_modules/micromatch/LICENSE +21 -0
  358. package/node_modules/micromatch/README.md +1024 -0
  359. package/node_modules/micromatch/index.js +474 -0
  360. package/node_modules/micromatch/package.json +119 -0
  361. package/node_modules/nice-try/LICENSE +21 -0
  362. package/node_modules/nice-try/README.md +32 -0
  363. package/node_modules/nice-try/package.json +33 -0
  364. package/node_modules/nice-try/src/index.js +12 -0
  365. package/node_modules/npm-run-path/index.js +39 -0
  366. package/node_modules/npm-run-path/license +21 -0
  367. package/node_modules/npm-run-path/package.json +45 -0
  368. package/node_modules/npm-run-path/readme.md +81 -0
  369. package/node_modules/p-finally/index.js +15 -0
  370. package/node_modules/p-finally/license +21 -0
  371. package/node_modules/p-finally/package.json +42 -0
  372. package/node_modules/p-finally/readme.md +47 -0
  373. package/node_modules/path-key/index.js +13 -0
  374. package/node_modules/path-key/license +21 -0
  375. package/node_modules/path-key/package.json +39 -0
  376. package/node_modules/path-key/readme.md +51 -0
  377. package/node_modules/picomatch/LICENSE +21 -0
  378. package/node_modules/picomatch/README.md +708 -0
  379. package/node_modules/picomatch/index.js +3 -0
  380. package/node_modules/picomatch/lib/constants.js +179 -0
  381. package/node_modules/picomatch/lib/parse.js +1091 -0
  382. package/node_modules/picomatch/lib/picomatch.js +342 -0
  383. package/node_modules/picomatch/lib/scan.js +391 -0
  384. package/node_modules/picomatch/lib/utils.js +64 -0
  385. package/node_modules/picomatch/package.json +81 -0
  386. package/node_modules/pump/.github/FUNDING.yml +2 -0
  387. package/node_modules/pump/.travis.yml +5 -0
  388. package/node_modules/pump/LICENSE +21 -0
  389. package/node_modules/pump/README.md +74 -0
  390. package/node_modules/pump/SECURITY.md +5 -0
  391. package/node_modules/pump/index.js +86 -0
  392. package/node_modules/pump/package.json +24 -0
  393. package/node_modules/pump/test-browser.js +66 -0
  394. package/node_modules/pump/test-node.js +53 -0
  395. package/node_modules/{concat-map → queue-microtask}/LICENSE +3 -1
  396. package/node_modules/queue-microtask/README.md +90 -0
  397. package/node_modules/queue-microtask/index.d.ts +2 -0
  398. package/node_modules/queue-microtask/index.js +9 -0
  399. package/node_modules/queue-microtask/package.json +55 -0
  400. package/node_modules/reusify/.github/dependabot.yml +7 -0
  401. package/node_modules/reusify/.github/workflows/ci.yml +96 -0
  402. package/node_modules/reusify/LICENSE +22 -0
  403. package/node_modules/reusify/README.md +139 -0
  404. package/node_modules/reusify/SECURITY.md +15 -0
  405. package/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
  406. package/node_modules/reusify/benchmarks/fib.js +13 -0
  407. package/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
  408. package/node_modules/reusify/eslint.config.js +14 -0
  409. package/node_modules/reusify/package.json +50 -0
  410. package/node_modules/reusify/reusify.d.ts +14 -0
  411. package/node_modules/reusify/reusify.js +33 -0
  412. package/node_modules/reusify/test.js +66 -0
  413. package/node_modules/reusify/tsconfig.json +11 -0
  414. package/node_modules/run-parallel/LICENSE +20 -0
  415. package/node_modules/run-parallel/README.md +85 -0
  416. package/node_modules/run-parallel/index.js +51 -0
  417. package/node_modules/run-parallel/package.json +58 -0
  418. package/node_modules/shelljs/LICENSE +23 -20
  419. package/node_modules/shelljs/README.md +173 -65
  420. package/node_modules/shelljs/package.json +38 -22
  421. package/node_modules/shelljs/plugin.js +1 -1
  422. package/node_modules/shelljs/shell.js +70 -12
  423. package/node_modules/shelljs/src/cat.js +3 -3
  424. package/node_modules/shelljs/src/cd.js +2 -1
  425. package/node_modules/shelljs/src/chmod.js +17 -11
  426. package/node_modules/shelljs/src/cmd.js +122 -0
  427. package/node_modules/shelljs/src/common.js +103 -29
  428. package/node_modules/shelljs/src/cp.js +24 -14
  429. package/node_modules/shelljs/src/dirs.js +7 -9
  430. package/node_modules/shelljs/src/echo.js +1 -2
  431. package/node_modules/shelljs/src/errorCode.js +10 -0
  432. package/node_modules/shelljs/src/exec-child.js +60 -28
  433. package/node_modules/shelljs/src/exec.js +39 -10
  434. package/node_modules/shelljs/src/find.js +8 -3
  435. package/node_modules/shelljs/src/grep.js +15 -4
  436. package/node_modules/shelljs/src/head.js +1 -1
  437. package/node_modules/shelljs/src/ln.js +3 -1
  438. package/node_modules/shelljs/src/ls.js +29 -15
  439. package/node_modules/shelljs/src/mkdir.js +13 -11
  440. package/node_modules/shelljs/src/mv.js +4 -3
  441. package/node_modules/shelljs/src/pwd.js +1 -1
  442. package/node_modules/shelljs/src/rm.js +11 -11
  443. package/node_modules/shelljs/src/sed.js +12 -4
  444. package/node_modules/shelljs/src/set.js +0 -1
  445. package/node_modules/shelljs/src/sort.js +3 -2
  446. package/node_modules/shelljs/src/tail.js +12 -2
  447. package/node_modules/shelljs/src/test.js +3 -2
  448. package/node_modules/shelljs/src/to.js +2 -1
  449. package/node_modules/shelljs/src/toEnd.js +2 -1
  450. package/node_modules/shelljs/src/touch.js +13 -7
  451. package/node_modules/shelljs/src/uniq.js +5 -4
  452. package/node_modules/shelljs/src/which.js +5 -4
  453. package/node_modules/shx/README.md +27 -15
  454. package/node_modules/shx/lib/help.js +1 -1
  455. package/node_modules/shx/lib/shx.js +13 -8
  456. package/node_modules/shx/package.json +17 -25
  457. package/node_modules/signal-exit/LICENSE.txt +16 -0
  458. package/node_modules/signal-exit/README.md +39 -0
  459. package/node_modules/signal-exit/index.js +202 -0
  460. package/node_modules/signal-exit/package.json +38 -0
  461. package/node_modules/signal-exit/signals.js +53 -0
  462. package/node_modules/strip-eof/index.js +15 -0
  463. package/node_modules/strip-eof/license +21 -0
  464. package/node_modules/strip-eof/package.json +39 -0
  465. package/node_modules/strip-eof/readme.md +28 -0
  466. package/node_modules/to-regex-range/LICENSE +21 -0
  467. package/node_modules/to-regex-range/README.md +305 -0
  468. package/node_modules/to-regex-range/index.js +288 -0
  469. package/node_modules/to-regex-range/package.json +88 -0
  470. package/package.json +2 -2
  471. package/node_modules/concat-map/.travis.yml +0 -4
  472. package/node_modules/concat-map/README.markdown +0 -62
  473. package/node_modules/concat-map/example/map.js +0 -6
  474. package/node_modules/concat-map/index.js +0 -13
  475. package/node_modules/concat-map/package.json +0 -43
  476. package/node_modules/concat-map/test/map.js +0 -39
  477. package/node_modules/minimatch/README.md +0 -230
  478. package/node_modules/minimatch/minimatch.js +0 -947
  479. package/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
  480. package/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
  481. package/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
  482. package/node_modules/minimatch/package.json +0 -33
  483. package/node_modules/path-is-absolute/index.js +0 -20
  484. package/node_modules/path-is-absolute/package.json +0 -43
  485. package/node_modules/path-is-absolute/readme.md +0 -59
  486. package/node_modules/shelljs/commands.js +0 -29
  487. package/node_modules/shelljs/node_modules/glob/README.md +0 -378
  488. package/node_modules/shelljs/node_modules/glob/common.js +0 -238
  489. package/node_modules/shelljs/node_modules/glob/glob.js +0 -790
  490. package/node_modules/shelljs/node_modules/glob/package.json +0 -55
  491. package/node_modules/shelljs/node_modules/glob/sync.js +0 -486
  492. /package/node_modules/{minimatch → execa/node_modules/semver}/LICENSE +0 -0
  493. /package/node_modules/{path-is-absolute → execa/node_modules/shebang-regex}/license +0 -0
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils = require("../../utils");
4
+ class EntryFilter {
5
+ constructor(_settings, _micromatchOptions) {
6
+ this._settings = _settings;
7
+ this._micromatchOptions = _micromatchOptions;
8
+ this.index = new Map();
9
+ }
10
+ getFilter(positive, negative) {
11
+ const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
12
+ const patterns = {
13
+ positive: {
14
+ all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
15
+ },
16
+ negative: {
17
+ absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
18
+ relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
19
+ }
20
+ };
21
+ return (entry) => this._filter(entry, patterns);
22
+ }
23
+ _filter(entry, patterns) {
24
+ const filepath = utils.path.removeLeadingDotSegment(entry.path);
25
+ if (this._settings.unique && this._isDuplicateEntry(filepath)) {
26
+ return false;
27
+ }
28
+ if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
29
+ return false;
30
+ }
31
+ const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
32
+ if (this._settings.unique && isMatched) {
33
+ this._createIndexRecord(filepath);
34
+ }
35
+ return isMatched;
36
+ }
37
+ _isDuplicateEntry(filepath) {
38
+ return this.index.has(filepath);
39
+ }
40
+ _createIndexRecord(filepath) {
41
+ this.index.set(filepath, undefined);
42
+ }
43
+ _onlyFileFilter(entry) {
44
+ return this._settings.onlyFiles && !entry.dirent.isFile();
45
+ }
46
+ _onlyDirectoryFilter(entry) {
47
+ return this._settings.onlyDirectories && !entry.dirent.isDirectory();
48
+ }
49
+ _isMatchToPatternsSet(filepath, patterns, isDirectory) {
50
+ const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory);
51
+ if (!isMatched) {
52
+ return false;
53
+ }
54
+ const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory);
55
+ if (isMatchedByRelativeNegative) {
56
+ return false;
57
+ }
58
+ const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory);
59
+ if (isMatchedByAbsoluteNegative) {
60
+ return false;
61
+ }
62
+ return true;
63
+ }
64
+ _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) {
65
+ if (patternsRe.length === 0) {
66
+ return false;
67
+ }
68
+ const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
69
+ return this._isMatchToPatterns(fullpath, patternsRe, isDirectory);
70
+ }
71
+ _isMatchToPatterns(filepath, patternsRe, isDirectory) {
72
+ if (patternsRe.length === 0) {
73
+ return false;
74
+ }
75
+ // Trying to match files and directories by patterns.
76
+ const isMatched = utils.pattern.matchAny(filepath, patternsRe);
77
+ // A pattern with a trailling slash can be used for directory matching.
78
+ // To apply such pattern, we need to add a tralling slash to the path.
79
+ if (!isMatched && isDirectory) {
80
+ return utils.pattern.matchAny(filepath + '/', patternsRe);
81
+ }
82
+ return isMatched;
83
+ }
84
+ }
85
+ exports.default = EntryFilter;
@@ -0,0 +1,8 @@
1
+ import Settings from '../../settings';
2
+ import { ErrorFilterFunction } from '../../types';
3
+ export default class ErrorFilter {
4
+ private readonly _settings;
5
+ constructor(_settings: Settings);
6
+ getFilter(): ErrorFilterFunction;
7
+ private _isNonFatalError;
8
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils = require("../../utils");
4
+ class ErrorFilter {
5
+ constructor(_settings) {
6
+ this._settings = _settings;
7
+ }
8
+ getFilter() {
9
+ return (error) => this._isNonFatalError(error);
10
+ }
11
+ _isNonFatalError(error) {
12
+ return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
13
+ }
14
+ }
15
+ exports.default = ErrorFilter;
@@ -0,0 +1,33 @@
1
+ import { Pattern, MicromatchOptions, PatternRe } from '../../types';
2
+ import Settings from '../../settings';
3
+ export type PatternSegment = StaticPatternSegment | DynamicPatternSegment;
4
+ type StaticPatternSegment = {
5
+ dynamic: false;
6
+ pattern: Pattern;
7
+ };
8
+ type DynamicPatternSegment = {
9
+ dynamic: true;
10
+ pattern: Pattern;
11
+ patternRe: PatternRe;
12
+ };
13
+ export type PatternSection = PatternSegment[];
14
+ export type PatternInfo = {
15
+ /**
16
+ * Indicates that the pattern has a globstar (more than a single section).
17
+ */
18
+ complete: boolean;
19
+ pattern: Pattern;
20
+ segments: PatternSegment[];
21
+ sections: PatternSection[];
22
+ };
23
+ export default abstract class Matcher {
24
+ private readonly _patterns;
25
+ private readonly _settings;
26
+ private readonly _micromatchOptions;
27
+ protected readonly _storage: PatternInfo[];
28
+ constructor(_patterns: Pattern[], _settings: Settings, _micromatchOptions: MicromatchOptions);
29
+ private _fillStorage;
30
+ private _getPatternSegments;
31
+ private _splitSegmentsIntoSections;
32
+ }
33
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils = require("../../utils");
4
+ class Matcher {
5
+ constructor(_patterns, _settings, _micromatchOptions) {
6
+ this._patterns = _patterns;
7
+ this._settings = _settings;
8
+ this._micromatchOptions = _micromatchOptions;
9
+ this._storage = [];
10
+ this._fillStorage();
11
+ }
12
+ _fillStorage() {
13
+ for (const pattern of this._patterns) {
14
+ const segments = this._getPatternSegments(pattern);
15
+ const sections = this._splitSegmentsIntoSections(segments);
16
+ this._storage.push({
17
+ complete: sections.length <= 1,
18
+ pattern,
19
+ segments,
20
+ sections
21
+ });
22
+ }
23
+ }
24
+ _getPatternSegments(pattern) {
25
+ const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
26
+ return parts.map((part) => {
27
+ const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
28
+ if (!dynamic) {
29
+ return {
30
+ dynamic: false,
31
+ pattern: part
32
+ };
33
+ }
34
+ return {
35
+ dynamic: true,
36
+ pattern: part,
37
+ patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
38
+ };
39
+ });
40
+ }
41
+ _splitSegmentsIntoSections(segments) {
42
+ return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
43
+ }
44
+ }
45
+ exports.default = Matcher;
@@ -0,0 +1,4 @@
1
+ import Matcher from './matcher';
2
+ export default class PartialMatcher extends Matcher {
3
+ match(filepath: string): boolean;
4
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const matcher_1 = require("./matcher");
4
+ class PartialMatcher extends matcher_1.default {
5
+ match(filepath) {
6
+ const parts = filepath.split('/');
7
+ const levels = parts.length;
8
+ const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
9
+ for (const pattern of patterns) {
10
+ const section = pattern.sections[0];
11
+ /**
12
+ * In this case, the pattern has a globstar and we must read all directories unconditionally,
13
+ * but only if the level has reached the end of the first group.
14
+ *
15
+ * fixtures/{a,b}/**
16
+ * ^ true/false ^ always true
17
+ */
18
+ if (!pattern.complete && levels > section.length) {
19
+ return true;
20
+ }
21
+ const match = parts.every((part, index) => {
22
+ const segment = pattern.segments[index];
23
+ if (segment.dynamic && segment.patternRe.test(part)) {
24
+ return true;
25
+ }
26
+ if (!segment.dynamic && segment.pattern === part) {
27
+ return true;
28
+ }
29
+ return false;
30
+ });
31
+ if (match) {
32
+ return true;
33
+ }
34
+ }
35
+ return false;
36
+ }
37
+ }
38
+ exports.default = PartialMatcher;
@@ -0,0 +1,19 @@
1
+ import { Task } from '../managers/tasks';
2
+ import Settings from '../settings';
3
+ import { MicromatchOptions, ReaderOptions } from '../types';
4
+ import DeepFilter from './filters/deep';
5
+ import EntryFilter from './filters/entry';
6
+ import ErrorFilter from './filters/error';
7
+ import EntryTransformer from './transformers/entry';
8
+ export default abstract class Provider<T> {
9
+ protected readonly _settings: Settings;
10
+ readonly errorFilter: ErrorFilter;
11
+ readonly entryFilter: EntryFilter;
12
+ readonly deepFilter: DeepFilter;
13
+ readonly entryTransformer: EntryTransformer;
14
+ constructor(_settings: Settings);
15
+ abstract read(_task: Task): T;
16
+ protected _getRootDirectory(task: Task): string;
17
+ protected _getReaderOptions(task: Task): ReaderOptions;
18
+ protected _getMicromatchOptions(): MicromatchOptions;
19
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const path = require("path");
4
+ const deep_1 = require("./filters/deep");
5
+ const entry_1 = require("./filters/entry");
6
+ const error_1 = require("./filters/error");
7
+ const entry_2 = require("./transformers/entry");
8
+ class Provider {
9
+ constructor(_settings) {
10
+ this._settings = _settings;
11
+ this.errorFilter = new error_1.default(this._settings);
12
+ this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
13
+ this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
14
+ this.entryTransformer = new entry_2.default(this._settings);
15
+ }
16
+ _getRootDirectory(task) {
17
+ return path.resolve(this._settings.cwd, task.base);
18
+ }
19
+ _getReaderOptions(task) {
20
+ const basePath = task.base === '.' ? '' : task.base;
21
+ return {
22
+ basePath,
23
+ pathSegmentSeparator: '/',
24
+ concurrency: this._settings.concurrency,
25
+ deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
26
+ entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
27
+ errorFilter: this.errorFilter.getFilter(),
28
+ followSymbolicLinks: this._settings.followSymbolicLinks,
29
+ fs: this._settings.fs,
30
+ stats: this._settings.stats,
31
+ throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
32
+ transform: this.entryTransformer.getTransformer()
33
+ };
34
+ }
35
+ _getMicromatchOptions() {
36
+ return {
37
+ dot: this._settings.dot,
38
+ matchBase: this._settings.baseNameMatch,
39
+ nobrace: !this._settings.braceExpansion,
40
+ nocase: !this._settings.caseSensitiveMatch,
41
+ noext: !this._settings.extglob,
42
+ noglobstar: !this._settings.globstar,
43
+ posix: true,
44
+ strictSlashes: false
45
+ };
46
+ }
47
+ }
48
+ exports.default = Provider;
@@ -0,0 +1,11 @@
1
+ /// <reference types="node" />
2
+ import { Readable } from 'stream';
3
+ import { Task } from '../managers/tasks';
4
+ import ReaderStream from '../readers/stream';
5
+ import { ReaderOptions } from '../types';
6
+ import Provider from './provider';
7
+ export default class ProviderStream extends Provider<Readable> {
8
+ protected _reader: ReaderStream;
9
+ read(task: Task): Readable;
10
+ api(root: string, task: Task, options: ReaderOptions): Readable;
11
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const stream_1 = require("stream");
4
+ const stream_2 = require("../readers/stream");
5
+ const provider_1 = require("./provider");
6
+ class ProviderStream extends provider_1.default {
7
+ constructor() {
8
+ super(...arguments);
9
+ this._reader = new stream_2.default(this._settings);
10
+ }
11
+ read(task) {
12
+ const root = this._getRootDirectory(task);
13
+ const options = this._getReaderOptions(task);
14
+ const source = this.api(root, task, options);
15
+ const destination = new stream_1.Readable({ objectMode: true, read: () => { } });
16
+ source
17
+ .once('error', (error) => destination.emit('error', error))
18
+ .on('data', (entry) => destination.emit('data', options.transform(entry)))
19
+ .once('end', () => destination.emit('end'));
20
+ destination
21
+ .once('close', () => source.destroy());
22
+ return destination;
23
+ }
24
+ api(root, task, options) {
25
+ if (task.dynamic) {
26
+ return this._reader.dynamic(root, options);
27
+ }
28
+ return this._reader.static(task.patterns, options);
29
+ }
30
+ }
31
+ exports.default = ProviderStream;
@@ -0,0 +1,9 @@
1
+ import { Task } from '../managers/tasks';
2
+ import ReaderSync from '../readers/sync';
3
+ import { Entry, EntryItem, ReaderOptions } from '../types';
4
+ import Provider from './provider';
5
+ export default class ProviderSync extends Provider<EntryItem[]> {
6
+ protected _reader: ReaderSync;
7
+ read(task: Task): EntryItem[];
8
+ api(root: string, task: Task, options: ReaderOptions): Entry[];
9
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sync_1 = require("../readers/sync");
4
+ const provider_1 = require("./provider");
5
+ class ProviderSync extends provider_1.default {
6
+ constructor() {
7
+ super(...arguments);
8
+ this._reader = new sync_1.default(this._settings);
9
+ }
10
+ read(task) {
11
+ const root = this._getRootDirectory(task);
12
+ const options = this._getReaderOptions(task);
13
+ const entries = this.api(root, task, options);
14
+ return entries.map(options.transform);
15
+ }
16
+ api(root, task, options) {
17
+ if (task.dynamic) {
18
+ return this._reader.dynamic(root, options);
19
+ }
20
+ return this._reader.static(task.patterns, options);
21
+ }
22
+ }
23
+ exports.default = ProviderSync;
@@ -0,0 +1,8 @@
1
+ import Settings from '../../settings';
2
+ import { EntryTransformerFunction } from '../../types';
3
+ export default class EntryTransformer {
4
+ private readonly _settings;
5
+ constructor(_settings: Settings);
6
+ getTransformer(): EntryTransformerFunction;
7
+ private _transform;
8
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils = require("../../utils");
4
+ class EntryTransformer {
5
+ constructor(_settings) {
6
+ this._settings = _settings;
7
+ }
8
+ getTransformer() {
9
+ return (entry) => this._transform(entry);
10
+ }
11
+ _transform(entry) {
12
+ let filepath = entry.path;
13
+ if (this._settings.absolute) {
14
+ filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
15
+ filepath = utils.path.unixify(filepath);
16
+ }
17
+ if (this._settings.markDirectories && entry.dirent.isDirectory()) {
18
+ filepath += '/';
19
+ }
20
+ if (!this._settings.objectMode) {
21
+ return filepath;
22
+ }
23
+ return Object.assign(Object.assign({}, entry), { path: filepath });
24
+ }
25
+ }
26
+ exports.default = EntryTransformer;
@@ -0,0 +1,10 @@
1
+ import * as fsWalk from '@nodelib/fs.walk';
2
+ import { Entry, ReaderOptions, Pattern } from '../types';
3
+ import Reader from './reader';
4
+ import ReaderStream from './stream';
5
+ export default class ReaderAsync extends Reader<Promise<Entry[]>> {
6
+ protected _walkAsync: typeof fsWalk.walk;
7
+ protected _readerStream: ReaderStream;
8
+ dynamic(root: string, options: ReaderOptions): Promise<Entry[]>;
9
+ static(patterns: Pattern[], options: ReaderOptions): Promise<Entry[]>;
10
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fsWalk = require("@nodelib/fs.walk");
4
+ const reader_1 = require("./reader");
5
+ const stream_1 = require("./stream");
6
+ class ReaderAsync extends reader_1.default {
7
+ constructor() {
8
+ super(...arguments);
9
+ this._walkAsync = fsWalk.walk;
10
+ this._readerStream = new stream_1.default(this._settings);
11
+ }
12
+ dynamic(root, options) {
13
+ return new Promise((resolve, reject) => {
14
+ this._walkAsync(root, options, (error, entries) => {
15
+ if (error === null) {
16
+ resolve(entries);
17
+ }
18
+ else {
19
+ reject(error);
20
+ }
21
+ });
22
+ });
23
+ }
24
+ async static(patterns, options) {
25
+ const entries = [];
26
+ const stream = this._readerStream.static(patterns, options);
27
+ // After #235, replace it with an asynchronous iterator.
28
+ return new Promise((resolve, reject) => {
29
+ stream.once('error', reject);
30
+ stream.on('data', (entry) => entries.push(entry));
31
+ stream.once('end', () => resolve(entries));
32
+ });
33
+ }
34
+ }
35
+ exports.default = ReaderAsync;
@@ -0,0 +1,15 @@
1
+ /// <reference types="node" />
2
+ import * as fs from 'fs';
3
+ import * as fsStat from '@nodelib/fs.stat';
4
+ import Settings from '../settings';
5
+ import { Entry, ErrnoException, Pattern, ReaderOptions } from '../types';
6
+ export default abstract class Reader<T> {
7
+ protected readonly _settings: Settings;
8
+ protected readonly _fsStatSettings: fsStat.Settings;
9
+ constructor(_settings: Settings);
10
+ abstract dynamic(root: string, options: ReaderOptions): T;
11
+ abstract static(patterns: Pattern[], options: ReaderOptions): T;
12
+ protected _getFullEntryPath(filepath: string): string;
13
+ protected _makeEntry(stats: fs.Stats, pattern: Pattern): Entry;
14
+ protected _isFatalError(error: ErrnoException): boolean;
15
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const path = require("path");
4
+ const fsStat = require("@nodelib/fs.stat");
5
+ const utils = require("../utils");
6
+ class Reader {
7
+ constructor(_settings) {
8
+ this._settings = _settings;
9
+ this._fsStatSettings = new fsStat.Settings({
10
+ followSymbolicLink: this._settings.followSymbolicLinks,
11
+ fs: this._settings.fs,
12
+ throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
13
+ });
14
+ }
15
+ _getFullEntryPath(filepath) {
16
+ return path.resolve(this._settings.cwd, filepath);
17
+ }
18
+ _makeEntry(stats, pattern) {
19
+ const entry = {
20
+ name: pattern,
21
+ path: pattern,
22
+ dirent: utils.fs.createDirentFromStats(pattern, stats)
23
+ };
24
+ if (this._settings.stats) {
25
+ entry.stats = stats;
26
+ }
27
+ return entry;
28
+ }
29
+ _isFatalError(error) {
30
+ return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
31
+ }
32
+ }
33
+ exports.default = Reader;
@@ -0,0 +1,14 @@
1
+ /// <reference types="node" />
2
+ import { Readable } from 'stream';
3
+ import * as fsStat from '@nodelib/fs.stat';
4
+ import * as fsWalk from '@nodelib/fs.walk';
5
+ import { Pattern, ReaderOptions } from '../types';
6
+ import Reader from './reader';
7
+ export default class ReaderStream extends Reader<Readable> {
8
+ protected _walkStream: typeof fsWalk.walkStream;
9
+ protected _stat: typeof fsStat.stat;
10
+ dynamic(root: string, options: ReaderOptions): Readable;
11
+ static(patterns: Pattern[], options: ReaderOptions): Readable;
12
+ private _getEntry;
13
+ private _getStat;
14
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const stream_1 = require("stream");
4
+ const fsStat = require("@nodelib/fs.stat");
5
+ const fsWalk = require("@nodelib/fs.walk");
6
+ const reader_1 = require("./reader");
7
+ class ReaderStream extends reader_1.default {
8
+ constructor() {
9
+ super(...arguments);
10
+ this._walkStream = fsWalk.walkStream;
11
+ this._stat = fsStat.stat;
12
+ }
13
+ dynamic(root, options) {
14
+ return this._walkStream(root, options);
15
+ }
16
+ static(patterns, options) {
17
+ const filepaths = patterns.map(this._getFullEntryPath, this);
18
+ const stream = new stream_1.PassThrough({ objectMode: true });
19
+ stream._write = (index, _enc, done) => {
20
+ return this._getEntry(filepaths[index], patterns[index], options)
21
+ .then((entry) => {
22
+ if (entry !== null && options.entryFilter(entry)) {
23
+ stream.push(entry);
24
+ }
25
+ if (index === filepaths.length - 1) {
26
+ stream.end();
27
+ }
28
+ done();
29
+ })
30
+ .catch(done);
31
+ };
32
+ for (let i = 0; i < filepaths.length; i++) {
33
+ stream.write(i);
34
+ }
35
+ return stream;
36
+ }
37
+ _getEntry(filepath, pattern, options) {
38
+ return this._getStat(filepath)
39
+ .then((stats) => this._makeEntry(stats, pattern))
40
+ .catch((error) => {
41
+ if (options.errorFilter(error)) {
42
+ return null;
43
+ }
44
+ throw error;
45
+ });
46
+ }
47
+ _getStat(filepath) {
48
+ return new Promise((resolve, reject) => {
49
+ this._stat(filepath, this._fsStatSettings, (error, stats) => {
50
+ return error === null ? resolve(stats) : reject(error);
51
+ });
52
+ });
53
+ }
54
+ }
55
+ exports.default = ReaderStream;
@@ -0,0 +1,12 @@
1
+ import * as fsStat from '@nodelib/fs.stat';
2
+ import * as fsWalk from '@nodelib/fs.walk';
3
+ import { Entry, Pattern, ReaderOptions } from '../types';
4
+ import Reader from './reader';
5
+ export default class ReaderSync extends Reader<Entry[]> {
6
+ protected _walkSync: typeof fsWalk.walkSync;
7
+ protected _statSync: typeof fsStat.statSync;
8
+ dynamic(root: string, options: ReaderOptions): Entry[];
9
+ static(patterns: Pattern[], options: ReaderOptions): Entry[];
10
+ private _getEntry;
11
+ private _getStat;
12
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fsStat = require("@nodelib/fs.stat");
4
+ const fsWalk = require("@nodelib/fs.walk");
5
+ const reader_1 = require("./reader");
6
+ class ReaderSync extends reader_1.default {
7
+ constructor() {
8
+ super(...arguments);
9
+ this._walkSync = fsWalk.walkSync;
10
+ this._statSync = fsStat.statSync;
11
+ }
12
+ dynamic(root, options) {
13
+ return this._walkSync(root, options);
14
+ }
15
+ static(patterns, options) {
16
+ const entries = [];
17
+ for (const pattern of patterns) {
18
+ const filepath = this._getFullEntryPath(pattern);
19
+ const entry = this._getEntry(filepath, pattern, options);
20
+ if (entry === null || !options.entryFilter(entry)) {
21
+ continue;
22
+ }
23
+ entries.push(entry);
24
+ }
25
+ return entries;
26
+ }
27
+ _getEntry(filepath, pattern, options) {
28
+ try {
29
+ const stats = this._getStat(filepath);
30
+ return this._makeEntry(stats, pattern);
31
+ }
32
+ catch (error) {
33
+ if (options.errorFilter(error)) {
34
+ return null;
35
+ }
36
+ throw error;
37
+ }
38
+ }
39
+ _getStat(filepath) {
40
+ return this._statSync(filepath, this._fsStatSettings);
41
+ }
42
+ }
43
+ exports.default = ReaderSync;