@socketsecurity/cli-with-sentry 1.1.25 → 2.0.0

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 (914) hide show
  1. package/CHANGELOG.md +51 -218
  2. package/README.md +41 -74
  3. package/dist/cli.js.bz +0 -0
  4. package/dist/cli.js.bz.sha256 +1 -0
  5. package/dist/index.js +2 -0
  6. package/package.json +31 -274
  7. package/bin/cli.js +0 -52
  8. package/bin/npm-cli.js +0 -29
  9. package/bin/npx-cli.js +0 -29
  10. package/bin/pnpm-cli.js +0 -29
  11. package/bin/yarn-cli.js +0 -29
  12. package/dist/cli.js +0 -14999
  13. package/dist/cli.js.map +0 -1
  14. package/dist/constants.js +0 -845
  15. package/dist/constants.js.map +0 -1
  16. package/dist/flags.js +0 -212
  17. package/dist/flags.js.map +0 -1
  18. package/dist/init.gradle +0 -250
  19. package/dist/instrument-with-sentry.js +0 -44
  20. package/dist/instrument-with-sentry.js.map +0 -1
  21. package/dist/npm-cli.js +0 -30
  22. package/dist/npm-cli.js.map +0 -1
  23. package/dist/npx-cli.js +0 -26
  24. package/dist/npx-cli.js.map +0 -1
  25. package/dist/pnpm-cli.js +0 -30
  26. package/dist/pnpm-cli.js.map +0 -1
  27. package/dist/shadow-npm-bin.js +0 -8
  28. package/dist/shadow-npm-bin.js.map +0 -1
  29. package/dist/shadow-npm-bin2.js +0 -102
  30. package/dist/shadow-npm-bin2.js.map +0 -1
  31. package/dist/shadow-npm-inject.js +0 -307
  32. package/dist/shadow-npm-inject.js.map +0 -1
  33. package/dist/shadow-npx-bin.js +0 -12
  34. package/dist/shadow-npx-bin.js.map +0 -1
  35. package/dist/shadow-pnpm-bin.js +0 -8
  36. package/dist/shadow-pnpm-bin.js.map +0 -1
  37. package/dist/shadow-pnpm-bin2.js +0 -300
  38. package/dist/shadow-pnpm-bin2.js.map +0 -1
  39. package/dist/shadow-yarn-bin.js +0 -96
  40. package/dist/shadow-yarn-bin.js.map +0 -1
  41. package/dist/tsconfig.dts.tsbuildinfo +0 -1
  42. package/dist/types/cli.d.mts +0 -3
  43. package/dist/types/cli.d.mts.map +0 -1
  44. package/dist/types/commands/analytics/cmd-analytics.d.mts +0 -10
  45. package/dist/types/commands/analytics/cmd-analytics.d.mts.map +0 -1
  46. package/dist/types/commands/analytics/fetch-org-analytics.d.mts +0 -8
  47. package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +0 -1
  48. package/dist/types/commands/analytics/fetch-repo-analytics.d.mts +0 -8
  49. package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +0 -1
  50. package/dist/types/commands/analytics/handle-analytics.d.mts +0 -10
  51. package/dist/types/commands/analytics/handle-analytics.d.mts.map +0 -1
  52. package/dist/types/commands/analytics/output-analytics.d.mts +0 -29
  53. package/dist/types/commands/analytics/output-analytics.d.mts.map +0 -1
  54. package/dist/types/commands/audit-log/cmd-audit-log.d.mts +0 -10
  55. package/dist/types/commands/audit-log/cmd-audit-log.d.mts.map +0 -1
  56. package/dist/types/commands/audit-log/fetch-audit-log.d.mts +0 -15
  57. package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +0 -1
  58. package/dist/types/commands/audit-log/handle-audit-log.d.mts +0 -9
  59. package/dist/types/commands/audit-log/handle-audit-log.d.mts.map +0 -1
  60. package/dist/types/commands/audit-log/output-audit-log.d.mts +0 -22
  61. package/dist/types/commands/audit-log/output-audit-log.d.mts.map +0 -1
  62. package/dist/types/commands/ci/cmd-ci.d.mts +0 -9
  63. package/dist/types/commands/ci/cmd-ci.d.mts.map +0 -1
  64. package/dist/types/commands/ci/fetch-default-org-slug.d.mts +0 -4
  65. package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +0 -1
  66. package/dist/types/commands/ci/handle-ci.d.mts +0 -2
  67. package/dist/types/commands/ci/handle-ci.d.mts.map +0 -1
  68. package/dist/types/commands/config/cmd-config-auto.d.mts +0 -10
  69. package/dist/types/commands/config/cmd-config-auto.d.mts.map +0 -1
  70. package/dist/types/commands/config/cmd-config-get.d.mts +0 -9
  71. package/dist/types/commands/config/cmd-config-get.d.mts.map +0 -1
  72. package/dist/types/commands/config/cmd-config-list.d.mts +0 -9
  73. package/dist/types/commands/config/cmd-config-list.d.mts.map +0 -1
  74. package/dist/types/commands/config/cmd-config-set.d.mts +0 -10
  75. package/dist/types/commands/config/cmd-config-set.d.mts.map +0 -1
  76. package/dist/types/commands/config/cmd-config-unset.d.mts +0 -10
  77. package/dist/types/commands/config/cmd-config-unset.d.mts.map +0 -1
  78. package/dist/types/commands/config/cmd-config.d.mts +0 -3
  79. package/dist/types/commands/config/cmd-config.d.mts.map +0 -1
  80. package/dist/types/commands/config/discover-config-value.d.mts +0 -3
  81. package/dist/types/commands/config/discover-config-value.d.mts.map +0 -1
  82. package/dist/types/commands/config/handle-config-auto.d.mts +0 -7
  83. package/dist/types/commands/config/handle-config-auto.d.mts.map +0 -1
  84. package/dist/types/commands/config/handle-config-get.d.mts +0 -7
  85. package/dist/types/commands/config/handle-config-get.d.mts.map +0 -1
  86. package/dist/types/commands/config/handle-config-set.d.mts +0 -8
  87. package/dist/types/commands/config/handle-config-set.d.mts.map +0 -1
  88. package/dist/types/commands/config/handle-config-unset.d.mts +0 -7
  89. package/dist/types/commands/config/handle-config-unset.d.mts.map +0 -1
  90. package/dist/types/commands/config/output-config-auto.d.mts +0 -4
  91. package/dist/types/commands/config/output-config-auto.d.mts.map +0 -1
  92. package/dist/types/commands/config/output-config-get.d.mts +0 -4
  93. package/dist/types/commands/config/output-config-get.d.mts.map +0 -1
  94. package/dist/types/commands/config/output-config-list.d.mts +0 -6
  95. package/dist/types/commands/config/output-config-list.d.mts.map +0 -1
  96. package/dist/types/commands/config/output-config-set.d.mts +0 -3
  97. package/dist/types/commands/config/output-config-set.d.mts.map +0 -1
  98. package/dist/types/commands/config/output-config-unset.d.mts +0 -3
  99. package/dist/types/commands/config/output-config-unset.d.mts.map +0 -1
  100. package/dist/types/commands/fix/cmd-fix.d.mts +0 -10
  101. package/dist/types/commands/fix/cmd-fix.d.mts.map +0 -1
  102. package/dist/types/commands/fix/coana-fix.d.mts +0 -6
  103. package/dist/types/commands/fix/coana-fix.d.mts.map +0 -1
  104. package/dist/types/commands/fix/env-helpers.d.mts +0 -26
  105. package/dist/types/commands/fix/env-helpers.d.mts.map +0 -1
  106. package/dist/types/commands/fix/git.d.mts +0 -13
  107. package/dist/types/commands/fix/git.d.mts.map +0 -1
  108. package/dist/types/commands/fix/handle-fix.d.mts +0 -20
  109. package/dist/types/commands/fix/handle-fix.d.mts.map +0 -1
  110. package/dist/types/commands/fix/output-fix-result.d.mts +0 -3
  111. package/dist/types/commands/fix/output-fix-result.d.mts.map +0 -1
  112. package/dist/types/commands/fix/pull-request.d.mts +0 -31
  113. package/dist/types/commands/fix/pull-request.d.mts.map +0 -1
  114. package/dist/types/commands/fix/types.d.mts +0 -21
  115. package/dist/types/commands/fix/types.d.mts.map +0 -1
  116. package/dist/types/commands/install/cmd-install-completion.d.mts +0 -9
  117. package/dist/types/commands/install/cmd-install-completion.d.mts.map +0 -1
  118. package/dist/types/commands/install/cmd-install.d.mts +0 -3
  119. package/dist/types/commands/install/cmd-install.d.mts.map +0 -1
  120. package/dist/types/commands/install/handle-install-completion.d.mts +0 -2
  121. package/dist/types/commands/install/handle-install-completion.d.mts.map +0 -1
  122. package/dist/types/commands/install/output-install-completion.d.mts +0 -12
  123. package/dist/types/commands/install/output-install-completion.d.mts.map +0 -1
  124. package/dist/types/commands/install/setup-tab-completion.d.mts +0 -13
  125. package/dist/types/commands/install/setup-tab-completion.d.mts.map +0 -1
  126. package/dist/types/commands/json/cmd-json.d.mts +0 -9
  127. package/dist/types/commands/json/cmd-json.d.mts.map +0 -1
  128. package/dist/types/commands/json/handle-cmd-json.d.mts +0 -2
  129. package/dist/types/commands/json/handle-cmd-json.d.mts.map +0 -1
  130. package/dist/types/commands/json/output-cmd-json.d.mts +0 -2
  131. package/dist/types/commands/json/output-cmd-json.d.mts.map +0 -1
  132. package/dist/types/commands/login/apply-login.d.mts +0 -2
  133. package/dist/types/commands/login/apply-login.d.mts.map +0 -1
  134. package/dist/types/commands/login/attempt-login.d.mts +0 -6
  135. package/dist/types/commands/login/attempt-login.d.mts.map +0 -1
  136. package/dist/types/commands/login/cmd-login.d.mts +0 -10
  137. package/dist/types/commands/login/cmd-login.d.mts.map +0 -1
  138. package/dist/types/commands/logout/apply-logout.d.mts +0 -2
  139. package/dist/types/commands/logout/apply-logout.d.mts.map +0 -1
  140. package/dist/types/commands/logout/attempt-logout.d.mts +0 -2
  141. package/dist/types/commands/logout/attempt-logout.d.mts.map +0 -1
  142. package/dist/types/commands/logout/cmd-logout.d.mts +0 -9
  143. package/dist/types/commands/logout/cmd-logout.d.mts.map +0 -1
  144. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts +0 -9
  145. package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +0 -1
  146. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts +0 -9
  147. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +0 -1
  148. package/dist/types/commands/manifest/cmd-manifest-conda.d.mts +0 -9
  149. package/dist/types/commands/manifest/cmd-manifest-conda.d.mts.map +0 -1
  150. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts +0 -9
  151. package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +0 -1
  152. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts +0 -9
  153. package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +0 -1
  154. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts +0 -9
  155. package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +0 -1
  156. package/dist/types/commands/manifest/cmd-manifest-setup.d.mts +0 -9
  157. package/dist/types/commands/manifest/cmd-manifest-setup.d.mts.map +0 -1
  158. package/dist/types/commands/manifest/cmd-manifest.d.mts +0 -9
  159. package/dist/types/commands/manifest/cmd-manifest.d.mts.map +0 -1
  160. package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts +0 -8
  161. package/dist/types/commands/manifest/convert-conda-to-requirements.d.mts.map +0 -1
  162. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +0 -7
  163. package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +0 -1
  164. package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts +0 -8
  165. package/dist/types/commands/manifest/convert_sbt_to_maven.d.mts.map +0 -1
  166. package/dist/types/commands/manifest/detect-manifest-actions.d.mts +0 -13
  167. package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +0 -1
  168. package/dist/types/commands/manifest/generate_auto_manifest.d.mts +0 -9
  169. package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +0 -1
  170. package/dist/types/commands/manifest/handle-manifest-conda.d.mts +0 -9
  171. package/dist/types/commands/manifest/handle-manifest-conda.d.mts.map +0 -1
  172. package/dist/types/commands/manifest/handle-manifest-setup.d.mts +0 -2
  173. package/dist/types/commands/manifest/handle-manifest-setup.d.mts.map +0 -1
  174. package/dist/types/commands/manifest/output-manifest-setup.d.mts +0 -3
  175. package/dist/types/commands/manifest/output-manifest-setup.d.mts.map +0 -1
  176. package/dist/types/commands/manifest/output-requirements.d.mts +0 -6
  177. package/dist/types/commands/manifest/output-requirements.d.mts.map +0 -1
  178. package/dist/types/commands/manifest/run-cdxgen.d.mts +0 -6
  179. package/dist/types/commands/manifest/run-cdxgen.d.mts.map +0 -1
  180. package/dist/types/commands/manifest/setup-manifest-config.d.mts +0 -3
  181. package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +0 -1
  182. package/dist/types/commands/npm/cmd-npm.d.mts +0 -10
  183. package/dist/types/commands/npm/cmd-npm.d.mts.map +0 -1
  184. package/dist/types/commands/npx/cmd-npx.d.mts +0 -9
  185. package/dist/types/commands/npx/cmd-npx.d.mts.map +0 -1
  186. package/dist/types/commands/oops/cmd-oops.d.mts +0 -9
  187. package/dist/types/commands/oops/cmd-oops.d.mts.map +0 -1
  188. package/dist/types/commands/optimize/add-overrides.d.mts +0 -20
  189. package/dist/types/commands/optimize/add-overrides.d.mts.map +0 -1
  190. package/dist/types/commands/optimize/apply-optimization.d.mts +0 -14
  191. package/dist/types/commands/optimize/apply-optimization.d.mts.map +0 -1
  192. package/dist/types/commands/optimize/cmd-optimize.d.mts +0 -10
  193. package/dist/types/commands/optimize/cmd-optimize.d.mts.map +0 -1
  194. package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +0 -5
  195. package/dist/types/commands/optimize/deps-includes-by-agent.d.mts.map +0 -1
  196. package/dist/types/commands/optimize/get-dependency-entries.d.mts +0 -3
  197. package/dist/types/commands/optimize/get-dependency-entries.d.mts.map +0 -1
  198. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +0 -42
  199. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts.map +0 -1
  200. package/dist/types/commands/optimize/handle-optimize.d.mts +0 -8
  201. package/dist/types/commands/optimize/handle-optimize.d.mts.map +0 -1
  202. package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +0 -8
  203. package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts.map +0 -1
  204. package/dist/types/commands/optimize/ls-by-agent.d.mts +0 -13
  205. package/dist/types/commands/optimize/ls-by-agent.d.mts.map +0 -1
  206. package/dist/types/commands/optimize/output-optimize-result.d.mts +0 -9
  207. package/dist/types/commands/optimize/output-optimize-result.d.mts.map +0 -1
  208. package/dist/types/commands/optimize/shared.d.mts +0 -2
  209. package/dist/types/commands/optimize/shared.d.mts.map +0 -1
  210. package/dist/types/commands/optimize/types.d.mts +0 -9
  211. package/dist/types/commands/optimize/types.d.mts.map +0 -1
  212. package/dist/types/commands/optimize/update-lockfile.d.mts +0 -11
  213. package/dist/types/commands/optimize/update-lockfile.d.mts.map +0 -1
  214. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +0 -8
  215. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts.map +0 -1
  216. package/dist/types/commands/organization/cmd-organization-dependencies.d.mts +0 -10
  217. package/dist/types/commands/organization/cmd-organization-dependencies.d.mts.map +0 -1
  218. package/dist/types/commands/organization/cmd-organization-list.d.mts +0 -10
  219. package/dist/types/commands/organization/cmd-organization-list.d.mts.map +0 -1
  220. package/dist/types/commands/organization/cmd-organization-policy-license.d.mts +0 -10
  221. package/dist/types/commands/organization/cmd-organization-policy-license.d.mts.map +0 -1
  222. package/dist/types/commands/organization/cmd-organization-policy-security.d.mts +0 -10
  223. package/dist/types/commands/organization/cmd-organization-policy-security.d.mts.map +0 -1
  224. package/dist/types/commands/organization/cmd-organization-policy.d.mts +0 -3
  225. package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +0 -1
  226. package/dist/types/commands/organization/cmd-organization-quota.d.mts +0 -9
  227. package/dist/types/commands/organization/cmd-organization-quota.d.mts.map +0 -1
  228. package/dist/types/commands/organization/cmd-organization.d.mts +0 -3
  229. package/dist/types/commands/organization/cmd-organization.d.mts.map +0 -1
  230. package/dist/types/commands/organization/fetch-dependencies.d.mts +0 -12
  231. package/dist/types/commands/organization/fetch-dependencies.d.mts.map +0 -1
  232. package/dist/types/commands/organization/fetch-license-policy.d.mts +0 -8
  233. package/dist/types/commands/organization/fetch-license-policy.d.mts.map +0 -1
  234. package/dist/types/commands/organization/fetch-organization-list.d.mts +0 -20
  235. package/dist/types/commands/organization/fetch-organization-list.d.mts.map +0 -1
  236. package/dist/types/commands/organization/fetch-quota.d.mts +0 -8
  237. package/dist/types/commands/organization/fetch-quota.d.mts.map +0 -1
  238. package/dist/types/commands/organization/fetch-security-policy.d.mts +0 -8
  239. package/dist/types/commands/organization/fetch-security-policy.d.mts.map +0 -1
  240. package/dist/types/commands/organization/handle-dependencies.d.mts +0 -7
  241. package/dist/types/commands/organization/handle-dependencies.d.mts.map +0 -1
  242. package/dist/types/commands/organization/handle-license-policy.d.mts +0 -3
  243. package/dist/types/commands/organization/handle-license-policy.d.mts.map +0 -1
  244. package/dist/types/commands/organization/handle-organization-list.d.mts +0 -3
  245. package/dist/types/commands/organization/handle-organization-list.d.mts.map +0 -1
  246. package/dist/types/commands/organization/handle-quota.d.mts +0 -3
  247. package/dist/types/commands/organization/handle-quota.d.mts.map +0 -1
  248. package/dist/types/commands/organization/handle-security-policy.d.mts +0 -3
  249. package/dist/types/commands/organization/handle-security-policy.d.mts.map +0 -1
  250. package/dist/types/commands/organization/output-dependencies.d.mts +0 -8
  251. package/dist/types/commands/organization/output-dependencies.d.mts.map +0 -1
  252. package/dist/types/commands/organization/output-license-policy.d.mts +0 -4
  253. package/dist/types/commands/organization/output-license-policy.d.mts.map +0 -1
  254. package/dist/types/commands/organization/output-organization-list.d.mts +0 -4
  255. package/dist/types/commands/organization/output-organization-list.d.mts.map +0 -1
  256. package/dist/types/commands/organization/output-quota.d.mts +0 -4
  257. package/dist/types/commands/organization/output-quota.d.mts.map +0 -1
  258. package/dist/types/commands/organization/output-security-policy.d.mts +0 -4
  259. package/dist/types/commands/organization/output-security-policy.d.mts.map +0 -1
  260. package/dist/types/commands/package/cmd-package-score.d.mts +0 -10
  261. package/dist/types/commands/package/cmd-package-score.d.mts.map +0 -1
  262. package/dist/types/commands/package/cmd-package-shallow.d.mts +0 -17
  263. package/dist/types/commands/package/cmd-package-shallow.d.mts.map +0 -1
  264. package/dist/types/commands/package/cmd-package.d.mts +0 -3
  265. package/dist/types/commands/package/cmd-package.d.mts.map +0 -1
  266. package/dist/types/commands/package/fetch-purl-deep-score.d.mts +0 -51
  267. package/dist/types/commands/package/fetch-purl-deep-score.d.mts.map +0 -1
  268. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +0 -8
  269. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +0 -1
  270. package/dist/types/commands/package/handle-purl-deep-score.d.mts +0 -3
  271. package/dist/types/commands/package/handle-purl-deep-score.d.mts.map +0 -1
  272. package/dist/types/commands/package/handle-purls-shallow-score.d.mts +0 -6
  273. package/dist/types/commands/package/handle-purls-shallow-score.d.mts.map +0 -1
  274. package/dist/types/commands/package/output-purls-deep-score.d.mts +0 -5
  275. package/dist/types/commands/package/output-purls-deep-score.d.mts.map +0 -1
  276. package/dist/types/commands/package/output-purls-shallow-score.d.mts +0 -29
  277. package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +0 -1
  278. package/dist/types/commands/package/parse-package-specifiers.d.mts +0 -9
  279. package/dist/types/commands/package/parse-package-specifiers.d.mts.map +0 -1
  280. package/dist/types/commands/patch/cmd-patch.d.mts +0 -10
  281. package/dist/types/commands/patch/cmd-patch.d.mts.map +0 -1
  282. package/dist/types/commands/patch/handle-patch.d.mts +0 -12
  283. package/dist/types/commands/patch/handle-patch.d.mts.map +0 -1
  284. package/dist/types/commands/patch/manifest-schema.d.mts +0 -34
  285. package/dist/types/commands/patch/manifest-schema.d.mts.map +0 -1
  286. package/dist/types/commands/patch/output-patch-result.d.mts +0 -5
  287. package/dist/types/commands/patch/output-patch-result.d.mts.map +0 -1
  288. package/dist/types/commands/pnpm/cmd-pnpm.d.mts +0 -10
  289. package/dist/types/commands/pnpm/cmd-pnpm.d.mts.map +0 -1
  290. package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts +0 -9
  291. package/dist/types/commands/raw-npm/cmd-raw-npm.d.mts.map +0 -1
  292. package/dist/types/commands/raw-npm/run-raw-npm.d.mts +0 -2
  293. package/dist/types/commands/raw-npm/run-raw-npm.d.mts.map +0 -1
  294. package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts +0 -9
  295. package/dist/types/commands/raw-npx/cmd-raw-npx.d.mts.map +0 -1
  296. package/dist/types/commands/raw-npx/run-raw-npx.d.mts +0 -2
  297. package/dist/types/commands/raw-npx/run-raw-npx.d.mts.map +0 -1
  298. package/dist/types/commands/repository/cmd-repository-create.d.mts +0 -10
  299. package/dist/types/commands/repository/cmd-repository-create.d.mts.map +0 -1
  300. package/dist/types/commands/repository/cmd-repository-del.d.mts +0 -10
  301. package/dist/types/commands/repository/cmd-repository-del.d.mts.map +0 -1
  302. package/dist/types/commands/repository/cmd-repository-list.d.mts +0 -10
  303. package/dist/types/commands/repository/cmd-repository-list.d.mts.map +0 -1
  304. package/dist/types/commands/repository/cmd-repository-update.d.mts +0 -10
  305. package/dist/types/commands/repository/cmd-repository-update.d.mts.map +0 -1
  306. package/dist/types/commands/repository/cmd-repository-view.d.mts +0 -10
  307. package/dist/types/commands/repository/cmd-repository-view.d.mts.map +0 -1
  308. package/dist/types/commands/repository/cmd-repository.d.mts +0 -3
  309. package/dist/types/commands/repository/cmd-repository.d.mts.map +0 -1
  310. package/dist/types/commands/repository/fetch-create-repo.d.mts +0 -16
  311. package/dist/types/commands/repository/fetch-create-repo.d.mts.map +0 -1
  312. package/dist/types/commands/repository/fetch-delete-repo.d.mts +0 -8
  313. package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +0 -1
  314. package/dist/types/commands/repository/fetch-list-all-repos.d.mts +0 -10
  315. package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +0 -1
  316. package/dist/types/commands/repository/fetch-list-repos.d.mts +0 -15
  317. package/dist/types/commands/repository/fetch-list-repos.d.mts.map +0 -1
  318. package/dist/types/commands/repository/fetch-update-repo.d.mts +0 -16
  319. package/dist/types/commands/repository/fetch-update-repo.d.mts.map +0 -1
  320. package/dist/types/commands/repository/fetch-view-repo.d.mts +0 -8
  321. package/dist/types/commands/repository/fetch-view-repo.d.mts.map +0 -1
  322. package/dist/types/commands/repository/handle-create-repo.d.mts +0 -10
  323. package/dist/types/commands/repository/handle-create-repo.d.mts.map +0 -1
  324. package/dist/types/commands/repository/handle-delete-repo.d.mts +0 -3
  325. package/dist/types/commands/repository/handle-delete-repo.d.mts.map +0 -1
  326. package/dist/types/commands/repository/handle-list-repos.d.mts +0 -12
  327. package/dist/types/commands/repository/handle-list-repos.d.mts.map +0 -1
  328. package/dist/types/commands/repository/handle-update-repo.d.mts +0 -10
  329. package/dist/types/commands/repository/handle-update-repo.d.mts.map +0 -1
  330. package/dist/types/commands/repository/handle-view-repo.d.mts +0 -3
  331. package/dist/types/commands/repository/handle-view-repo.d.mts.map +0 -1
  332. package/dist/types/commands/repository/output-create-repo.d.mts +0 -4
  333. package/dist/types/commands/repository/output-create-repo.d.mts.map +0 -1
  334. package/dist/types/commands/repository/output-delete-repo.d.mts +0 -4
  335. package/dist/types/commands/repository/output-delete-repo.d.mts.map +0 -1
  336. package/dist/types/commands/repository/output-list-repos.d.mts +0 -5
  337. package/dist/types/commands/repository/output-list-repos.d.mts.map +0 -1
  338. package/dist/types/commands/repository/output-update-repo.d.mts +0 -4
  339. package/dist/types/commands/repository/output-update-repo.d.mts.map +0 -1
  340. package/dist/types/commands/repository/output-view-repo.d.mts +0 -4
  341. package/dist/types/commands/repository/output-view-repo.d.mts.map +0 -1
  342. package/dist/types/commands/repository/types.d.mts +0 -2
  343. package/dist/types/commands/repository/types.d.mts.map +0 -1
  344. package/dist/types/commands/scan/cmd-scan-create.d.mts +0 -10
  345. package/dist/types/commands/scan/cmd-scan-create.d.mts.map +0 -1
  346. package/dist/types/commands/scan/cmd-scan-del.d.mts +0 -10
  347. package/dist/types/commands/scan/cmd-scan-del.d.mts.map +0 -1
  348. package/dist/types/commands/scan/cmd-scan-diff.d.mts +0 -10
  349. package/dist/types/commands/scan/cmd-scan-diff.d.mts.map +0 -1
  350. package/dist/types/commands/scan/cmd-scan-github.d.mts +0 -10
  351. package/dist/types/commands/scan/cmd-scan-github.d.mts.map +0 -1
  352. package/dist/types/commands/scan/cmd-scan-list.d.mts +0 -4
  353. package/dist/types/commands/scan/cmd-scan-list.d.mts.map +0 -1
  354. package/dist/types/commands/scan/cmd-scan-metadata.d.mts +0 -4
  355. package/dist/types/commands/scan/cmd-scan-metadata.d.mts.map +0 -1
  356. package/dist/types/commands/scan/cmd-scan-reach.d.mts +0 -10
  357. package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +0 -1
  358. package/dist/types/commands/scan/cmd-scan-report.d.mts +0 -4
  359. package/dist/types/commands/scan/cmd-scan-report.d.mts.map +0 -1
  360. package/dist/types/commands/scan/cmd-scan-setup.d.mts +0 -9
  361. package/dist/types/commands/scan/cmd-scan-setup.d.mts.map +0 -1
  362. package/dist/types/commands/scan/cmd-scan-view.d.mts +0 -4
  363. package/dist/types/commands/scan/cmd-scan-view.d.mts.map +0 -1
  364. package/dist/types/commands/scan/cmd-scan.d.mts +0 -3
  365. package/dist/types/commands/scan/cmd-scan.d.mts.map +0 -1
  366. package/dist/types/commands/scan/create-scan-from-github.d.mts +0 -12
  367. package/dist/types/commands/scan/create-scan-from-github.d.mts.map +0 -1
  368. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +0 -20
  369. package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +0 -1
  370. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +0 -8
  371. package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +0 -1
  372. package/dist/types/commands/scan/fetch-diff-scan.d.mts +0 -8
  373. package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +0 -1
  374. package/dist/types/commands/scan/fetch-list-scans.d.mts +0 -18
  375. package/dist/types/commands/scan/fetch-list-scans.d.mts.map +0 -1
  376. package/dist/types/commands/scan/fetch-report-data.d.mts +0 -17
  377. package/dist/types/commands/scan/fetch-report-data.d.mts.map +0 -1
  378. package/dist/types/commands/scan/fetch-scan-metadata.d.mts +0 -8
  379. package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +0 -1
  380. package/dist/types/commands/scan/fetch-scan.d.mts +0 -4
  381. package/dist/types/commands/scan/fetch-scan.d.mts.map +0 -1
  382. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +0 -10
  383. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +0 -1
  384. package/dist/types/commands/scan/finalize-tier1-scan.d.mts +0 -12
  385. package/dist/types/commands/scan/finalize-tier1-scan.d.mts.map +0 -1
  386. package/dist/types/commands/scan/generate-report.d.mts +0 -44
  387. package/dist/types/commands/scan/generate-report.d.mts.map +0 -1
  388. package/dist/types/commands/scan/handle-create-github-scan.d.mts +0 -12
  389. package/dist/types/commands/scan/handle-create-github-scan.d.mts.map +0 -1
  390. package/dist/types/commands/scan/handle-create-new-scan.d.mts +0 -29
  391. package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +0 -1
  392. package/dist/types/commands/scan/handle-delete-scan.d.mts +0 -3
  393. package/dist/types/commands/scan/handle-delete-scan.d.mts.map +0 -1
  394. package/dist/types/commands/scan/handle-diff-scan.d.mts +0 -10
  395. package/dist/types/commands/scan/handle-diff-scan.d.mts.map +0 -1
  396. package/dist/types/commands/scan/handle-list-scans.d.mts +0 -13
  397. package/dist/types/commands/scan/handle-list-scans.d.mts.map +0 -1
  398. package/dist/types/commands/scan/handle-scan-config.d.mts +0 -2
  399. package/dist/types/commands/scan/handle-scan-config.d.mts.map +0 -1
  400. package/dist/types/commands/scan/handle-scan-metadata.d.mts +0 -3
  401. package/dist/types/commands/scan/handle-scan-metadata.d.mts.map +0 -1
  402. package/dist/types/commands/scan/handle-scan-reach.d.mts +0 -12
  403. package/dist/types/commands/scan/handle-scan-reach.d.mts.map +0 -1
  404. package/dist/types/commands/scan/handle-scan-report.d.mts +0 -14
  405. package/dist/types/commands/scan/handle-scan-report.d.mts.map +0 -1
  406. package/dist/types/commands/scan/handle-scan-view.d.mts +0 -3
  407. package/dist/types/commands/scan/handle-scan-view.d.mts.map +0 -1
  408. package/dist/types/commands/scan/output-create-new-scan.d.mts +0 -10
  409. package/dist/types/commands/scan/output-create-new-scan.d.mts.map +0 -1
  410. package/dist/types/commands/scan/output-delete-scan.d.mts +0 -4
  411. package/dist/types/commands/scan/output-delete-scan.d.mts.map +0 -1
  412. package/dist/types/commands/scan/output-diff-scan.d.mts +0 -8
  413. package/dist/types/commands/scan/output-diff-scan.d.mts.map +0 -1
  414. package/dist/types/commands/scan/output-list-scans.d.mts +0 -4
  415. package/dist/types/commands/scan/output-list-scans.d.mts.map +0 -1
  416. package/dist/types/commands/scan/output-scan-config-result.d.mts +0 -3
  417. package/dist/types/commands/scan/output-scan-config-result.d.mts.map +0 -1
  418. package/dist/types/commands/scan/output-scan-github.d.mts +0 -3
  419. package/dist/types/commands/scan/output-scan-github.d.mts.map +0 -1
  420. package/dist/types/commands/scan/output-scan-metadata.d.mts +0 -4
  421. package/dist/types/commands/scan/output-scan-metadata.d.mts.map +0 -1
  422. package/dist/types/commands/scan/output-scan-reach.d.mts +0 -7
  423. package/dist/types/commands/scan/output-scan-reach.d.mts.map +0 -1
  424. package/dist/types/commands/scan/output-scan-report.d.mts +0 -22
  425. package/dist/types/commands/scan/output-scan-report.d.mts.map +0 -1
  426. package/dist/types/commands/scan/output-scan-view.d.mts +0 -4
  427. package/dist/types/commands/scan/output-scan-view.d.mts.map +0 -1
  428. package/dist/types/commands/scan/perform-reachability-analysis.d.mts +0 -27
  429. package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +0 -1
  430. package/dist/types/commands/scan/reachability-flags.d.mts +0 -3
  431. package/dist/types/commands/scan/reachability-flags.d.mts.map +0 -1
  432. package/dist/types/commands/scan/setup-scan-config.d.mts +0 -3
  433. package/dist/types/commands/scan/setup-scan-config.d.mts.map +0 -1
  434. package/dist/types/commands/scan/stream-scan.d.mts +0 -7
  435. package/dist/types/commands/scan/stream-scan.d.mts.map +0 -1
  436. package/dist/types/commands/scan/suggest-org-slug.d.mts +0 -2
  437. package/dist/types/commands/scan/suggest-org-slug.d.mts.map +0 -1
  438. package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts +0 -2
  439. package/dist/types/commands/scan/suggest-to-persist-orgslug.d.mts.map +0 -1
  440. package/dist/types/commands/scan/suggest_branch_slug.d.mts +0 -2
  441. package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +0 -1
  442. package/dist/types/commands/scan/suggest_target.d.mts +0 -2
  443. package/dist/types/commands/scan/suggest_target.d.mts.map +0 -1
  444. package/dist/types/commands/scan/types.d.mts +0 -3
  445. package/dist/types/commands/scan/types.d.mts.map +0 -1
  446. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts +0 -10
  447. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +0 -1
  448. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +0 -13
  449. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +0 -1
  450. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +0 -13
  451. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +0 -1
  452. package/dist/types/commands/threat-feed/output-threat-feed.d.mts +0 -4
  453. package/dist/types/commands/threat-feed/output-threat-feed.d.mts.map +0 -1
  454. package/dist/types/commands/threat-feed/types.d.mts +0 -15
  455. package/dist/types/commands/threat-feed/types.d.mts.map +0 -1
  456. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts +0 -8
  457. package/dist/types/commands/uninstall/cmd-uninstall-completion.d.mts.map +0 -1
  458. package/dist/types/commands/uninstall/cmd-uninstall.d.mts +0 -3
  459. package/dist/types/commands/uninstall/cmd-uninstall.d.mts.map +0 -1
  460. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts +0 -2
  461. package/dist/types/commands/uninstall/handle-uninstall-completion.d.mts.map +0 -1
  462. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts +0 -6
  463. package/dist/types/commands/uninstall/output-uninstall-completion.d.mts.map +0 -1
  464. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts +0 -6
  465. package/dist/types/commands/uninstall/teardown-tab-completion.d.mts.map +0 -1
  466. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts +0 -2
  467. package/dist/types/commands/wrapper/add-socket-wrapper.d.mts.map +0 -1
  468. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts +0 -2
  469. package/dist/types/commands/wrapper/check-socket-wrapper-setup.d.mts.map +0 -1
  470. package/dist/types/commands/wrapper/cmd-wrapper.d.mts +0 -9
  471. package/dist/types/commands/wrapper/cmd-wrapper.d.mts.map +0 -1
  472. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts +0 -2
  473. package/dist/types/commands/wrapper/postinstall-wrapper.d.mts.map +0 -1
  474. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +0 -2
  475. package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +0 -1
  476. package/dist/types/commands/yarn/cmd-yarn.d.mts +0 -10
  477. package/dist/types/commands/yarn/cmd-yarn.d.mts.map +0 -1
  478. package/dist/types/commands.d.mts +0 -203
  479. package/dist/types/commands.d.mts.map +0 -1
  480. package/dist/types/constants.d.mts +0 -299
  481. package/dist/types/constants.d.mts.map +0 -1
  482. package/dist/types/flags.d.mts +0 -18
  483. package/dist/types/flags.d.mts.map +0 -1
  484. package/dist/types/instrument-with-sentry.d.mts +0 -2
  485. package/dist/types/instrument-with-sentry.d.mts.map +0 -1
  486. package/dist/types/npm-cli.d.mts +0 -3
  487. package/dist/types/npm-cli.d.mts.map +0 -1
  488. package/dist/types/npx-cli.d.mts +0 -3
  489. package/dist/types/npx-cli.d.mts.map +0 -1
  490. package/dist/types/pnpm-cli.d.mts +0 -3
  491. package/dist/types/pnpm-cli.d.mts.map +0 -1
  492. package/dist/types/sea/bootstrap.d.mts +0 -2
  493. package/dist/types/sea/bootstrap.d.mts.map +0 -1
  494. package/dist/types/sea/build-sea.d.mts +0 -27
  495. package/dist/types/sea/build-sea.d.mts.map +0 -1
  496. package/dist/types/shadow/common.d.mts +0 -23
  497. package/dist/types/shadow/common.d.mts.map +0 -1
  498. package/dist/types/shadow/npm/arborist/index.d.mts +0 -8
  499. package/dist/types/shadow/npm/arborist/index.d.mts.map +0 -1
  500. package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts +0 -35
  501. package/dist/types/shadow/npm/arborist/lib/arborist/index.d.mts.map +0 -1
  502. package/dist/types/shadow/npm/arborist/types.d.mts +0 -123
  503. package/dist/types/shadow/npm/arborist/types.d.mts.map +0 -1
  504. package/dist/types/shadow/npm/arborist-helpers.d.mts +0 -24
  505. package/dist/types/shadow/npm/arborist-helpers.d.mts.map +0 -1
  506. package/dist/types/shadow/npm/bin.d.mts +0 -5
  507. package/dist/types/shadow/npm/bin.d.mts.map +0 -1
  508. package/dist/types/shadow/npm/inject.d.mts +0 -2
  509. package/dist/types/shadow/npm/inject.d.mts.map +0 -1
  510. package/dist/types/shadow/npm/install.d.mts +0 -13
  511. package/dist/types/shadow/npm/install.d.mts.map +0 -1
  512. package/dist/types/shadow/npm/paths.d.mts +0 -6
  513. package/dist/types/shadow/npm/paths.d.mts.map +0 -1
  514. package/dist/types/shadow/npm-base.d.mts +0 -11
  515. package/dist/types/shadow/npm-base.d.mts.map +0 -1
  516. package/dist/types/shadow/npx/bin.d.mts +0 -5
  517. package/dist/types/shadow/npx/bin.d.mts.map +0 -1
  518. package/dist/types/shadow/pnpm/bin.d.mts +0 -10
  519. package/dist/types/shadow/pnpm/bin.d.mts.map +0 -1
  520. package/dist/types/shadow/stdio-ipc.d.mts +0 -7
  521. package/dist/types/shadow/stdio-ipc.d.mts.map +0 -1
  522. package/dist/types/shadow/yarn/bin.d.mts +0 -10
  523. package/dist/types/shadow/yarn/bin.d.mts.map +0 -1
  524. package/dist/types/test/json-output-validation.d.mts +0 -37
  525. package/dist/types/test/json-output-validation.d.mts.map +0 -1
  526. package/dist/types/test/mocks/socket-auth.d.mts +0 -88
  527. package/dist/types/test/mocks/socket-auth.d.mts.map +0 -1
  528. package/dist/types/types.d.mts +0 -29
  529. package/dist/types/types.d.mts.map +0 -1
  530. package/dist/types/utils/agent.d.mts +0 -12
  531. package/dist/types/utils/agent.d.mts.map +0 -1
  532. package/dist/types/utils/alert/artifact.d.mts +0 -21
  533. package/dist/types/utils/alert/artifact.d.mts.map +0 -1
  534. package/dist/types/utils/alert/fix.d.mts +0 -6
  535. package/dist/types/utils/alert/fix.d.mts.map +0 -1
  536. package/dist/types/utils/alert/severity.d.mts +0 -14
  537. package/dist/types/utils/alert/severity.d.mts.map +0 -1
  538. package/dist/types/utils/alerts-map.d.mts +0 -27
  539. package/dist/types/utils/alerts-map.d.mts.map +0 -1
  540. package/dist/types/utils/api.d.mts +0 -44
  541. package/dist/types/utils/api.d.mts.map +0 -1
  542. package/dist/types/utils/check-input.d.mts +0 -9
  543. package/dist/types/utils/check-input.d.mts.map +0 -1
  544. package/dist/types/utils/cmd.d.mts +0 -50
  545. package/dist/types/utils/cmd.d.mts.map +0 -1
  546. package/dist/types/utils/coana.d.mts +0 -2
  547. package/dist/types/utils/coana.d.mts.map +0 -1
  548. package/dist/types/utils/color-or-markdown.d.mts +0 -16
  549. package/dist/types/utils/color-or-markdown.d.mts.map +0 -1
  550. package/dist/types/utils/completion.d.mts +0 -11
  551. package/dist/types/utils/completion.d.mts.map +0 -1
  552. package/dist/types/utils/config.d.mts +0 -34
  553. package/dist/types/utils/config.d.mts.map +0 -1
  554. package/dist/types/utils/cve-to-ghsa.d.mts +0 -6
  555. package/dist/types/utils/cve-to-ghsa.d.mts.map +0 -1
  556. package/dist/types/utils/debug.d.mts +0 -45
  557. package/dist/types/utils/debug.d.mts.map +0 -1
  558. package/dist/types/utils/determine-org-slug.d.mts +0 -2
  559. package/dist/types/utils/determine-org-slug.d.mts.map +0 -1
  560. package/dist/types/utils/dlx-binary.d.mts +0 -58
  561. package/dist/types/utils/dlx-binary.d.mts.map +0 -1
  562. package/dist/types/utils/dlx-detection.d.mts +0 -29
  563. package/dist/types/utils/dlx-detection.d.mts.map +0 -1
  564. package/dist/types/utils/dlx.d.mts +0 -36
  565. package/dist/types/utils/dlx.d.mts.map +0 -1
  566. package/dist/types/utils/ecosystem.d.mts +0 -20
  567. package/dist/types/utils/ecosystem.d.mts.map +0 -1
  568. package/dist/types/utils/errors.d.mts +0 -62
  569. package/dist/types/utils/errors.d.mts.map +0 -1
  570. package/dist/types/utils/extract-names.d.mts +0 -15
  571. package/dist/types/utils/extract-names.d.mts.map +0 -1
  572. package/dist/types/utils/fail-msg-with-badge.d.mts +0 -2
  573. package/dist/types/utils/fail-msg-with-badge.d.mts.map +0 -1
  574. package/dist/types/utils/filter-config.d.mts +0 -5
  575. package/dist/types/utils/filter-config.d.mts.map +0 -1
  576. package/dist/types/utils/fs.d.mts +0 -8
  577. package/dist/types/utils/fs.d.mts.map +0 -1
  578. package/dist/types/utils/get-output-kind.d.mts +0 -3
  579. package/dist/types/utils/get-output-kind.d.mts.map +0 -1
  580. package/dist/types/utils/git.d.mts +0 -35
  581. package/dist/types/utils/git.d.mts.map +0 -1
  582. package/dist/types/utils/github.d.mts +0 -38
  583. package/dist/types/utils/github.d.mts.map +0 -1
  584. package/dist/types/utils/glob.d.mts +0 -15
  585. package/dist/types/utils/glob.d.mts.map +0 -1
  586. package/dist/types/utils/lockfile.d.mts +0 -2
  587. package/dist/types/utils/lockfile.d.mts.map +0 -1
  588. package/dist/types/utils/map-to-object.d.mts +0 -10
  589. package/dist/types/utils/map-to-object.d.mts.map +0 -1
  590. package/dist/types/utils/markdown.d.mts +0 -27
  591. package/dist/types/utils/markdown.d.mts.map +0 -1
  592. package/dist/types/utils/meow-with-subcommands.d.mts +0 -83
  593. package/dist/types/utils/meow-with-subcommands.d.mts.map +0 -1
  594. package/dist/types/utils/ms-at-home.d.mts +0 -2
  595. package/dist/types/utils/ms-at-home.d.mts.map +0 -1
  596. package/dist/types/utils/npm-config.d.mts +0 -14
  597. package/dist/types/utils/npm-config.d.mts.map +0 -1
  598. package/dist/types/utils/npm-package-arg.d.mts +0 -8
  599. package/dist/types/utils/npm-package-arg.d.mts.map +0 -1
  600. package/dist/types/utils/npm-paths.d.mts +0 -7
  601. package/dist/types/utils/npm-paths.d.mts.map +0 -1
  602. package/dist/types/utils/npm-spec.d.mts +0 -57
  603. package/dist/types/utils/npm-spec.d.mts.map +0 -1
  604. package/dist/types/utils/objects.d.mts +0 -3
  605. package/dist/types/utils/objects.d.mts.map +0 -1
  606. package/dist/types/utils/organization.d.mts +0 -5
  607. package/dist/types/utils/organization.d.mts.map +0 -1
  608. package/dist/types/utils/output-formatting.d.mts +0 -20
  609. package/dist/types/utils/output-formatting.d.mts.map +0 -1
  610. package/dist/types/utils/package-environment.d.mts +0 -57
  611. package/dist/types/utils/package-environment.d.mts.map +0 -1
  612. package/dist/types/utils/path-resolve.d.mts +0 -14
  613. package/dist/types/utils/path-resolve.d.mts.map +0 -1
  614. package/dist/types/utils/pnpm-paths.d.mts +0 -5
  615. package/dist/types/utils/pnpm-paths.d.mts.map +0 -1
  616. package/dist/types/utils/pnpm.d.mts +0 -11
  617. package/dist/types/utils/pnpm.d.mts.map +0 -1
  618. package/dist/types/utils/purl-to-ghsa.d.mts +0 -6
  619. package/dist/types/utils/purl-to-ghsa.d.mts.map +0 -1
  620. package/dist/types/utils/purl.d.mts +0 -71
  621. package/dist/types/utils/purl.d.mts.map +0 -1
  622. package/dist/types/utils/requirements.d.mts +0 -125
  623. package/dist/types/utils/requirements.d.mts.map +0 -1
  624. package/dist/types/utils/sdk.d.mts +0 -17
  625. package/dist/types/utils/sdk.d.mts.map +0 -1
  626. package/dist/types/utils/semver.d.mts +0 -7
  627. package/dist/types/utils/semver.d.mts.map +0 -1
  628. package/dist/types/utils/serialize-result-json.d.mts +0 -5
  629. package/dist/types/utils/serialize-result-json.d.mts.map +0 -1
  630. package/dist/types/utils/shadow-links.d.mts +0 -5
  631. package/dist/types/utils/shadow-links.d.mts.map +0 -1
  632. package/dist/types/utils/socket-json.d.mts +0 -59
  633. package/dist/types/utils/socket-json.d.mts.map +0 -1
  634. package/dist/types/utils/socket-package-alert.d.mts +0 -80
  635. package/dist/types/utils/socket-package-alert.d.mts.map +0 -1
  636. package/dist/types/utils/socket-url.d.mts +0 -8
  637. package/dist/types/utils/socket-url.d.mts.map +0 -1
  638. package/dist/types/utils/spec.d.mts +0 -5
  639. package/dist/types/utils/spec.d.mts.map +0 -1
  640. package/dist/types/utils/strings.d.mts +0 -14
  641. package/dist/types/utils/strings.d.mts.map +0 -1
  642. package/dist/types/utils/terminal-link.d.mts +0 -52
  643. package/dist/types/utils/terminal-link.d.mts.map +0 -1
  644. package/dist/types/utils/tildify.d.mts +0 -2
  645. package/dist/types/utils/tildify.d.mts.map +0 -1
  646. package/dist/types/utils/translations.d.mts +0 -617
  647. package/dist/types/utils/translations.d.mts.map +0 -1
  648. package/dist/types/utils/walk-nested-map.d.mts +0 -7
  649. package/dist/types/utils/walk-nested-map.d.mts.map +0 -1
  650. package/dist/types/utils/yarn-paths.d.mts +0 -5
  651. package/dist/types/utils/yarn-paths.d.mts.map +0 -1
  652. package/dist/types/utils/yarn-version.d.mts +0 -2
  653. package/dist/types/utils/yarn-version.d.mts.map +0 -1
  654. package/dist/types/yarn-cli.d.mts +0 -3
  655. package/dist/types/yarn-cli.d.mts.map +0 -1
  656. package/dist/utils.js +0 -6146
  657. package/dist/utils.js.map +0 -1
  658. package/dist/vendor.js +0 -162074
  659. package/dist/yarn-cli.js +0 -30
  660. package/dist/yarn-cli.js.map +0 -1
  661. package/external/@socketsecurity/registry/LICENSE +0 -21
  662. package/external/@socketsecurity/registry/README.md +0 -9
  663. package/external/@socketsecurity/registry/extensions.json +0 -28
  664. package/external/@socketsecurity/registry/external/@inquirer/confirm.js +0 -3165
  665. package/external/@socketsecurity/registry/external/@inquirer/input.js +0 -3202
  666. package/external/@socketsecurity/registry/external/@inquirer/password.js +0 -3307
  667. package/external/@socketsecurity/registry/external/@inquirer/search.js +0 -3519
  668. package/external/@socketsecurity/registry/external/@inquirer/select.js +0 -3655
  669. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +0 -21406
  670. package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/read-package.js +0 -183
  671. package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/sort.js +0 -274
  672. package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +0 -704
  673. package/external/@socketsecurity/registry/external/@socketregistry/is-unicode-supported.js +0 -54
  674. package/external/@socketsecurity/registry/external/@socketregistry/packageurl-js.js +0 -4516
  675. package/external/@socketsecurity/registry/external/@socketregistry/yocto-spinner.js +0 -453
  676. package/external/@socketsecurity/registry/external/@yarnpkg/extensions.js +0 -1406
  677. package/external/@socketsecurity/registry/external/browserslist.js +0 -20496
  678. package/external/@socketsecurity/registry/external/cacache.js +0 -16208
  679. package/external/@socketsecurity/registry/external/debug.js +0 -1163
  680. package/external/@socketsecurity/registry/external/fast-glob.js +0 -7994
  681. package/external/@socketsecurity/registry/external/fast-sort.js +0 -181
  682. package/external/@socketsecurity/registry/external/libnpmpack.js +0 -106271
  683. package/external/@socketsecurity/registry/external/make-fetch-happen.js +0 -38997
  684. package/external/@socketsecurity/registry/external/normalize-package-data.js +0 -5343
  685. package/external/@socketsecurity/registry/external/npm-package-arg.js +0 -5773
  686. package/external/@socketsecurity/registry/external/pacote.js +0 -74109
  687. package/external/@socketsecurity/registry/external/picomatch.js +0 -2307
  688. package/external/@socketsecurity/registry/external/semver.js +0 -2618
  689. package/external/@socketsecurity/registry/external/signal-exit.js +0 -336
  690. package/external/@socketsecurity/registry/external/spdx-correct.js +0 -1457
  691. package/external/@socketsecurity/registry/external/spdx-expression-parse.js +0 -1043
  692. package/external/@socketsecurity/registry/external/streaming-iterables.js +0 -326
  693. package/external/@socketsecurity/registry/external/validate-npm-package-name.js +0 -108
  694. package/external/@socketsecurity/registry/external/which.js +0 -405
  695. package/external/@socketsecurity/registry/external/yoctocolors-cjs.js +0 -101
  696. package/external/@socketsecurity/registry/index.js +0 -31
  697. package/external/@socketsecurity/registry/lib/agent.js +0 -390
  698. package/external/@socketsecurity/registry/lib/arrays.js +0 -89
  699. package/external/@socketsecurity/registry/lib/bin.js +0 -650
  700. package/external/@socketsecurity/registry/lib/constants/abort-controller.js +0 -15
  701. package/external/@socketsecurity/registry/lib/constants/abort-signal.js +0 -27
  702. package/external/@socketsecurity/registry/lib/constants/at-latest.js +0 -3
  703. package/external/@socketsecurity/registry/lib/constants/biome-json.js +0 -3
  704. package/external/@socketsecurity/registry/lib/constants/bun-lock.js +0 -3
  705. package/external/@socketsecurity/registry/lib/constants/bun-lockb.js +0 -3
  706. package/external/@socketsecurity/registry/lib/constants/bun.js +0 -3
  707. package/external/@socketsecurity/registry/lib/constants/ci.js +0 -3
  708. package/external/@socketsecurity/registry/lib/constants/column-limit.js +0 -3
  709. package/external/@socketsecurity/registry/lib/constants/copy-left-licenses.js +0 -27
  710. package/external/@socketsecurity/registry/lib/constants/darwin.js +0 -3
  711. package/external/@socketsecurity/registry/lib/constants/dot-git-dir.js +0 -3
  712. package/external/@socketsecurity/registry/lib/constants/dot-package-lock-json.js +0 -3
  713. package/external/@socketsecurity/registry/lib/constants/dot-socket-dir.js +0 -3
  714. package/external/@socketsecurity/registry/lib/constants/empty-file.js +0 -3
  715. package/external/@socketsecurity/registry/lib/constants/empty-value.js +0 -3
  716. package/external/@socketsecurity/registry/lib/constants/env.js +0 -59
  717. package/external/@socketsecurity/registry/lib/constants/eslint-config-js.js +0 -3
  718. package/external/@socketsecurity/registry/lib/constants/esnext.js +0 -3
  719. package/external/@socketsecurity/registry/lib/constants/exec-path.js +0 -3
  720. package/external/@socketsecurity/registry/lib/constants/ext-cjs.js +0 -3
  721. package/external/@socketsecurity/registry/lib/constants/ext-cmd.js +0 -3
  722. package/external/@socketsecurity/registry/lib/constants/ext-cts.js +0 -3
  723. package/external/@socketsecurity/registry/lib/constants/ext-dts.js +0 -3
  724. package/external/@socketsecurity/registry/lib/constants/ext-js.js +0 -3
  725. package/external/@socketsecurity/registry/lib/constants/ext-json.js +0 -3
  726. package/external/@socketsecurity/registry/lib/constants/ext-lock.js +0 -3
  727. package/external/@socketsecurity/registry/lib/constants/ext-lockb.js +0 -3
  728. package/external/@socketsecurity/registry/lib/constants/ext-md.js +0 -3
  729. package/external/@socketsecurity/registry/lib/constants/ext-mjs.js +0 -3
  730. package/external/@socketsecurity/registry/lib/constants/ext-mts.js +0 -3
  731. package/external/@socketsecurity/registry/lib/constants/ext-ps1.js +0 -3
  732. package/external/@socketsecurity/registry/lib/constants/ext-yaml.js +0 -3
  733. package/external/@socketsecurity/registry/lib/constants/ext-yml.js +0 -3
  734. package/external/@socketsecurity/registry/lib/constants/extensions-json.js +0 -3
  735. package/external/@socketsecurity/registry/lib/constants/extensions.js +0 -3
  736. package/external/@socketsecurity/registry/lib/constants/get-ipc.js +0 -10
  737. package/external/@socketsecurity/registry/lib/constants/gitignore.js +0 -3
  738. package/external/@socketsecurity/registry/lib/constants/index.js +0 -139
  739. package/external/@socketsecurity/registry/lib/constants/ipc-handler.js +0 -19
  740. package/external/@socketsecurity/registry/lib/constants/ipc-object.js +0 -6
  741. package/external/@socketsecurity/registry/lib/constants/ipc-promise.js +0 -47
  742. package/external/@socketsecurity/registry/lib/constants/ipc-target.js +0 -3
  743. package/external/@socketsecurity/registry/lib/constants/k-internals-symbol.js +0 -3
  744. package/external/@socketsecurity/registry/lib/constants/latest.js +0 -3
  745. package/external/@socketsecurity/registry/lib/constants/license-glob-recursive.js +0 -3
  746. package/external/@socketsecurity/registry/lib/constants/license-glob.js +0 -3
  747. package/external/@socketsecurity/registry/lib/constants/license-original-glob-recursive.js +0 -3
  748. package/external/@socketsecurity/registry/lib/constants/license-original-glob.js +0 -3
  749. package/external/@socketsecurity/registry/lib/constants/license-original.js +0 -3
  750. package/external/@socketsecurity/registry/lib/constants/license.js +0 -3
  751. package/external/@socketsecurity/registry/lib/constants/lifecycle-script-names.js +0 -18
  752. package/external/@socketsecurity/registry/lib/constants/loop-sentinel.js +0 -3
  753. package/external/@socketsecurity/registry/lib/constants/maintained-node-versions.js +0 -47
  754. package/external/@socketsecurity/registry/lib/constants/manifest-json.js +0 -3
  755. package/external/@socketsecurity/registry/lib/constants/mit.js +0 -3
  756. package/external/@socketsecurity/registry/lib/constants/node-auth-token.js +0 -3
  757. package/external/@socketsecurity/registry/lib/constants/node-debug-flags.js +0 -9
  758. package/external/@socketsecurity/registry/lib/constants/node-env.js +0 -3
  759. package/external/@socketsecurity/registry/lib/constants/node-harden-flags.js +0 -29
  760. package/external/@socketsecurity/registry/lib/constants/node-modules-glob-recursive.js +0 -3
  761. package/external/@socketsecurity/registry/lib/constants/node-modules.js +0 -3
  762. package/external/@socketsecurity/registry/lib/constants/node-no-warnings-flags.js +0 -16
  763. package/external/@socketsecurity/registry/lib/constants/node-version.js +0 -3
  764. package/external/@socketsecurity/registry/lib/constants/npm-exec-path.js +0 -5
  765. package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +0 -6
  766. package/external/@socketsecurity/registry/lib/constants/npm-shrinkwrap-json.js +0 -3
  767. package/external/@socketsecurity/registry/lib/constants/npm.js +0 -3
  768. package/external/@socketsecurity/registry/lib/constants/npx.js +0 -3
  769. package/external/@socketsecurity/registry/lib/constants/overrides.js +0 -3
  770. package/external/@socketsecurity/registry/lib/constants/package-default-node-range.js +0 -6
  771. package/external/@socketsecurity/registry/lib/constants/package-default-socket-categories.js +0 -3
  772. package/external/@socketsecurity/registry/lib/constants/package-default-version.js +0 -3
  773. package/external/@socketsecurity/registry/lib/constants/package-extensions.js +0 -47
  774. package/external/@socketsecurity/registry/lib/constants/package-json.js +0 -3
  775. package/external/@socketsecurity/registry/lib/constants/package-lock-json.js +0 -3
  776. package/external/@socketsecurity/registry/lib/constants/packument-cache.js +0 -3
  777. package/external/@socketsecurity/registry/lib/constants/pacote-cache-path.js +0 -9
  778. package/external/@socketsecurity/registry/lib/constants/pnpm-exec-path.js +0 -5
  779. package/external/@socketsecurity/registry/lib/constants/pnpm-lock-yaml.js +0 -3
  780. package/external/@socketsecurity/registry/lib/constants/pnpm.js +0 -3
  781. package/external/@socketsecurity/registry/lib/constants/pre-commit.js +0 -3
  782. package/external/@socketsecurity/registry/lib/constants/readme-glob-recursive.js +0 -3
  783. package/external/@socketsecurity/registry/lib/constants/readme-glob.js +0 -3
  784. package/external/@socketsecurity/registry/lib/constants/readme-md.js +0 -3
  785. package/external/@socketsecurity/registry/lib/constants/registry-scope-delimiter.js +0 -3
  786. package/external/@socketsecurity/registry/lib/constants/registry.js +0 -3
  787. package/external/@socketsecurity/registry/lib/constants/resolutions.js +0 -3
  788. package/external/@socketsecurity/registry/lib/constants/socket-github-org.js +0 -3
  789. package/external/@socketsecurity/registry/lib/constants/socket-ipc-handshake.js +0 -3
  790. package/external/@socketsecurity/registry/lib/constants/socket-override-scope.js +0 -3
  791. package/external/@socketsecurity/registry/lib/constants/socket-public-api-token.js +0 -3
  792. package/external/@socketsecurity/registry/lib/constants/socket-registry-npm-org.js +0 -3
  793. package/external/@socketsecurity/registry/lib/constants/socket-registry-package-name.js +0 -3
  794. package/external/@socketsecurity/registry/lib/constants/socket-registry-repo-name.js +0 -3
  795. package/external/@socketsecurity/registry/lib/constants/socket-registry-scope.js +0 -3
  796. package/external/@socketsecurity/registry/lib/constants/socket-security-scope.js +0 -3
  797. package/external/@socketsecurity/registry/lib/constants/spinner.js +0 -4
  798. package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-api.js +0 -8
  799. package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-env-var.js +0 -8
  800. package/external/@socketsecurity/registry/lib/constants/supports-node-disable-warning-flag.js +0 -8
  801. package/external/@socketsecurity/registry/lib/constants/supports-node-permission-flag.js +0 -8
  802. package/external/@socketsecurity/registry/lib/constants/supports-node-require-module.js +0 -3
  803. package/external/@socketsecurity/registry/lib/constants/supports-node-run.js +0 -8
  804. package/external/@socketsecurity/registry/lib/constants/supports-process-send.js +0 -5
  805. package/external/@socketsecurity/registry/lib/constants/ts-libs-available.js +0 -22
  806. package/external/@socketsecurity/registry/lib/constants/ts-types-available.js +0 -3
  807. package/external/@socketsecurity/registry/lib/constants/tsconfig-json.js +0 -3
  808. package/external/@socketsecurity/registry/lib/constants/undefined-token.js +0 -3
  809. package/external/@socketsecurity/registry/lib/constants/unknown-error.js +0 -3
  810. package/external/@socketsecurity/registry/lib/constants/unknown-value.js +0 -3
  811. package/external/@socketsecurity/registry/lib/constants/unlicenced.js +0 -3
  812. package/external/@socketsecurity/registry/lib/constants/unlicensed.js +0 -3
  813. package/external/@socketsecurity/registry/lib/constants/utf8.js +0 -3
  814. package/external/@socketsecurity/registry/lib/constants/vitest.js +0 -3
  815. package/external/@socketsecurity/registry/lib/constants/vlt-lock-json.js +0 -3
  816. package/external/@socketsecurity/registry/lib/constants/vlt.js +0 -3
  817. package/external/@socketsecurity/registry/lib/constants/win32.js +0 -3
  818. package/external/@socketsecurity/registry/lib/constants/yarn-berry.js +0 -3
  819. package/external/@socketsecurity/registry/lib/constants/yarn-classic.js +0 -3
  820. package/external/@socketsecurity/registry/lib/constants/yarn-exec-path.js +0 -5
  821. package/external/@socketsecurity/registry/lib/constants/yarn-lock.js +0 -3
  822. package/external/@socketsecurity/registry/lib/constants/yarn.js +0 -3
  823. package/external/@socketsecurity/registry/lib/debug.js +0 -264
  824. package/external/@socketsecurity/registry/lib/env.js +0 -62
  825. package/external/@socketsecurity/registry/lib/fs.js +0 -556
  826. package/external/@socketsecurity/registry/lib/functions.js +0 -20
  827. package/external/@socketsecurity/registry/lib/globs.js +0 -145
  828. package/external/@socketsecurity/registry/lib/json.js +0 -69
  829. package/external/@socketsecurity/registry/lib/logger.js +0 -534
  830. package/external/@socketsecurity/registry/lib/objects.js +0 -422
  831. package/external/@socketsecurity/registry/lib/packages.js +0 -1376
  832. package/external/@socketsecurity/registry/lib/path.js +0 -231
  833. package/external/@socketsecurity/registry/lib/promises.js +0 -286
  834. package/external/@socketsecurity/registry/lib/prompts.js +0 -63
  835. package/external/@socketsecurity/registry/lib/regexps.js +0 -23
  836. package/external/@socketsecurity/registry/lib/sorts.js +0 -70
  837. package/external/@socketsecurity/registry/lib/spawn.js +0 -252
  838. package/external/@socketsecurity/registry/lib/spinner.js +0 -205
  839. package/external/@socketsecurity/registry/lib/streams.js +0 -84
  840. package/external/@socketsecurity/registry/lib/strings.js +0 -235
  841. package/external/@socketsecurity/registry/lib/url.js +0 -68
  842. package/external/@socketsecurity/registry/lib/words.js +0 -45
  843. package/external/@socketsecurity/registry/manifest.json +0 -1875
  844. package/external/blessed/LICENSE +0 -20
  845. package/external/blessed/README.md +0 -2421
  846. package/external/blessed/lib/alias.js +0 -528
  847. package/external/blessed/lib/blessed.js +0 -34
  848. package/external/blessed/lib/colors.js +0 -532
  849. package/external/blessed/lib/events.js +0 -191
  850. package/external/blessed/lib/gpmclient.js +0 -223
  851. package/external/blessed/lib/helpers.js +0 -167
  852. package/external/blessed/lib/keys.js +0 -341
  853. package/external/blessed/lib/program.js +0 -4297
  854. package/external/blessed/lib/tput.js +0 -3020
  855. package/external/blessed/lib/unicode.js +0 -792
  856. package/external/blessed/lib/widget.js +0 -62
  857. package/external/blessed/lib/widgets/ansiimage.js +0 -169
  858. package/external/blessed/lib/widgets/bigtext.js +0 -161
  859. package/external/blessed/lib/widgets/box.js +0 -36
  860. package/external/blessed/lib/widgets/button.js +0 -64
  861. package/external/blessed/lib/widgets/checkbox.js +0 -93
  862. package/external/blessed/lib/widgets/element.js +0 -2572
  863. package/external/blessed/lib/widgets/filemanager.js +0 -214
  864. package/external/blessed/lib/widgets/form.js +0 -269
  865. package/external/blessed/lib/widgets/image.js +0 -63
  866. package/external/blessed/lib/widgets/input.js +0 -36
  867. package/external/blessed/lib/widgets/layout.js +0 -235
  868. package/external/blessed/lib/widgets/line.js +0 -58
  869. package/external/blessed/lib/widgets/list.js +0 -601
  870. package/external/blessed/lib/widgets/listbar.js +0 -413
  871. package/external/blessed/lib/widgets/listtable.js +0 -254
  872. package/external/blessed/lib/widgets/loading.js +0 -90
  873. package/external/blessed/lib/widgets/log.js +0 -85
  874. package/external/blessed/lib/widgets/message.js +0 -125
  875. package/external/blessed/lib/widgets/node.js +0 -284
  876. package/external/blessed/lib/widgets/overlayimage.js +0 -719
  877. package/external/blessed/lib/widgets/progressbar.js +0 -159
  878. package/external/blessed/lib/widgets/prompt.js +0 -122
  879. package/external/blessed/lib/widgets/question.js +0 -118
  880. package/external/blessed/lib/widgets/radiobutton.js +0 -63
  881. package/external/blessed/lib/widgets/radioset.js +0 -38
  882. package/external/blessed/lib/widgets/screen.js +0 -2300
  883. package/external/blessed/lib/widgets/scrollablebox.js +0 -391
  884. package/external/blessed/lib/widgets/scrollabletext.js +0 -37
  885. package/external/blessed/lib/widgets/table.js +0 -356
  886. package/external/blessed/lib/widgets/terminal.js +0 -414
  887. package/external/blessed/lib/widgets/text.js +0 -37
  888. package/external/blessed/lib/widgets/textarea.js +0 -344
  889. package/external/blessed/lib/widgets/textbox.js +0 -79
  890. package/external/blessed/lib/widgets/video.js +0 -128
  891. package/external/blessed/usr/fonts/AUTHORS +0 -1
  892. package/external/blessed/usr/fonts/LICENSE +0 -94
  893. package/external/blessed/usr/fonts/README +0 -340
  894. package/external/blessed/usr/fonts/ter-u14b.json +0 -17826
  895. package/external/blessed/usr/fonts/ter-u14n.json +0 -17826
  896. package/external/blessed/usr/linux +0 -0
  897. package/external/blessed/usr/windows-ansi +0 -0
  898. package/external/blessed/usr/xterm +0 -0
  899. package/external/blessed/usr/xterm-256color +0 -0
  900. package/external/blessed/usr/xterm.termcap +0 -243
  901. package/external/blessed/usr/xterm.terminfo +0 -1977
  902. package/external/blessed/vendor/tng.js +0 -1757
  903. package/external/blessed-contrib/LICENSE.md +0 -21
  904. package/external/blessed-contrib/lib/layout/grid.js +0 -409
  905. package/external/blessed-contrib/lib/widget/charts/bar.js +0 -8370
  906. package/external/blessed-contrib/lib/widget/charts/line.js +0 -17924
  907. package/external/blessed-contrib/lib/widget/table.js +0 -187
  908. package/shadow-bin/npm +0 -27
  909. package/shadow-bin/npx +0 -27
  910. package/shadow-bin/pnpm +0 -27
  911. package/shadow-bin/yarn +0 -27
  912. /package/{translations.json → data/alert-translations.json} +0 -0
  913. /package/{requirements.json → data/command-api-requirements.json} +0 -0
  914. /package/{dist → data}/socket-completion.bash +0 -0
@@ -1,2307 +0,0 @@
1
- 'use strict'
2
-
3
- const utils = {}
4
-
5
- let constants
6
- let hasRequiredConstants
7
- function requireConstants() {
8
- if (hasRequiredConstants) {
9
- return constants
10
- }
11
- hasRequiredConstants = 1
12
- const WIN_SLASH = '\\\\/'
13
- const WIN_NO_SLASH = `[^${WIN_SLASH}]`
14
-
15
- /**
16
- * Posix glob regex
17
- */
18
-
19
- const DOT_LITERAL = '\\.'
20
- const PLUS_LITERAL = '\\+'
21
- const QMARK_LITERAL = '\\?'
22
- const SLASH_LITERAL = '\\/'
23
- const ONE_CHAR = '(?=.)'
24
- const QMARK = '[^/]'
25
- const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`
26
- const START_ANCHOR = `(?:^|${SLASH_LITERAL})`
27
- const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`
28
- const NO_DOT = `(?!${DOT_LITERAL})`
29
- const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`
30
- const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`
31
- const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`
32
- const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`
33
- const STAR = `${QMARK}*?`
34
- const SEP = '/'
35
- const POSIX_CHARS = {
36
- DOT_LITERAL,
37
- PLUS_LITERAL,
38
- QMARK_LITERAL,
39
- SLASH_LITERAL,
40
- ONE_CHAR,
41
- QMARK,
42
- END_ANCHOR,
43
- DOTS_SLASH,
44
- NO_DOT,
45
- NO_DOTS,
46
- NO_DOT_SLASH,
47
- NO_DOTS_SLASH,
48
- QMARK_NO_DOT,
49
- STAR,
50
- START_ANCHOR,
51
- SEP
52
- }
53
-
54
- /**
55
- * Windows glob regex
56
- */
57
-
58
- const WINDOWS_CHARS = {
59
- ...POSIX_CHARS,
60
- SLASH_LITERAL: `[${WIN_SLASH}]`,
61
- QMARK: WIN_NO_SLASH,
62
- STAR: `${WIN_NO_SLASH}*?`,
63
- DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
64
- NO_DOT: `(?!${DOT_LITERAL})`,
65
- NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
66
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
67
- NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
68
- QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
69
- START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
70
- END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
71
- SEP: '\\'
72
- }
73
-
74
- /**
75
- * POSIX Bracket Regex
76
- */
77
-
78
- const POSIX_REGEX_SOURCE = {
79
- alnum: 'a-zA-Z0-9',
80
- alpha: 'a-zA-Z',
81
- ascii: '\\x00-\\x7F',
82
- blank: ' \\t',
83
- cntrl: '\\x00-\\x1F\\x7F',
84
- digit: '0-9',
85
- graph: '\\x21-\\x7E',
86
- lower: 'a-z',
87
- print: '\\x20-\\x7E ',
88
- punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
89
- space: ' \\t\\r\\n\\v\\f',
90
- upper: 'A-Z',
91
- word: 'A-Za-z0-9_',
92
- xdigit: 'A-Fa-f0-9'
93
- }
94
- constants = {
95
- MAX_LENGTH: 1024 * 64,
96
- POSIX_REGEX_SOURCE,
97
- // regular expressions
98
- REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
99
- REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
100
- REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
101
- REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
102
- REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
103
- REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
104
- // Replace globs with equivalent patterns to reduce parsing time.
105
- REPLACEMENTS: {
106
- __proto__: null,
107
- '***': '*',
108
- '**/**': '**',
109
- '**/**/**': '**'
110
- },
111
- // Digits
112
- CHAR_0: 48,
113
- /* 0 */
114
- CHAR_9: 57,
115
- /* 9 */
116
-
117
- // Alphabet chars.
118
- CHAR_UPPERCASE_A: 65,
119
- /* A */
120
- CHAR_LOWERCASE_A: 97,
121
- /* a */
122
- CHAR_UPPERCASE_Z: 90,
123
- /* Z */
124
- CHAR_LOWERCASE_Z: 122,
125
- /* z */
126
-
127
- CHAR_LEFT_PARENTHESES: 40,
128
- /* ( */
129
- CHAR_RIGHT_PARENTHESES: 41,
130
- /* ) */
131
-
132
- CHAR_ASTERISK: 42,
133
- /* * */
134
-
135
- // Non-alphabetic chars.
136
- CHAR_AMPERSAND: 38,
137
- /* & */
138
- CHAR_AT: 64,
139
- /* @ */
140
- CHAR_BACKWARD_SLASH: 92,
141
- /* \ */
142
- CHAR_CARRIAGE_RETURN: 13,
143
- /* \r */
144
- CHAR_CIRCUMFLEX_ACCENT: 94,
145
- /* ^ */
146
- CHAR_COLON: 58,
147
- /* : */
148
- CHAR_COMMA: 44,
149
- /* , */
150
- CHAR_DOT: 46,
151
- /* . */
152
- CHAR_DOUBLE_QUOTE: 34,
153
- /* " */
154
- CHAR_EQUAL: 61,
155
- /* = */
156
- CHAR_EXCLAMATION_MARK: 33,
157
- /* ! */
158
- CHAR_FORM_FEED: 12,
159
- /* \f */
160
- CHAR_FORWARD_SLASH: 47,
161
- /* / */
162
- CHAR_GRAVE_ACCENT: 96,
163
- /* ` */
164
- CHAR_HASH: 35,
165
- /* # */
166
- CHAR_HYPHEN_MINUS: 45,
167
- /* - */
168
- CHAR_LEFT_ANGLE_BRACKET: 60,
169
- /* < */
170
- CHAR_LEFT_CURLY_BRACE: 123,
171
- /* { */
172
- CHAR_LEFT_SQUARE_BRACKET: 91,
173
- /* [ */
174
- CHAR_LINE_FEED: 10,
175
- /* \n */
176
- CHAR_NO_BREAK_SPACE: 160,
177
- /* \u00A0 */
178
- CHAR_PERCENT: 37,
179
- /* % */
180
- CHAR_PLUS: 43,
181
- /* + */
182
- CHAR_QUESTION_MARK: 63,
183
- /* ? */
184
- CHAR_RIGHT_ANGLE_BRACKET: 62,
185
- /* > */
186
- CHAR_RIGHT_CURLY_BRACE: 125,
187
- /* } */
188
- CHAR_RIGHT_SQUARE_BRACKET: 93,
189
- /* ] */
190
- CHAR_SEMICOLON: 59,
191
- /* ; */
192
- CHAR_SINGLE_QUOTE: 39,
193
- /* ' */
194
- CHAR_SPACE: 32,
195
- /* */
196
- CHAR_TAB: 9,
197
- /* \t */
198
- CHAR_UNDERSCORE: 95,
199
- /* _ */
200
- CHAR_VERTICAL_LINE: 124,
201
- /* | */
202
- CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
203
- /* \uFEFF */
204
-
205
- /**
206
- * Create EXTGLOB_CHARS
207
- */
208
-
209
- extglobChars(chars) {
210
- return {
211
- '!': {
212
- type: 'negate',
213
- open: '(?:(?!(?:',
214
- close: `))${chars.STAR})`
215
- },
216
- '?': {
217
- type: 'qmark',
218
- open: '(?:',
219
- close: ')?'
220
- },
221
- '+': {
222
- type: 'plus',
223
- open: '(?:',
224
- close: ')+'
225
- },
226
- '*': {
227
- type: 'star',
228
- open: '(?:',
229
- close: ')*'
230
- },
231
- '@': {
232
- type: 'at',
233
- open: '(?:',
234
- close: ')'
235
- }
236
- }
237
- },
238
- /**
239
- * Create GLOB_CHARS
240
- */
241
-
242
- globChars(win32) {
243
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS
244
- }
245
- }
246
- return constants
247
- }
248
-
249
- /*global navigator*/
250
- let hasRequiredUtils
251
- function requireUtils() {
252
- if (hasRequiredUtils) {
253
- return utils
254
- }
255
- hasRequiredUtils = 1
256
- ;(function (exports) {
257
- const {
258
- REGEX_BACKSLASH,
259
- REGEX_REMOVE_BACKSLASH,
260
- REGEX_SPECIAL_CHARS,
261
- REGEX_SPECIAL_CHARS_GLOBAL
262
- } = /*@__PURE__*/ requireConstants()
263
- exports.isObject = val =>
264
- val !== null && typeof val === 'object' && !Array.isArray(val)
265
- exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str)
266
- exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str)
267
- exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1')
268
- exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/')
269
- exports.isWindows = () => {
270
- if (typeof navigator !== 'undefined' && navigator.platform) {
271
- const platform = navigator.platform.toLowerCase()
272
- return platform === 'win32' || platform === 'windows'
273
- }
274
- if (typeof process !== 'undefined' && process.platform) {
275
- return process.platform === 'win32'
276
- }
277
- return false
278
- }
279
- exports.removeBackslashes = str => {
280
- return str.replace(REGEX_REMOVE_BACKSLASH, match => {
281
- return match === '\\' ? '' : match
282
- })
283
- }
284
- exports.escapeLast = (input, char, lastIdx) => {
285
- const idx = input.lastIndexOf(char, lastIdx)
286
- if (idx === -1) {
287
- return input
288
- }
289
- if (input[idx - 1] === '\\') {
290
- return exports.escapeLast(input, char, idx - 1)
291
- }
292
- return `${input.slice(0, idx)}\\${input.slice(idx)}`
293
- }
294
- exports.removePrefix = (input, state = {}) => {
295
- let output = input
296
- if (output.startsWith('./')) {
297
- output = output.slice(2)
298
- state.prefix = './'
299
- }
300
- return output
301
- }
302
- exports.wrapOutput = (input, state = {}, options = {}) => {
303
- const prepend = options.contains ? '' : '^'
304
- const append = options.contains ? '' : '$'
305
- let output = `${prepend}(?:${input})${append}`
306
- if (state.negated === true) {
307
- output = `(?:^(?!${output}).*$)`
308
- }
309
- return output
310
- }
311
- exports.basename = (path, { windows } = {}) => {
312
- const segs = path.split(windows ? /[\\/]/ : '/')
313
- const last = segs[segs.length - 1]
314
- if (last === '') {
315
- return segs[segs.length - 2]
316
- }
317
- return last
318
- }
319
- })(utils)
320
- return utils
321
- }
322
-
323
- let scan_1
324
- let hasRequiredScan
325
- function requireScan() {
326
- if (hasRequiredScan) {
327
- return scan_1
328
- }
329
- hasRequiredScan = 1
330
- const utils = /*@__PURE__*/ requireUtils()
331
- const {
332
- CHAR_ASTERISK,
333
- /* * */
334
- CHAR_AT,
335
- /* @ */
336
- CHAR_BACKWARD_SLASH,
337
- /* \ */
338
- CHAR_COMMA,
339
- /* , */
340
- CHAR_DOT,
341
- /* . */
342
- CHAR_EXCLAMATION_MARK,
343
- /* ! */
344
- CHAR_FORWARD_SLASH,
345
- /* / */
346
- CHAR_LEFT_CURLY_BRACE,
347
- /* { */
348
- CHAR_LEFT_PARENTHESES,
349
- /* ( */
350
- CHAR_LEFT_SQUARE_BRACKET,
351
- /* [ */
352
- CHAR_PLUS,
353
- /* + */
354
- CHAR_QUESTION_MARK,
355
- /* ? */
356
- CHAR_RIGHT_CURLY_BRACE,
357
- /* } */
358
- CHAR_RIGHT_PARENTHESES,
359
- /* ) */
360
- CHAR_RIGHT_SQUARE_BRACKET /* ] */
361
- } = /*@__PURE__*/ requireConstants()
362
- const isPathSeparator = code => {
363
- return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH
364
- }
365
- const depth = token => {
366
- if (token.isPrefix !== true) {
367
- token.depth = token.isGlobstar ? Infinity : 1
368
- }
369
- }
370
-
371
- /**
372
- * Quickly scans a glob pattern and returns an object with a handful of
373
- * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
374
- * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
375
- * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
376
- *
377
- * ```js
378
- * const pm = require('picomatch');
379
- * console.log(pm.scan('foo/bar/*.js'));
380
- * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
381
- * ```
382
- * @param {String} `str`
383
- * @param {Object} `options`
384
- * @return {Object} Returns an object with tokens and regex source string.
385
- * @api public
386
- */
387
-
388
- const scan = (input, options) => {
389
- const opts = options || {}
390
- const length = input.length - 1
391
- const scanToEnd = opts.parts === true || opts.scanToEnd === true
392
- const slashes = []
393
- const tokens = []
394
- const parts = []
395
- let str = input
396
- let index = -1
397
- let start = 0
398
- let lastIndex = 0
399
- let isBrace = false
400
- let isBracket = false
401
- let isGlob = false
402
- let isExtglob = false
403
- let isGlobstar = false
404
- let braceEscaped = false
405
- let backslashes = false
406
- let negated = false
407
- let negatedExtglob = false
408
- let finished = false
409
- let braces = 0
410
- let prev
411
- let code
412
- let token = {
413
- value: '',
414
- depth: 0,
415
- isGlob: false
416
- }
417
- const eos = () => index >= length
418
- const peek = () => str.charCodeAt(index + 1)
419
- const advance = () => {
420
- prev = code
421
- return str.charCodeAt(++index)
422
- }
423
- while (index < length) {
424
- code = advance()
425
- let next
426
- if (code === CHAR_BACKWARD_SLASH) {
427
- backslashes = token.backslashes = true
428
- code = advance()
429
- if (code === CHAR_LEFT_CURLY_BRACE) {
430
- braceEscaped = true
431
- }
432
- continue
433
- }
434
- if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
435
- braces++
436
- while (eos() !== true && (code = advance())) {
437
- if (code === CHAR_BACKWARD_SLASH) {
438
- backslashes = token.backslashes = true
439
- advance()
440
- continue
441
- }
442
- if (code === CHAR_LEFT_CURLY_BRACE) {
443
- braces++
444
- continue
445
- }
446
- if (
447
- braceEscaped !== true &&
448
- code === CHAR_DOT &&
449
- (code = advance()) === CHAR_DOT
450
- ) {
451
- isBrace = token.isBrace = true
452
- isGlob = token.isGlob = true
453
- finished = true
454
- if (scanToEnd === true) {
455
- continue
456
- }
457
- break
458
- }
459
- if (braceEscaped !== true && code === CHAR_COMMA) {
460
- isBrace = token.isBrace = true
461
- isGlob = token.isGlob = true
462
- finished = true
463
- if (scanToEnd === true) {
464
- continue
465
- }
466
- break
467
- }
468
- if (code === CHAR_RIGHT_CURLY_BRACE) {
469
- braces--
470
- if (braces === 0) {
471
- braceEscaped = false
472
- isBrace = token.isBrace = true
473
- finished = true
474
- break
475
- }
476
- }
477
- }
478
- if (scanToEnd === true) {
479
- continue
480
- }
481
- break
482
- }
483
- if (code === CHAR_FORWARD_SLASH) {
484
- slashes.push(index)
485
- tokens.push(token)
486
- token = {
487
- value: '',
488
- depth: 0,
489
- isGlob: false
490
- }
491
- if (finished === true) {
492
- continue
493
- }
494
- if (prev === CHAR_DOT && index === start + 1) {
495
- start += 2
496
- continue
497
- }
498
- lastIndex = index + 1
499
- continue
500
- }
501
- if (opts.noext !== true) {
502
- const isExtglobChar =
503
- code === CHAR_PLUS ||
504
- code === CHAR_AT ||
505
- code === CHAR_ASTERISK ||
506
- code === CHAR_QUESTION_MARK ||
507
- code === CHAR_EXCLAMATION_MARK
508
- if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
509
- isGlob = token.isGlob = true
510
- isExtglob = token.isExtglob = true
511
- finished = true
512
- if (code === CHAR_EXCLAMATION_MARK && index === start) {
513
- negatedExtglob = true
514
- }
515
- if (scanToEnd === true) {
516
- while (eos() !== true && (code = advance())) {
517
- if (code === CHAR_BACKWARD_SLASH) {
518
- backslashes = token.backslashes = true
519
- code = advance()
520
- continue
521
- }
522
- if (code === CHAR_RIGHT_PARENTHESES) {
523
- isGlob = token.isGlob = true
524
- finished = true
525
- break
526
- }
527
- }
528
- continue
529
- }
530
- break
531
- }
532
- }
533
- if (code === CHAR_ASTERISK) {
534
- if (prev === CHAR_ASTERISK) {
535
- isGlobstar = token.isGlobstar = true
536
- }
537
- isGlob = token.isGlob = true
538
- finished = true
539
- if (scanToEnd === true) {
540
- continue
541
- }
542
- break
543
- }
544
- if (code === CHAR_QUESTION_MARK) {
545
- isGlob = token.isGlob = true
546
- finished = true
547
- if (scanToEnd === true) {
548
- continue
549
- }
550
- break
551
- }
552
- if (code === CHAR_LEFT_SQUARE_BRACKET) {
553
- while (eos() !== true && (next = advance())) {
554
- if (next === CHAR_BACKWARD_SLASH) {
555
- backslashes = token.backslashes = true
556
- advance()
557
- continue
558
- }
559
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
560
- isBracket = token.isBracket = true
561
- isGlob = token.isGlob = true
562
- finished = true
563
- break
564
- }
565
- }
566
- if (scanToEnd === true) {
567
- continue
568
- }
569
- break
570
- }
571
- if (
572
- opts.nonegate !== true &&
573
- code === CHAR_EXCLAMATION_MARK &&
574
- index === start
575
- ) {
576
- negated = token.negated = true
577
- start++
578
- continue
579
- }
580
- if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
581
- isGlob = token.isGlob = true
582
- if (scanToEnd === true) {
583
- while (eos() !== true && (code = advance())) {
584
- if (code === CHAR_LEFT_PARENTHESES) {
585
- backslashes = token.backslashes = true
586
- code = advance()
587
- continue
588
- }
589
- if (code === CHAR_RIGHT_PARENTHESES) {
590
- finished = true
591
- break
592
- }
593
- }
594
- continue
595
- }
596
- break
597
- }
598
- if (isGlob === true) {
599
- finished = true
600
- if (scanToEnd === true) {
601
- continue
602
- }
603
- break
604
- }
605
- }
606
- if (opts.noext === true) {
607
- isExtglob = false
608
- isGlob = false
609
- }
610
- let base = str
611
- let prefix = ''
612
- let glob = ''
613
- if (start > 0) {
614
- prefix = str.slice(0, start)
615
- str = str.slice(start)
616
- lastIndex -= start
617
- }
618
- if (base && isGlob === true && lastIndex > 0) {
619
- base = str.slice(0, lastIndex)
620
- glob = str.slice(lastIndex)
621
- } else if (isGlob === true) {
622
- base = ''
623
- glob = str
624
- } else {
625
- base = str
626
- }
627
- if (base && base !== '' && base !== '/' && base !== str) {
628
- if (isPathSeparator(base.charCodeAt(base.length - 1))) {
629
- base = base.slice(0, -1)
630
- }
631
- }
632
- if (opts.unescape === true) {
633
- if (glob) {
634
- glob = utils.removeBackslashes(glob)
635
- }
636
- if (base && backslashes === true) {
637
- base = utils.removeBackslashes(base)
638
- }
639
- }
640
- const state = {
641
- prefix,
642
- input,
643
- start,
644
- base,
645
- glob,
646
- isBrace,
647
- isBracket,
648
- isGlob,
649
- isExtglob,
650
- isGlobstar,
651
- negated,
652
- negatedExtglob
653
- }
654
- if (opts.tokens === true) {
655
- state.maxDepth = 0
656
- if (!isPathSeparator(code)) {
657
- tokens.push(token)
658
- }
659
- state.tokens = tokens
660
- }
661
- if (opts.parts === true || opts.tokens === true) {
662
- let prevIndex
663
- for (let idx = 0; idx < slashes.length; idx++) {
664
- const n = prevIndex ? prevIndex + 1 : start
665
- const i = slashes[idx]
666
- const value = input.slice(n, i)
667
- if (opts.tokens) {
668
- if (idx === 0 && start !== 0) {
669
- tokens[idx].isPrefix = true
670
- tokens[idx].value = prefix
671
- } else {
672
- tokens[idx].value = value
673
- }
674
- depth(tokens[idx])
675
- state.maxDepth += tokens[idx].depth
676
- }
677
- if (idx !== 0 || value !== '') {
678
- parts.push(value)
679
- }
680
- prevIndex = i
681
- }
682
- if (prevIndex && prevIndex + 1 < input.length) {
683
- const value = input.slice(prevIndex + 1)
684
- parts.push(value)
685
- if (opts.tokens) {
686
- tokens[tokens.length - 1].value = value
687
- depth(tokens[tokens.length - 1])
688
- state.maxDepth += tokens[tokens.length - 1].depth
689
- }
690
- }
691
- state.slashes = slashes
692
- state.parts = parts
693
- }
694
- return state
695
- }
696
- scan_1 = scan
697
- return scan_1
698
- }
699
-
700
- let parse_1
701
- let hasRequiredParse
702
- function requireParse() {
703
- if (hasRequiredParse) {
704
- return parse_1
705
- }
706
- hasRequiredParse = 1
707
- const constants = /*@__PURE__*/ requireConstants()
708
- const utils = /*@__PURE__*/ requireUtils()
709
-
710
- /**
711
- * Constants
712
- */
713
-
714
- const {
715
- MAX_LENGTH,
716
- POSIX_REGEX_SOURCE,
717
- REGEX_NON_SPECIAL_CHARS,
718
- REGEX_SPECIAL_CHARS_BACKREF,
719
- REPLACEMENTS
720
- } = constants
721
-
722
- /**
723
- * Helpers
724
- */
725
-
726
- const expandRange = (args, options) => {
727
- if (typeof options.expandRange === 'function') {
728
- return options.expandRange(...args, options)
729
- }
730
- args.sort()
731
- const value = `[${args.join('-')}]`
732
- try {
733
- /* eslint-disable-next-line no-new */
734
- new RegExp(value)
735
- } catch (ex) {
736
- return args.map(v => utils.escapeRegex(v)).join('..')
737
- }
738
- return value
739
- }
740
-
741
- /**
742
- * Create the message for a syntax error
743
- */
744
-
745
- const syntaxError = (type, char) => {
746
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`
747
- }
748
-
749
- /**
750
- * Parse the given input string.
751
- * @param {String} input
752
- * @param {Object} options
753
- * @return {Object}
754
- */
755
-
756
- const parse = (input, options) => {
757
- if (typeof input !== 'string') {
758
- throw new TypeError('Expected a string')
759
- }
760
- input = REPLACEMENTS[input] || input
761
- const opts = {
762
- ...options
763
- }
764
- const max =
765
- typeof opts.maxLength === 'number'
766
- ? Math.min(MAX_LENGTH, opts.maxLength)
767
- : MAX_LENGTH
768
- let len = input.length
769
- if (len > max) {
770
- throw new SyntaxError(
771
- `Input length: ${len}, exceeds maximum allowed length: ${max}`
772
- )
773
- }
774
- const bos = {
775
- type: 'bos',
776
- value: '',
777
- output: opts.prepend || ''
778
- }
779
- const tokens = [bos]
780
- const capture = opts.capture ? '' : '?:'
781
-
782
- // create constants based on platform, for windows or posix
783
- const PLATFORM_CHARS = constants.globChars(opts.windows)
784
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS)
785
- const {
786
- DOT_LITERAL,
787
- PLUS_LITERAL,
788
- SLASH_LITERAL,
789
- ONE_CHAR,
790
- DOTS_SLASH,
791
- NO_DOT,
792
- NO_DOT_SLASH,
793
- NO_DOTS_SLASH,
794
- QMARK,
795
- QMARK_NO_DOT,
796
- STAR,
797
- START_ANCHOR
798
- } = PLATFORM_CHARS
799
- const globstar = opts => {
800
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`
801
- }
802
- const nodot = opts.dot ? '' : NO_DOT
803
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT
804
- let star = opts.bash === true ? globstar(opts) : STAR
805
- if (opts.capture) {
806
- star = `(${star})`
807
- }
808
-
809
- // minimatch options support
810
- if (typeof opts.noext === 'boolean') {
811
- opts.noextglob = opts.noext
812
- }
813
- const state = {
814
- input,
815
- index: -1,
816
- start: 0,
817
- dot: opts.dot === true,
818
- consumed: '',
819
- output: '',
820
- prefix: '',
821
- backtrack: false,
822
- negated: false,
823
- brackets: 0,
824
- braces: 0,
825
- parens: 0,
826
- quotes: 0,
827
- globstar: false,
828
- tokens
829
- }
830
- input = utils.removePrefix(input, state)
831
- len = input.length
832
- const extglobs = []
833
- const braces = []
834
- const stack = []
835
- let prev = bos
836
- let value
837
-
838
- /**
839
- * Tokenizing helpers
840
- */
841
-
842
- const eos = () => state.index === len - 1
843
- const peek = (state.peek = (n = 1) => input[state.index + n])
844
- const advance = (state.advance = () => input[++state.index] || '')
845
- const remaining = () => input.slice(state.index + 1)
846
- const consume = (value = '', num = 0) => {
847
- state.consumed += value
848
- state.index += num
849
- }
850
- const append = token => {
851
- state.output += token.output != null ? token.output : token.value
852
- consume(token.value)
853
- }
854
- const negate = () => {
855
- let count = 1
856
- while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
857
- advance()
858
- state.start++
859
- count++
860
- }
861
- if (count % 2 === 0) {
862
- return false
863
- }
864
- state.negated = true
865
- state.start++
866
- return true
867
- }
868
- const increment = type => {
869
- state[type]++
870
- stack.push(type)
871
- }
872
- const decrement = type => {
873
- state[type]--
874
- stack.pop()
875
- }
876
-
877
- /**
878
- * Push tokens onto the tokens array. This helper speeds up
879
- * tokenizing by 1) helping us avoid backtracking as much as possible,
880
- * and 2) helping us avoid creating extra tokens when consecutive
881
- * characters are plain text. This improves performance and simplifies
882
- * lookbehinds.
883
- */
884
-
885
- const push = tok => {
886
- if (prev.type === 'globstar') {
887
- const isBrace =
888
- state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace')
889
- const isExtglob =
890
- tok.extglob === true ||
891
- (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'))
892
- if (
893
- tok.type !== 'slash' &&
894
- tok.type !== 'paren' &&
895
- !isBrace &&
896
- !isExtglob
897
- ) {
898
- state.output = state.output.slice(0, -prev.output.length)
899
- prev.type = 'star'
900
- prev.value = '*'
901
- prev.output = star
902
- state.output += prev.output
903
- }
904
- }
905
- if (extglobs.length && tok.type !== 'paren') {
906
- extglobs[extglobs.length - 1].inner += tok.value
907
- }
908
- if (tok.value || tok.output) {
909
- append(tok)
910
- }
911
- if (prev && prev.type === 'text' && tok.type === 'text') {
912
- prev.output = (prev.output || prev.value) + tok.value
913
- prev.value += tok.value
914
- return
915
- }
916
- tok.prev = prev
917
- tokens.push(tok)
918
- prev = tok
919
- }
920
- const extglobOpen = (type, value) => {
921
- const token = {
922
- ...EXTGLOB_CHARS[value],
923
- conditions: 1,
924
- inner: ''
925
- }
926
- token.prev = prev
927
- token.parens = state.parens
928
- token.output = state.output
929
- const output = (opts.capture ? '(' : '') + token.open
930
- increment('parens')
931
- push({
932
- type,
933
- value,
934
- output: state.output ? '' : ONE_CHAR
935
- })
936
- push({
937
- type: 'paren',
938
- extglob: true,
939
- value: advance(),
940
- output
941
- })
942
- extglobs.push(token)
943
- }
944
- const extglobClose = token => {
945
- let output = token.close + (opts.capture ? ')' : '')
946
- let rest
947
- if (token.type === 'negate') {
948
- let extglobStar = star
949
- if (
950
- token.inner &&
951
- token.inner.length > 1 &&
952
- token.inner.includes('/')
953
- ) {
954
- extglobStar = globstar(opts)
955
- }
956
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
957
- output = token.close = `)$))${extglobStar}`
958
- }
959
- if (
960
- token.inner.includes('*') &&
961
- (rest = remaining()) &&
962
- /^\.[^\\/.]+$/.test(rest)
963
- ) {
964
- // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
965
- // In this case, we need to parse the string and use it in the output of the original pattern.
966
- // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
967
- //
968
- // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
969
- const expression = parse(rest, {
970
- ...options,
971
- fastpaths: false
972
- }).output
973
- output = token.close = `)${expression})${extglobStar})`
974
- }
975
- if (token.prev.type === 'bos') {
976
- state.negatedExtglob = true
977
- }
978
- }
979
- push({
980
- type: 'paren',
981
- extglob: true,
982
- value,
983
- output
984
- })
985
- decrement('parens')
986
- }
987
-
988
- /**
989
- * Fast paths
990
- */
991
-
992
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
993
- let backslashes = false
994
- let output = input.replace(
995
- REGEX_SPECIAL_CHARS_BACKREF,
996
- (m, esc, chars, first, rest, index) => {
997
- if (first === '\\') {
998
- backslashes = true
999
- return m
1000
- }
1001
- if (first === '?') {
1002
- if (esc) {
1003
- return esc + first + (rest ? QMARK.repeat(rest.length) : '')
1004
- }
1005
- if (index === 0) {
1006
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '')
1007
- }
1008
- return QMARK.repeat(chars.length)
1009
- }
1010
- if (first === '.') {
1011
- return DOT_LITERAL.repeat(chars.length)
1012
- }
1013
- if (first === '*') {
1014
- if (esc) {
1015
- return esc + first + (rest ? star : '')
1016
- }
1017
- return star
1018
- }
1019
- return esc ? m : `\\${m}`
1020
- }
1021
- )
1022
- if (backslashes === true) {
1023
- if (opts.unescape === true) {
1024
- output = output.replace(/\\/g, '')
1025
- } else {
1026
- output = output.replace(/\\+/g, m => {
1027
- return m.length % 2 === 0 ? '\\\\' : m ? '\\' : ''
1028
- })
1029
- }
1030
- }
1031
- if (output === input && opts.contains === true) {
1032
- state.output = input
1033
- return state
1034
- }
1035
- state.output = utils.wrapOutput(output, state, options)
1036
- return state
1037
- }
1038
-
1039
- /**
1040
- * Tokenize input until we reach end-of-string
1041
- */
1042
-
1043
- while (!eos()) {
1044
- value = advance()
1045
- if (value === '\u0000') {
1046
- continue
1047
- }
1048
-
1049
- /**
1050
- * Escaped characters
1051
- */
1052
-
1053
- if (value === '\\') {
1054
- const next = peek()
1055
- if (next === '/' && opts.bash !== true) {
1056
- continue
1057
- }
1058
- if (next === '.' || next === ';') {
1059
- continue
1060
- }
1061
- if (!next) {
1062
- value += '\\'
1063
- push({
1064
- type: 'text',
1065
- value
1066
- })
1067
- continue
1068
- }
1069
-
1070
- // collapse slashes to reduce potential for exploits
1071
- const match = /^\\+/.exec(remaining())
1072
- let slashes = 0
1073
- if (match && match[0].length > 2) {
1074
- slashes = match[0].length
1075
- state.index += slashes
1076
- if (slashes % 2 !== 0) {
1077
- value += '\\'
1078
- }
1079
- }
1080
- if (opts.unescape === true) {
1081
- value = advance()
1082
- } else {
1083
- value += advance()
1084
- }
1085
- if (state.brackets === 0) {
1086
- push({
1087
- type: 'text',
1088
- value
1089
- })
1090
- continue
1091
- }
1092
- }
1093
-
1094
- /**
1095
- * If we're inside a regex character class, continue
1096
- * until we reach the closing bracket.
1097
- */
1098
-
1099
- if (
1100
- state.brackets > 0 &&
1101
- (value !== ']' || prev.value === '[' || prev.value === '[^')
1102
- ) {
1103
- if (opts.posix !== false && value === ':') {
1104
- const inner = new Set(prev.value.slice(1))
1105
- if (inner.has('[')) {
1106
- prev.posix = true
1107
- if (inner.has(':')) {
1108
- const idx = prev.value.lastIndexOf('[')
1109
- const pre = prev.value.slice(0, idx)
1110
- const rest = prev.value.slice(idx + 2)
1111
- const posix = POSIX_REGEX_SOURCE[rest]
1112
- if (posix) {
1113
- prev.value = pre + posix
1114
- state.backtrack = true
1115
- advance()
1116
- if (!bos.output && tokens.indexOf(prev) === 1) {
1117
- bos.output = ONE_CHAR
1118
- }
1119
- continue
1120
- }
1121
- }
1122
- }
1123
- }
1124
- if (
1125
- (value === '[' && peek() !== ':') ||
1126
- (value === '-' && peek() === ']')
1127
- ) {
1128
- value = `\\${value}`
1129
- }
1130
- if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
1131
- value = `\\${value}`
1132
- }
1133
- if (opts.posix === true && value === '!' && prev.value === '[') {
1134
- value = '^'
1135
- }
1136
- prev.value += value
1137
- append({
1138
- value
1139
- })
1140
- continue
1141
- }
1142
-
1143
- /**
1144
- * If we're inside a quoted string, continue
1145
- * until we reach the closing double quote.
1146
- */
1147
-
1148
- if (state.quotes === 1 && value !== '"') {
1149
- value = utils.escapeRegex(value)
1150
- prev.value += value
1151
- append({
1152
- value
1153
- })
1154
- continue
1155
- }
1156
-
1157
- /**
1158
- * Double quotes
1159
- */
1160
-
1161
- if (value === '"') {
1162
- state.quotes = state.quotes === 1 ? 0 : 1
1163
- if (opts.keepQuotes === true) {
1164
- push({
1165
- type: 'text',
1166
- value
1167
- })
1168
- }
1169
- continue
1170
- }
1171
-
1172
- /**
1173
- * Parentheses
1174
- */
1175
-
1176
- if (value === '(') {
1177
- increment('parens')
1178
- push({
1179
- type: 'paren',
1180
- value
1181
- })
1182
- continue
1183
- }
1184
- if (value === ')') {
1185
- if (state.parens === 0 && opts.strictBrackets === true) {
1186
- throw new SyntaxError(syntaxError('opening', '('))
1187
- }
1188
- const extglob = extglobs[extglobs.length - 1]
1189
- if (extglob && state.parens === extglob.parens + 1) {
1190
- extglobClose(extglobs.pop())
1191
- continue
1192
- }
1193
- push({
1194
- type: 'paren',
1195
- value,
1196
- output: state.parens ? ')' : '\\)'
1197
- })
1198
- decrement('parens')
1199
- continue
1200
- }
1201
-
1202
- /**
1203
- * Square brackets
1204
- */
1205
-
1206
- if (value === '[') {
1207
- if (opts.nobracket === true || !remaining().includes(']')) {
1208
- if (opts.nobracket !== true && opts.strictBrackets === true) {
1209
- throw new SyntaxError(syntaxError('closing', ']'))
1210
- }
1211
- value = `\\${value}`
1212
- } else {
1213
- increment('brackets')
1214
- }
1215
- push({
1216
- type: 'bracket',
1217
- value
1218
- })
1219
- continue
1220
- }
1221
- if (value === ']') {
1222
- if (
1223
- opts.nobracket === true ||
1224
- (prev && prev.type === 'bracket' && prev.value.length === 1)
1225
- ) {
1226
- push({
1227
- type: 'text',
1228
- value,
1229
- output: `\\${value}`
1230
- })
1231
- continue
1232
- }
1233
- if (state.brackets === 0) {
1234
- if (opts.strictBrackets === true) {
1235
- throw new SyntaxError(syntaxError('opening', '['))
1236
- }
1237
- push({
1238
- type: 'text',
1239
- value,
1240
- output: `\\${value}`
1241
- })
1242
- continue
1243
- }
1244
- decrement('brackets')
1245
- const prevValue = prev.value.slice(1)
1246
- if (
1247
- prev.posix !== true &&
1248
- prevValue[0] === '^' &&
1249
- !prevValue.includes('/')
1250
- ) {
1251
- value = `/${value}`
1252
- }
1253
- prev.value += value
1254
- append({
1255
- value
1256
- })
1257
-
1258
- // when literal brackets are explicitly disabled
1259
- // assume we should match with a regex character class
1260
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
1261
- continue
1262
- }
1263
- const escaped = utils.escapeRegex(prev.value)
1264
- state.output = state.output.slice(0, -prev.value.length)
1265
-
1266
- // when literal brackets are explicitly enabled
1267
- // assume we should escape the brackets to match literal characters
1268
- if (opts.literalBrackets === true) {
1269
- state.output += escaped
1270
- prev.value = escaped
1271
- continue
1272
- }
1273
-
1274
- // when the user specifies nothing, try to match both
1275
- prev.value = `(${capture}${escaped}|${prev.value})`
1276
- state.output += prev.value
1277
- continue
1278
- }
1279
-
1280
- /**
1281
- * Braces
1282
- */
1283
-
1284
- if (value === '{' && opts.nobrace !== true) {
1285
- increment('braces')
1286
- const open = {
1287
- type: 'brace',
1288
- value,
1289
- output: '(',
1290
- outputIndex: state.output.length,
1291
- tokensIndex: state.tokens.length
1292
- }
1293
- braces.push(open)
1294
- push(open)
1295
- continue
1296
- }
1297
- if (value === '}') {
1298
- const brace = braces[braces.length - 1]
1299
- if (opts.nobrace === true || !brace) {
1300
- push({
1301
- type: 'text',
1302
- value,
1303
- output: value
1304
- })
1305
- continue
1306
- }
1307
- let output = ')'
1308
- if (brace.dots === true) {
1309
- const arr = tokens.slice()
1310
- const range = []
1311
- for (let i = arr.length - 1; i >= 0; i--) {
1312
- tokens.pop()
1313
- if (arr[i].type === 'brace') {
1314
- break
1315
- }
1316
- if (arr[i].type !== 'dots') {
1317
- range.unshift(arr[i].value)
1318
- }
1319
- }
1320
- output = expandRange(range, opts)
1321
- state.backtrack = true
1322
- }
1323
- if (brace.comma !== true && brace.dots !== true) {
1324
- const out = state.output.slice(0, brace.outputIndex)
1325
- const toks = state.tokens.slice(brace.tokensIndex)
1326
- brace.value = brace.output = '\\{'
1327
- value = output = '\\}'
1328
- state.output = out
1329
- for (const t of toks) {
1330
- state.output += t.output || t.value
1331
- }
1332
- }
1333
- push({
1334
- type: 'brace',
1335
- value,
1336
- output
1337
- })
1338
- decrement('braces')
1339
- braces.pop()
1340
- continue
1341
- }
1342
-
1343
- /**
1344
- * Pipes
1345
- */
1346
-
1347
- if (value === '|') {
1348
- if (extglobs.length > 0) {
1349
- extglobs[extglobs.length - 1].conditions++
1350
- }
1351
- push({
1352
- type: 'text',
1353
- value
1354
- })
1355
- continue
1356
- }
1357
-
1358
- /**
1359
- * Commas
1360
- */
1361
-
1362
- if (value === ',') {
1363
- let output = value
1364
- const brace = braces[braces.length - 1]
1365
- if (brace && stack[stack.length - 1] === 'braces') {
1366
- brace.comma = true
1367
- output = '|'
1368
- }
1369
- push({
1370
- type: 'comma',
1371
- value,
1372
- output
1373
- })
1374
- continue
1375
- }
1376
-
1377
- /**
1378
- * Slashes
1379
- */
1380
-
1381
- if (value === '/') {
1382
- // if the beginning of the glob is "./", advance the start
1383
- // to the current index, and don't add the "./" characters
1384
- // to the state. This greatly simplifies lookbehinds when
1385
- // checking for BOS characters like "!" and "." (not "./")
1386
- if (prev.type === 'dot' && state.index === state.start + 1) {
1387
- state.start = state.index + 1
1388
- state.consumed = ''
1389
- state.output = ''
1390
- tokens.pop()
1391
- prev = bos // reset "prev" to the first token
1392
- continue
1393
- }
1394
- push({
1395
- type: 'slash',
1396
- value,
1397
- output: SLASH_LITERAL
1398
- })
1399
- continue
1400
- }
1401
-
1402
- /**
1403
- * Dots
1404
- */
1405
-
1406
- if (value === '.') {
1407
- if (state.braces > 0 && prev.type === 'dot') {
1408
- if (prev.value === '.') {
1409
- prev.output = DOT_LITERAL
1410
- }
1411
- const brace = braces[braces.length - 1]
1412
- prev.type = 'dots'
1413
- prev.output += value
1414
- prev.value += value
1415
- brace.dots = true
1416
- continue
1417
- }
1418
- if (
1419
- state.braces + state.parens === 0 &&
1420
- prev.type !== 'bos' &&
1421
- prev.type !== 'slash'
1422
- ) {
1423
- push({
1424
- type: 'text',
1425
- value,
1426
- output: DOT_LITERAL
1427
- })
1428
- continue
1429
- }
1430
- push({
1431
- type: 'dot',
1432
- value,
1433
- output: DOT_LITERAL
1434
- })
1435
- continue
1436
- }
1437
-
1438
- /**
1439
- * Question marks
1440
- */
1441
-
1442
- if (value === '?') {
1443
- const isGroup = prev && prev.value === '('
1444
- if (
1445
- !isGroup &&
1446
- opts.noextglob !== true &&
1447
- peek() === '(' &&
1448
- peek(2) !== '?'
1449
- ) {
1450
- extglobOpen('qmark', value)
1451
- continue
1452
- }
1453
- if (prev && prev.type === 'paren') {
1454
- const next = peek()
1455
- let output = value
1456
- if (
1457
- (prev.value === '(' && !/[!=<:]/.test(next)) ||
1458
- (next === '<' && !/<([!=]|\w+>)/.test(remaining()))
1459
- ) {
1460
- output = `\\${value}`
1461
- }
1462
- push({
1463
- type: 'text',
1464
- value,
1465
- output
1466
- })
1467
- continue
1468
- }
1469
- if (
1470
- opts.dot !== true &&
1471
- (prev.type === 'slash' || prev.type === 'bos')
1472
- ) {
1473
- push({
1474
- type: 'qmark',
1475
- value,
1476
- output: QMARK_NO_DOT
1477
- })
1478
- continue
1479
- }
1480
- push({
1481
- type: 'qmark',
1482
- value,
1483
- output: QMARK
1484
- })
1485
- continue
1486
- }
1487
-
1488
- /**
1489
- * Exclamation
1490
- */
1491
-
1492
- if (value === '!') {
1493
- if (opts.noextglob !== true && peek() === '(') {
1494
- if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
1495
- extglobOpen('negate', value)
1496
- continue
1497
- }
1498
- }
1499
- if (opts.nonegate !== true && state.index === 0) {
1500
- negate()
1501
- continue
1502
- }
1503
- }
1504
-
1505
- /**
1506
- * Plus
1507
- */
1508
-
1509
- if (value === '+') {
1510
- if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
1511
- extglobOpen('plus', value)
1512
- continue
1513
- }
1514
- if ((prev && prev.value === '(') || opts.regex === false) {
1515
- push({
1516
- type: 'plus',
1517
- value,
1518
- output: PLUS_LITERAL
1519
- })
1520
- continue
1521
- }
1522
- if (
1523
- (prev &&
1524
- (prev.type === 'bracket' ||
1525
- prev.type === 'paren' ||
1526
- prev.type === 'brace')) ||
1527
- state.parens > 0
1528
- ) {
1529
- push({
1530
- type: 'plus',
1531
- value
1532
- })
1533
- continue
1534
- }
1535
- push({
1536
- type: 'plus',
1537
- value: PLUS_LITERAL
1538
- })
1539
- continue
1540
- }
1541
-
1542
- /**
1543
- * Plain text
1544
- */
1545
-
1546
- if (value === '@') {
1547
- if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
1548
- push({
1549
- type: 'at',
1550
- extglob: true,
1551
- value,
1552
- output: ''
1553
- })
1554
- continue
1555
- }
1556
- push({
1557
- type: 'text',
1558
- value
1559
- })
1560
- continue
1561
- }
1562
-
1563
- /**
1564
- * Plain text
1565
- */
1566
-
1567
- if (value !== '*') {
1568
- if (value === '$' || value === '^') {
1569
- value = `\\${value}`
1570
- }
1571
- const match = REGEX_NON_SPECIAL_CHARS.exec(remaining())
1572
- if (match) {
1573
- value += match[0]
1574
- state.index += match[0].length
1575
- }
1576
- push({
1577
- type: 'text',
1578
- value
1579
- })
1580
- continue
1581
- }
1582
-
1583
- /**
1584
- * Stars
1585
- */
1586
-
1587
- if (prev && (prev.type === 'globstar' || prev.star === true)) {
1588
- prev.type = 'star'
1589
- prev.star = true
1590
- prev.value += value
1591
- prev.output = star
1592
- state.backtrack = true
1593
- state.globstar = true
1594
- consume(value)
1595
- continue
1596
- }
1597
- let rest = remaining()
1598
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
1599
- extglobOpen('star', value)
1600
- continue
1601
- }
1602
- if (prev.type === 'star') {
1603
- if (opts.noglobstar === true) {
1604
- consume(value)
1605
- continue
1606
- }
1607
- const prior = prev.prev
1608
- const before = prior.prev
1609
- const isStart = prior.type === 'slash' || prior.type === 'bos'
1610
- const afterStar =
1611
- before && (before.type === 'star' || before.type === 'globstar')
1612
- if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
1613
- push({
1614
- type: 'star',
1615
- value,
1616
- output: ''
1617
- })
1618
- continue
1619
- }
1620
- const isBrace =
1621
- state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace')
1622
- const isExtglob =
1623
- extglobs.length && (prior.type === 'pipe' || prior.type === 'paren')
1624
- if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
1625
- push({
1626
- type: 'star',
1627
- value,
1628
- output: ''
1629
- })
1630
- continue
1631
- }
1632
-
1633
- // strip consecutive `/**/`
1634
- while (rest.slice(0, 3) === '/**') {
1635
- const after = input[state.index + 4]
1636
- if (after && after !== '/') {
1637
- break
1638
- }
1639
- rest = rest.slice(3)
1640
- consume('/**', 3)
1641
- }
1642
- if (prior.type === 'bos' && eos()) {
1643
- prev.type = 'globstar'
1644
- prev.value += value
1645
- prev.output = globstar(opts)
1646
- state.output = prev.output
1647
- state.globstar = true
1648
- consume(value)
1649
- continue
1650
- }
1651
- if (
1652
- prior.type === 'slash' &&
1653
- prior.prev.type !== 'bos' &&
1654
- !afterStar &&
1655
- eos()
1656
- ) {
1657
- state.output = state.output.slice(
1658
- 0,
1659
- -(prior.output + prev.output).length
1660
- )
1661
- prior.output = `(?:${prior.output}`
1662
- prev.type = 'globstar'
1663
- prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)')
1664
- prev.value += value
1665
- state.globstar = true
1666
- state.output += prior.output + prev.output
1667
- consume(value)
1668
- continue
1669
- }
1670
- if (
1671
- prior.type === 'slash' &&
1672
- prior.prev.type !== 'bos' &&
1673
- rest[0] === '/'
1674
- ) {
1675
- const end = rest[1] !== void 0 ? '|$' : ''
1676
- state.output = state.output.slice(
1677
- 0,
1678
- -(prior.output + prev.output).length
1679
- )
1680
- prior.output = `(?:${prior.output}`
1681
- prev.type = 'globstar'
1682
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`
1683
- prev.value += value
1684
- state.output += prior.output + prev.output
1685
- state.globstar = true
1686
- consume(value + advance())
1687
- push({
1688
- type: 'slash',
1689
- value: '/',
1690
- output: ''
1691
- })
1692
- continue
1693
- }
1694
- if (prior.type === 'bos' && rest[0] === '/') {
1695
- prev.type = 'globstar'
1696
- prev.value += value
1697
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`
1698
- state.output = prev.output
1699
- state.globstar = true
1700
- consume(value + advance())
1701
- push({
1702
- type: 'slash',
1703
- value: '/',
1704
- output: ''
1705
- })
1706
- continue
1707
- }
1708
-
1709
- // remove single star from output
1710
- state.output = state.output.slice(0, -prev.output.length)
1711
-
1712
- // reset previous token to globstar
1713
- prev.type = 'globstar'
1714
- prev.output = globstar(opts)
1715
- prev.value += value
1716
-
1717
- // reset output with globstar
1718
- state.output += prev.output
1719
- state.globstar = true
1720
- consume(value)
1721
- continue
1722
- }
1723
- const token = {
1724
- type: 'star',
1725
- value,
1726
- output: star
1727
- }
1728
- if (opts.bash === true) {
1729
- token.output = '.*?'
1730
- if (prev.type === 'bos' || prev.type === 'slash') {
1731
- token.output = nodot + token.output
1732
- }
1733
- push(token)
1734
- continue
1735
- }
1736
- if (
1737
- prev &&
1738
- (prev.type === 'bracket' || prev.type === 'paren') &&
1739
- opts.regex === true
1740
- ) {
1741
- token.output = value
1742
- push(token)
1743
- continue
1744
- }
1745
- if (
1746
- state.index === state.start ||
1747
- prev.type === 'slash' ||
1748
- prev.type === 'dot'
1749
- ) {
1750
- if (prev.type === 'dot') {
1751
- state.output += NO_DOT_SLASH
1752
- prev.output += NO_DOT_SLASH
1753
- } else if (opts.dot === true) {
1754
- state.output += NO_DOTS_SLASH
1755
- prev.output += NO_DOTS_SLASH
1756
- } else {
1757
- state.output += nodot
1758
- prev.output += nodot
1759
- }
1760
- if (peek() !== '*') {
1761
- state.output += ONE_CHAR
1762
- prev.output += ONE_CHAR
1763
- }
1764
- }
1765
- push(token)
1766
- }
1767
- while (state.brackets > 0) {
1768
- if (opts.strictBrackets === true) {
1769
- throw new SyntaxError(syntaxError('closing', ']'))
1770
- }
1771
- state.output = utils.escapeLast(state.output, '[')
1772
- decrement('brackets')
1773
- }
1774
- while (state.parens > 0) {
1775
- if (opts.strictBrackets === true) {
1776
- throw new SyntaxError(syntaxError('closing', ')'))
1777
- }
1778
- state.output = utils.escapeLast(state.output, '(')
1779
- decrement('parens')
1780
- }
1781
- while (state.braces > 0) {
1782
- if (opts.strictBrackets === true) {
1783
- throw new SyntaxError(syntaxError('closing', '}'))
1784
- }
1785
- state.output = utils.escapeLast(state.output, '{')
1786
- decrement('braces')
1787
- }
1788
- if (
1789
- opts.strictSlashes !== true &&
1790
- (prev.type === 'star' || prev.type === 'bracket')
1791
- ) {
1792
- push({
1793
- type: 'maybe_slash',
1794
- value: '',
1795
- output: `${SLASH_LITERAL}?`
1796
- })
1797
- }
1798
-
1799
- // rebuild the output if we had to backtrack at any point
1800
- if (state.backtrack === true) {
1801
- state.output = ''
1802
- for (const token of state.tokens) {
1803
- state.output += token.output != null ? token.output : token.value
1804
- if (token.suffix) {
1805
- state.output += token.suffix
1806
- }
1807
- }
1808
- }
1809
- return state
1810
- }
1811
-
1812
- /**
1813
- * Fast paths for creating regular expressions for common glob patterns.
1814
- * This can significantly speed up processing and has very little downside
1815
- * impact when none of the fast paths match.
1816
- */
1817
-
1818
- parse.fastpaths = (input, options) => {
1819
- const opts = {
1820
- ...options
1821
- }
1822
- const max =
1823
- typeof opts.maxLength === 'number'
1824
- ? Math.min(MAX_LENGTH, opts.maxLength)
1825
- : MAX_LENGTH
1826
- const len = input.length
1827
- if (len > max) {
1828
- throw new SyntaxError(
1829
- `Input length: ${len}, exceeds maximum allowed length: ${max}`
1830
- )
1831
- }
1832
- input = REPLACEMENTS[input] || input
1833
-
1834
- // create constants based on platform, for windows or posix
1835
- const {
1836
- DOT_LITERAL,
1837
- SLASH_LITERAL,
1838
- ONE_CHAR,
1839
- DOTS_SLASH,
1840
- NO_DOT,
1841
- NO_DOTS,
1842
- NO_DOTS_SLASH,
1843
- STAR,
1844
- START_ANCHOR
1845
- } = constants.globChars(opts.windows)
1846
- const nodot = opts.dot ? NO_DOTS : NO_DOT
1847
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT
1848
- const capture = opts.capture ? '' : '?:'
1849
- const state = {
1850
- negated: false,
1851
- prefix: ''
1852
- }
1853
- let star = opts.bash === true ? '.*?' : STAR
1854
- if (opts.capture) {
1855
- star = `(${star})`
1856
- }
1857
- const globstar = opts => {
1858
- if (opts.noglobstar === true) {
1859
- return star
1860
- }
1861
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`
1862
- }
1863
- const create = str => {
1864
- switch (str) {
1865
- case '*':
1866
- return `${nodot}${ONE_CHAR}${star}`
1867
- case '.*':
1868
- return `${DOT_LITERAL}${ONE_CHAR}${star}`
1869
- case '*.*':
1870
- return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`
1871
- case '*/*':
1872
- return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`
1873
- case '**':
1874
- return nodot + globstar(opts)
1875
- case '**/*':
1876
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`
1877
- case '**/*.*':
1878
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`
1879
- case '**/.*':
1880
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`
1881
- default: {
1882
- const match = /^(.*?)\.(\w+)$/.exec(str)
1883
- if (!match) {
1884
- return
1885
- }
1886
- const source = create(match[1])
1887
- if (!source) {
1888
- return
1889
- }
1890
- return source + DOT_LITERAL + match[2]
1891
- }
1892
- }
1893
- }
1894
- const output = utils.removePrefix(input, state)
1895
- let source = create(output)
1896
- if (source && opts.strictSlashes !== true) {
1897
- source += `${SLASH_LITERAL}?`
1898
- }
1899
- return source
1900
- }
1901
- parse_1 = parse
1902
- return parse_1
1903
- }
1904
-
1905
- let picomatch_1$1
1906
- let hasRequiredPicomatch$1
1907
- function requirePicomatch$1() {
1908
- if (hasRequiredPicomatch$1) {
1909
- return picomatch_1$1
1910
- }
1911
- hasRequiredPicomatch$1 = 1
1912
- const scan = /*@__PURE__*/ requireScan()
1913
- const parse = /*@__PURE__*/ requireParse()
1914
- const utils = /*@__PURE__*/ requireUtils()
1915
- const constants = /*@__PURE__*/ requireConstants()
1916
- const isObject = val => val && typeof val === 'object' && !Array.isArray(val)
1917
-
1918
- /**
1919
- * Creates a matcher function from one or more glob patterns. The
1920
- * returned function takes a string to match as its first argument,
1921
- * and returns true if the string is a match. The returned matcher
1922
- * function also takes a boolean as the second argument that, when true,
1923
- * returns an object with additional information.
1924
- *
1925
- * ```js
1926
- * const picomatch = require('picomatch');
1927
- * // picomatch(glob[, options]);
1928
- *
1929
- * const isMatch = picomatch('*.!(*a)');
1930
- * console.log(isMatch('a.a')); //=> false
1931
- * console.log(isMatch('a.b')); //=> true
1932
- * ```
1933
- * @name picomatch
1934
- * @param {String|Array} `globs` One or more glob patterns.
1935
- * @param {Object=} `options`
1936
- * @return {Function=} Returns a matcher function.
1937
- * @api public
1938
- */
1939
-
1940
- const picomatch = (glob, options, returnState = false) => {
1941
- if (Array.isArray(glob)) {
1942
- const fns = glob.map(input => picomatch(input, options, returnState))
1943
- const arrayMatcher = str => {
1944
- for (const isMatch of fns) {
1945
- const state = isMatch(str)
1946
- if (state) {
1947
- return state
1948
- }
1949
- }
1950
- return false
1951
- }
1952
- return arrayMatcher
1953
- }
1954
- const isState = isObject(glob) && glob.tokens && glob.input
1955
- if (glob === '' || (typeof glob !== 'string' && !isState)) {
1956
- throw new TypeError('Expected pattern to be a non-empty string')
1957
- }
1958
- const opts = options || {}
1959
- const posix = opts.windows
1960
- const regex = isState
1961
- ? picomatch.compileRe(glob, options)
1962
- : picomatch.makeRe(glob, options, false, true)
1963
- const state = regex.state
1964
- delete regex.state
1965
- let isIgnored = () => false
1966
- if (opts.ignore) {
1967
- const ignoreOpts = {
1968
- ...options,
1969
- ignore: null,
1970
- onMatch: null,
1971
- onResult: null
1972
- }
1973
- isIgnored = picomatch(opts.ignore, ignoreOpts, returnState)
1974
- }
1975
- const matcher = (input, returnObject = false) => {
1976
- const { isMatch, match, output } = picomatch.test(input, regex, options, {
1977
- glob,
1978
- posix
1979
- })
1980
- const result = {
1981
- glob,
1982
- state,
1983
- regex,
1984
- posix,
1985
- input,
1986
- output,
1987
- match,
1988
- isMatch
1989
- }
1990
- if (typeof opts.onResult === 'function') {
1991
- opts.onResult(result)
1992
- }
1993
- if (isMatch === false) {
1994
- result.isMatch = false
1995
- return returnObject ? result : false
1996
- }
1997
- if (isIgnored(input)) {
1998
- if (typeof opts.onIgnore === 'function') {
1999
- opts.onIgnore(result)
2000
- }
2001
- result.isMatch = false
2002
- return returnObject ? result : false
2003
- }
2004
- if (typeof opts.onMatch === 'function') {
2005
- opts.onMatch(result)
2006
- }
2007
- return returnObject ? result : true
2008
- }
2009
- if (returnState) {
2010
- matcher.state = state
2011
- }
2012
- return matcher
2013
- }
2014
-
2015
- /**
2016
- * Test `input` with the given `regex`. This is used by the main
2017
- * `picomatch()` function to test the input string.
2018
- *
2019
- * ```js
2020
- * const picomatch = require('picomatch');
2021
- * // picomatch.test(input, regex[, options]);
2022
- *
2023
- * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
2024
- * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
2025
- * ```
2026
- * @param {String} `input` String to test.
2027
- * @param {RegExp} `regex`
2028
- * @return {Object} Returns an object with matching info.
2029
- * @api public
2030
- */
2031
-
2032
- picomatch.test = (input, regex, options, { glob, posix } = {}) => {
2033
- if (typeof input !== 'string') {
2034
- throw new TypeError('Expected input to be a string')
2035
- }
2036
- if (input === '') {
2037
- return {
2038
- isMatch: false,
2039
- output: ''
2040
- }
2041
- }
2042
- const opts = options || {}
2043
- const format = opts.format || (posix ? utils.toPosixSlashes : null)
2044
- let match = input === glob
2045
- let output = match && format ? format(input) : input
2046
- if (match === false) {
2047
- output = format ? format(input) : input
2048
- match = output === glob
2049
- }
2050
- if (match === false || opts.capture === true) {
2051
- if (opts.matchBase === true || opts.basename === true) {
2052
- match = picomatch.matchBase(input, regex, options, posix)
2053
- } else {
2054
- match = regex.exec(output)
2055
- }
2056
- }
2057
- return {
2058
- isMatch: Boolean(match),
2059
- match,
2060
- output
2061
- }
2062
- }
2063
-
2064
- /**
2065
- * Match the basename of a filepath.
2066
- *
2067
- * ```js
2068
- * const picomatch = require('picomatch');
2069
- * // picomatch.matchBase(input, glob[, options]);
2070
- * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
2071
- * ```
2072
- * @param {String} `input` String to test.
2073
- * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
2074
- * @return {Boolean}
2075
- * @api public
2076
- */
2077
-
2078
- picomatch.matchBase = (input, glob, options) => {
2079
- const regex =
2080
- glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)
2081
- return regex.test(utils.basename(input))
2082
- }
2083
-
2084
- /**
2085
- * Returns true if **any** of the given glob `patterns` match the specified `string`.
2086
- *
2087
- * ```js
2088
- * const picomatch = require('picomatch');
2089
- * // picomatch.isMatch(string, patterns[, options]);
2090
- *
2091
- * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
2092
- * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
2093
- * ```
2094
- * @param {String|Array} str The string to test.
2095
- * @param {String|Array} patterns One or more glob patterns to use for matching.
2096
- * @param {Object} [options] See available [options](#options).
2097
- * @return {Boolean} Returns true if any patterns match `str`
2098
- * @api public
2099
- */
2100
-
2101
- picomatch.isMatch = (str, patterns, options) =>
2102
- picomatch(patterns, options)(str)
2103
-
2104
- /**
2105
- * Parse a glob pattern to create the source string for a regular
2106
- * expression.
2107
- *
2108
- * ```js
2109
- * const picomatch = require('picomatch');
2110
- * const result = picomatch.parse(pattern[, options]);
2111
- * ```
2112
- * @param {String} `pattern`
2113
- * @param {Object} `options`
2114
- * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
2115
- * @api public
2116
- */
2117
-
2118
- picomatch.parse = (pattern, options) => {
2119
- if (Array.isArray(pattern)) {
2120
- return pattern.map(p => picomatch.parse(p, options))
2121
- }
2122
- return parse(pattern, {
2123
- ...options,
2124
- fastpaths: false
2125
- })
2126
- }
2127
-
2128
- /**
2129
- * Scan a glob pattern to separate the pattern into segments.
2130
- *
2131
- * ```js
2132
- * const picomatch = require('picomatch');
2133
- * // picomatch.scan(input[, options]);
2134
- *
2135
- * const result = picomatch.scan('!./foo/*.js');
2136
- * console.log(result);
2137
- * { prefix: '!./',
2138
- * input: '!./foo/*.js',
2139
- * start: 3,
2140
- * base: 'foo',
2141
- * glob: '*.js',
2142
- * isBrace: false,
2143
- * isBracket: false,
2144
- * isGlob: true,
2145
- * isExtglob: false,
2146
- * isGlobstar: false,
2147
- * negated: true }
2148
- * ```
2149
- * @param {String} `input` Glob pattern to scan.
2150
- * @param {Object} `options`
2151
- * @return {Object} Returns an object with
2152
- * @api public
2153
- */
2154
-
2155
- picomatch.scan = (input, options) => scan(input, options)
2156
-
2157
- /**
2158
- * Compile a regular expression from the `state` object returned by the
2159
- * [parse()](#parse) method.
2160
- *
2161
- * @param {Object} `state`
2162
- * @param {Object} `options`
2163
- * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
2164
- * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
2165
- * @return {RegExp}
2166
- * @api public
2167
- */
2168
-
2169
- picomatch.compileRe = (
2170
- state,
2171
- options,
2172
- returnOutput = false,
2173
- returnState = false
2174
- ) => {
2175
- if (returnOutput === true) {
2176
- return state.output
2177
- }
2178
- const opts = options || {}
2179
- const prepend = opts.contains ? '' : '^'
2180
- const append = opts.contains ? '' : '$'
2181
- let source = `${prepend}(?:${state.output})${append}`
2182
- if (state && state.negated === true) {
2183
- source = `^(?!${source}).*$`
2184
- }
2185
- const regex = picomatch.toRegex(source, options)
2186
- if (returnState === true) {
2187
- regex.state = state
2188
- }
2189
- return regex
2190
- }
2191
-
2192
- /**
2193
- * Create a regular expression from a parsed glob pattern.
2194
- *
2195
- * ```js
2196
- * const picomatch = require('picomatch');
2197
- * const state = picomatch.parse('*.js');
2198
- * // picomatch.compileRe(state[, options]);
2199
- *
2200
- * console.log(picomatch.compileRe(state));
2201
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
2202
- * ```
2203
- * @param {String} `state` The object returned from the `.parse` method.
2204
- * @param {Object} `options`
2205
- * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
2206
- * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
2207
- * @return {RegExp} Returns a regex created from the given pattern.
2208
- * @api public
2209
- */
2210
-
2211
- picomatch.makeRe = (
2212
- input,
2213
- options = {},
2214
- returnOutput = false,
2215
- returnState = false
2216
- ) => {
2217
- if (!input || typeof input !== 'string') {
2218
- throw new TypeError('Expected a non-empty string')
2219
- }
2220
- let parsed = {
2221
- negated: false,
2222
- fastpaths: true
2223
- }
2224
- if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
2225
- parsed.output = parse.fastpaths(input, options)
2226
- }
2227
- if (!parsed.output) {
2228
- parsed = parse(input, options)
2229
- }
2230
- return picomatch.compileRe(parsed, options, returnOutput, returnState)
2231
- }
2232
-
2233
- /**
2234
- * Create a regular expression from the given regex source string.
2235
- *
2236
- * ```js
2237
- * const picomatch = require('picomatch');
2238
- * // picomatch.toRegex(source[, options]);
2239
- *
2240
- * const { output } = picomatch.parse('*.js');
2241
- * console.log(picomatch.toRegex(output));
2242
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
2243
- * ```
2244
- * @param {String} `source` Regular expression source string.
2245
- * @param {Object} `options`
2246
- * @return {RegExp}
2247
- * @api public
2248
- */
2249
-
2250
- picomatch.toRegex = (source, options) => {
2251
- try {
2252
- const opts = options || {}
2253
- return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''))
2254
- } catch (err) {
2255
- if (options && options.debug === true) {
2256
- throw err
2257
- }
2258
- return /$^/
2259
- }
2260
- }
2261
-
2262
- /**
2263
- * Picomatch constants.
2264
- * @return {Object}
2265
- */
2266
-
2267
- picomatch.constants = constants
2268
-
2269
- /**
2270
- * Expose "picomatch"
2271
- */
2272
-
2273
- picomatch_1$1 = picomatch
2274
- return picomatch_1$1
2275
- }
2276
-
2277
- let picomatch_1
2278
- let hasRequiredPicomatch
2279
- function requirePicomatch() {
2280
- if (hasRequiredPicomatch) {
2281
- return picomatch_1
2282
- }
2283
- hasRequiredPicomatch = 1
2284
- const pico = /*@__PURE__*/ requirePicomatch$1()
2285
- const utils = /*@__PURE__*/ requireUtils()
2286
- function picomatch(glob, options, returnState = false) {
2287
- // default to os.platform()
2288
- if (
2289
- options &&
2290
- (options.windows === null || options.windows === undefined)
2291
- ) {
2292
- // don't mutate the original options object
2293
- options = {
2294
- ...options,
2295
- windows: utils.isWindows()
2296
- }
2297
- }
2298
- return pico(glob, options, returnState)
2299
- }
2300
- Object.assign(picomatch, pico)
2301
- picomatch_1 = picomatch
2302
- return picomatch_1
2303
- }
2304
-
2305
- const picomatchExports = /*@__PURE__*/ requirePicomatch()
2306
-
2307
- module.exports = picomatchExports