@zuplo/cli 7.13.3 → 7.13.4

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 (858) hide show
  1. package/dist/cmds/lint.d.ts.map +1 -1
  2. package/dist/cmds/lint.js +0 -5
  3. package/dist/cmds/lint.js.map +1 -1
  4. package/dist/lint/handler.d.ts.map +1 -1
  5. package/dist/lint/handler.js +9 -0
  6. package/dist/lint/handler.js.map +1 -1
  7. package/node_modules/@simple-git/argv-parser/LICENSE +20 -0
  8. package/node_modules/@simple-git/argv-parser/dist/index.cjs +1 -1
  9. package/node_modules/@simple-git/argv-parser/dist/index.cjs.map +1 -1
  10. package/node_modules/@simple-git/argv-parser/dist/index.d.ts +2 -1
  11. package/node_modules/@simple-git/argv-parser/dist/index.d.ts.map +1 -0
  12. package/node_modules/@simple-git/argv-parser/dist/index.mjs +244 -198
  13. package/node_modules/@simple-git/argv-parser/dist/index.mjs.map +1 -1
  14. package/node_modules/@simple-git/argv-parser/dist/src/args/parse-argv.d.ts +1 -0
  15. package/node_modules/@simple-git/argv-parser/dist/src/args/parse-argv.d.ts.map +1 -0
  16. package/node_modules/@simple-git/argv-parser/dist/src/args/parse-argv.types.d.ts +1 -0
  17. package/node_modules/@simple-git/argv-parser/dist/src/args/parse-argv.types.d.ts.map +1 -0
  18. package/node_modules/@simple-git/argv-parser/dist/src/config/analyse-config.d.ts +1 -0
  19. package/node_modules/@simple-git/argv-parser/dist/src/config/analyse-config.d.ts.map +1 -0
  20. package/node_modules/@simple-git/argv-parser/dist/src/config/config-operands.d.ts +1 -0
  21. package/node_modules/@simple-git/argv-parser/dist/src/config/config-operands.d.ts.map +1 -0
  22. package/node_modules/@simple-git/argv-parser/dist/src/config/config.types.d.ts +1 -0
  23. package/node_modules/@simple-git/argv-parser/dist/src/config/config.types.d.ts.map +1 -0
  24. package/node_modules/@simple-git/argv-parser/dist/src/config/detect-config-action.d.ts +1 -0
  25. package/node_modules/@simple-git/argv-parser/dist/src/config/detect-config-action.d.ts.map +1 -0
  26. package/node_modules/@simple-git/argv-parser/dist/src/env/parse-env.d.ts +25 -0
  27. package/node_modules/@simple-git/argv-parser/dist/src/env/parse-env.d.ts.map +1 -0
  28. package/node_modules/@simple-git/argv-parser/dist/src/flags/flags.helpers.d.ts +1 -0
  29. package/node_modules/@simple-git/argv-parser/dist/src/flags/flags.helpers.d.ts.map +1 -0
  30. package/node_modules/@simple-git/argv-parser/dist/src/flags/parse-global-flags.d.ts +1 -0
  31. package/node_modules/@simple-git/argv-parser/dist/src/flags/parse-global-flags.d.ts.map +1 -0
  32. package/node_modules/@simple-git/argv-parser/dist/src/flags/parse-task-flags.d.ts +1 -0
  33. package/node_modules/@simple-git/argv-parser/dist/src/flags/parse-task-flags.d.ts.map +1 -0
  34. package/node_modules/@simple-git/argv-parser/dist/src/tokens/flag-specs.d.ts +1 -0
  35. package/node_modules/@simple-git/argv-parser/dist/src/tokens/flag-specs.d.ts.map +1 -0
  36. package/node_modules/@simple-git/argv-parser/dist/src/tokens/token-expander.d.ts +1 -0
  37. package/node_modules/@simple-git/argv-parser/dist/src/tokens/token-expander.d.ts.map +1 -0
  38. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/detect-vulnerable-config-writes.d.ts +1 -0
  39. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/detect-vulnerable-config-writes.d.ts.map +1 -0
  40. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/detect-vulnerable-flags.d.ts +1 -0
  41. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/detect-vulnerable-flags.d.ts.map +1 -0
  42. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/vulnerability-analysis.d.ts +1 -0
  43. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/vulnerability-analysis.d.ts.map +1 -0
  44. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/vulnerability-check.d.ts +1 -0
  45. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/vulnerability-check.d.ts.map +1 -0
  46. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/vulnerability.types.d.ts +29 -0
  47. package/node_modules/@simple-git/argv-parser/dist/src/vulnerabilities/vulnerability.types.d.ts.map +1 -0
  48. package/node_modules/@simple-git/argv-parser/package.json +2 -2
  49. package/node_modules/@zuplo/core/customer.cli.minified.js +344 -344
  50. package/node_modules/@zuplo/core/index.minified.js +359 -359
  51. package/node_modules/@zuplo/core/package.json +1 -1
  52. package/node_modules/@zuplo/graphql/package.json +1 -1
  53. package/node_modules/@zuplo/openapi-tools/package.json +2 -2
  54. package/node_modules/@zuplo/otel/package.json +1 -1
  55. package/node_modules/@zuplo/runtime/out/esm/{chunk-DVFQRFED.js → chunk-NWYAKCSU.js} +81 -81
  56. package/node_modules/@zuplo/runtime/out/esm/chunk-NWYAKCSU.js.map +1 -0
  57. package/node_modules/@zuplo/runtime/out/esm/chunk-PXS4NOKU.js +102 -0
  58. package/node_modules/@zuplo/runtime/out/esm/chunk-PXS4NOKU.js.map +1 -0
  59. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  60. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  61. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  62. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
  63. package/node_modules/@zuplo/runtime/package.json +2 -2
  64. package/node_modules/simple-git/LICENSE +20 -0
  65. package/node_modules/simple-git/dist/index.cjs +6 -0
  66. package/node_modules/simple-git/dist/index.cjs.map +1 -0
  67. package/node_modules/simple-git/dist/index.d.ts +5 -0
  68. package/node_modules/simple-git/dist/index.d.ts.map +1 -0
  69. package/node_modules/simple-git/dist/index.mjs +2895 -0
  70. package/node_modules/simple-git/dist/index.mjs.map +1 -0
  71. package/node_modules/simple-git/dist/src/lib/api.d.ts +13 -13
  72. package/node_modules/simple-git/dist/src/lib/api.d.ts.map +1 -0
  73. package/node_modules/simple-git/dist/src/lib/args/log-format.d.ts +1 -0
  74. package/node_modules/simple-git/dist/src/lib/args/log-format.d.ts.map +1 -0
  75. package/node_modules/simple-git/dist/src/lib/errors/git-configuration-error.d.ts +25 -0
  76. package/node_modules/simple-git/dist/src/lib/errors/git-configuration-error.d.ts.map +1 -0
  77. package/node_modules/simple-git/dist/src/lib/errors/git-construct-error.d.ts +2 -1
  78. package/node_modules/simple-git/dist/src/lib/errors/git-construct-error.d.ts.map +1 -0
  79. package/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts +3 -2
  80. package/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts.map +1 -0
  81. package/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts +2 -1
  82. package/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts.map +1 -0
  83. package/node_modules/simple-git/dist/src/lib/errors/git-response-error.d.ts +3 -2
  84. package/node_modules/simple-git/dist/src/lib/errors/git-response-error.d.ts.map +1 -0
  85. package/node_modules/simple-git/dist/src/lib/errors/task-configuration-error.d.ts +1 -0
  86. package/node_modules/simple-git/dist/src/lib/errors/task-configuration-error.d.ts.map +1 -0
  87. package/node_modules/simple-git/dist/src/lib/git-factory.d.ts +3 -15
  88. package/node_modules/simple-git/dist/src/lib/git-factory.d.ts.map +1 -0
  89. package/node_modules/simple-git/dist/src/lib/git-logger.d.ts +2 -1
  90. package/node_modules/simple-git/dist/src/lib/git-logger.d.ts.map +1 -0
  91. package/node_modules/simple-git/dist/src/lib/parsers/parse-branch-delete.d.ts +3 -2
  92. package/node_modules/simple-git/dist/src/lib/parsers/parse-branch-delete.d.ts.map +1 -0
  93. package/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +2 -1
  94. package/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts.map +1 -0
  95. package/node_modules/simple-git/dist/src/lib/{responses/CleanSummary.d.ts → parsers/parse-clean.d.ts} +5 -4
  96. package/node_modules/simple-git/dist/src/lib/parsers/parse-clean.d.ts.map +1 -0
  97. package/node_modules/simple-git/dist/src/lib/parsers/parse-commit.d.ts +2 -1
  98. package/node_modules/simple-git/dist/src/lib/parsers/parse-commit.d.ts.map +1 -0
  99. package/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts +1 -0
  100. package/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts.map +1 -0
  101. package/node_modules/simple-git/dist/src/lib/parsers/parse-fetch.d.ts +2 -1
  102. package/node_modules/simple-git/dist/src/lib/parsers/parse-fetch.d.ts.map +1 -0
  103. package/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts +2 -1
  104. package/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts.map +1 -0
  105. package/node_modules/simple-git/dist/src/lib/parsers/parse-merge.d.ts +3 -2
  106. package/node_modules/simple-git/dist/src/lib/parsers/parse-merge.d.ts.map +1 -0
  107. package/node_modules/simple-git/dist/src/lib/parsers/parse-move.d.ts +2 -1
  108. package/node_modules/simple-git/dist/src/lib/parsers/parse-move.d.ts.map +1 -0
  109. package/node_modules/simple-git/dist/src/lib/parsers/parse-pull.d.ts +3 -2
  110. package/node_modules/simple-git/dist/src/lib/parsers/parse-pull.d.ts.map +1 -0
  111. package/node_modules/simple-git/dist/src/lib/parsers/parse-push.d.ts +3 -2
  112. package/node_modules/simple-git/dist/src/lib/parsers/parse-push.d.ts.map +1 -0
  113. package/node_modules/simple-git/dist/src/lib/parsers/parse-remote-messages.d.ts +2 -1
  114. package/node_modules/simple-git/dist/src/lib/parsers/parse-remote-messages.d.ts.map +1 -0
  115. package/node_modules/simple-git/dist/src/lib/parsers/parse-remote-objects.d.ts +2 -1
  116. package/node_modules/simple-git/dist/src/lib/parsers/parse-remote-objects.d.ts.map +1 -0
  117. package/node_modules/simple-git/dist/src/lib/plugins/abort-plugin.d.ts +3 -2
  118. package/node_modules/simple-git/dist/src/lib/plugins/abort-plugin.d.ts.map +1 -0
  119. package/node_modules/simple-git/dist/src/lib/plugins/allow-environment.plugin.d.ts +3 -0
  120. package/node_modules/simple-git/dist/src/lib/plugins/allow-environment.plugin.d.ts.map +1 -0
  121. package/node_modules/simple-git/dist/src/lib/plugins/block-unsafe-operations-plugin.d.ts +1 -0
  122. package/node_modules/simple-git/dist/src/lib/plugins/block-unsafe-operations-plugin.d.ts.map +1 -0
  123. package/node_modules/simple-git/dist/src/lib/plugins/command-config-prefixing-plugin.d.ts +2 -1
  124. package/node_modules/simple-git/dist/src/lib/plugins/command-config-prefixing-plugin.d.ts.map +1 -0
  125. package/node_modules/simple-git/dist/src/lib/plugins/completion-detection.plugin.d.ts +3 -2
  126. package/node_modules/simple-git/dist/src/lib/plugins/completion-detection.plugin.d.ts.map +1 -0
  127. package/node_modules/simple-git/dist/src/lib/plugins/custom-binary.plugin.d.ts +2 -1
  128. package/node_modules/simple-git/dist/src/lib/plugins/custom-binary.plugin.d.ts.map +1 -0
  129. package/node_modules/simple-git/dist/src/lib/plugins/error-detection.plugin.d.ts +3 -2
  130. package/node_modules/simple-git/dist/src/lib/plugins/error-detection.plugin.d.ts.map +1 -0
  131. package/node_modules/simple-git/dist/src/lib/plugins/index.d.ts +5 -1
  132. package/node_modules/simple-git/dist/src/lib/plugins/index.d.ts.map +1 -0
  133. package/node_modules/simple-git/dist/src/lib/plugins/input.plugin.d.ts +4 -0
  134. package/node_modules/simple-git/dist/src/lib/plugins/input.plugin.d.ts.map +1 -0
  135. package/node_modules/simple-git/dist/src/lib/plugins/plugin-store.d.ts +2 -1
  136. package/node_modules/simple-git/dist/src/lib/plugins/plugin-store.d.ts.map +1 -0
  137. package/node_modules/simple-git/dist/src/lib/plugins/progress-monitor-plugin.d.ts +3 -2
  138. package/node_modules/simple-git/dist/src/lib/plugins/progress-monitor-plugin.d.ts.map +1 -0
  139. package/node_modules/simple-git/dist/src/lib/plugins/simple-git-plugin.d.ts +8 -4
  140. package/node_modules/simple-git/dist/src/lib/plugins/simple-git-plugin.d.ts.map +1 -0
  141. package/node_modules/simple-git/dist/src/lib/plugins/spawn-options-plugin.d.ts +3 -2
  142. package/node_modules/simple-git/dist/src/lib/plugins/spawn-options-plugin.d.ts.map +1 -0
  143. package/node_modules/simple-git/dist/src/lib/plugins/suffix-paths.plugin.d.ts +2 -1
  144. package/node_modules/simple-git/dist/src/lib/plugins/suffix-paths.plugin.d.ts.map +1 -0
  145. package/node_modules/simple-git/dist/src/lib/plugins/{timout-plugin.d.ts → timeout-plugin.d.ts} +2 -1
  146. package/node_modules/simple-git/dist/src/lib/plugins/timeout-plugin.d.ts.map +1 -0
  147. package/node_modules/simple-git/dist/src/lib/responses/BranchDeleteSummary.d.ts +2 -1
  148. package/node_modules/simple-git/dist/src/lib/responses/BranchDeleteSummary.d.ts.map +1 -0
  149. package/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts +2 -1
  150. package/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts.map +1 -0
  151. package/node_modules/simple-git/dist/src/lib/responses/ConfigList.d.ts +2 -1
  152. package/node_modules/simple-git/dist/src/lib/responses/ConfigList.d.ts.map +1 -0
  153. package/node_modules/simple-git/dist/src/lib/responses/DiffSummary.d.ts +2 -1
  154. package/node_modules/simple-git/dist/src/lib/responses/DiffSummary.d.ts.map +1 -0
  155. package/node_modules/simple-git/dist/src/lib/responses/FileStatusSummary.d.ts +2 -1
  156. package/node_modules/simple-git/dist/src/lib/responses/FileStatusSummary.d.ts.map +1 -0
  157. package/node_modules/simple-git/dist/src/lib/responses/GetRemoteSummary.d.ts +1 -0
  158. package/node_modules/simple-git/dist/src/lib/responses/GetRemoteSummary.d.ts.map +1 -0
  159. package/node_modules/simple-git/dist/src/lib/responses/InitSummary.d.ts +2 -1
  160. package/node_modules/simple-git/dist/src/lib/responses/InitSummary.d.ts.map +1 -0
  161. package/node_modules/simple-git/dist/src/lib/responses/MergeSummary.d.ts +2 -1
  162. package/node_modules/simple-git/dist/src/lib/responses/MergeSummary.d.ts.map +1 -0
  163. package/node_modules/simple-git/dist/src/lib/responses/PullSummary.d.ts +2 -1
  164. package/node_modules/simple-git/dist/src/lib/responses/PullSummary.d.ts.map +1 -0
  165. package/node_modules/simple-git/dist/src/lib/responses/StatusSummary.d.ts +2 -1
  166. package/node_modules/simple-git/dist/src/lib/responses/StatusSummary.d.ts.map +1 -0
  167. package/node_modules/simple-git/dist/src/lib/responses/TagList.d.ts +2 -1
  168. package/node_modules/simple-git/dist/src/lib/responses/TagList.d.ts.map +1 -0
  169. package/node_modules/simple-git/dist/src/lib/runners/git-executor-chain.d.ts +5 -3
  170. package/node_modules/simple-git/dist/src/lib/runners/git-executor-chain.d.ts.map +1 -0
  171. package/node_modules/simple-git/dist/src/lib/runners/git-executor.d.ts +2 -1
  172. package/node_modules/simple-git/dist/src/lib/runners/git-executor.d.ts.map +1 -0
  173. package/node_modules/simple-git/dist/src/lib/runners/scheduler.d.ts +1 -0
  174. package/node_modules/simple-git/dist/src/lib/runners/scheduler.d.ts.map +1 -0
  175. package/node_modules/simple-git/dist/src/lib/runners/tasks-pending-queue.d.ts +3 -2
  176. package/node_modules/simple-git/dist/src/lib/runners/tasks-pending-queue.d.ts.map +1 -0
  177. package/node_modules/simple-git/dist/src/lib/simple-git-api.d.ts +3 -2
  178. package/node_modules/simple-git/dist/src/lib/simple-git-api.d.ts.map +1 -0
  179. package/node_modules/simple-git/dist/src/lib/task-callback.d.ts +2 -1
  180. package/node_modules/simple-git/dist/src/lib/task-callback.d.ts.map +1 -0
  181. package/node_modules/simple-git/dist/src/lib/tasks/apply-patch.d.ts +2 -1
  182. package/node_modules/simple-git/dist/src/lib/tasks/apply-patch.d.ts.map +1 -0
  183. package/node_modules/simple-git/dist/src/lib/tasks/branch.d.ts +3 -2
  184. package/node_modules/simple-git/dist/src/lib/tasks/branch.d.ts.map +1 -0
  185. package/node_modules/simple-git/dist/src/lib/tasks/change-working-directory.d.ts +2 -1
  186. package/node_modules/simple-git/dist/src/lib/tasks/change-working-directory.d.ts.map +1 -0
  187. package/node_modules/simple-git/dist/src/lib/tasks/check-ignore.d.ts +2 -1
  188. package/node_modules/simple-git/dist/src/lib/tasks/check-ignore.d.ts.map +1 -0
  189. package/node_modules/simple-git/dist/src/lib/tasks/check-is-repo.d.ts +2 -1
  190. package/node_modules/simple-git/dist/src/lib/tasks/check-is-repo.d.ts.map +1 -0
  191. package/node_modules/simple-git/dist/src/lib/tasks/checkout.d.ts +2 -1
  192. package/node_modules/simple-git/dist/src/lib/tasks/checkout.d.ts.map +1 -0
  193. package/node_modules/simple-git/dist/src/lib/tasks/clean.d.ts +3 -2
  194. package/node_modules/simple-git/dist/src/lib/tasks/clean.d.ts.map +1 -0
  195. package/node_modules/simple-git/dist/src/lib/tasks/clone.d.ts +4 -3
  196. package/node_modules/simple-git/dist/src/lib/tasks/clone.d.ts.map +1 -0
  197. package/node_modules/simple-git/dist/src/lib/tasks/commit.d.ts +2 -1
  198. package/node_modules/simple-git/dist/src/lib/tasks/commit.d.ts.map +1 -0
  199. package/node_modules/simple-git/dist/src/lib/tasks/config.d.ts +2 -1
  200. package/node_modules/simple-git/dist/src/lib/tasks/config.d.ts.map +1 -0
  201. package/node_modules/simple-git/dist/src/lib/tasks/count-objects.d.ts +2 -1
  202. package/node_modules/simple-git/dist/src/lib/tasks/count-objects.d.ts.map +1 -0
  203. package/node_modules/simple-git/dist/src/lib/tasks/diff-name-status.d.ts +1 -0
  204. package/node_modules/simple-git/dist/src/lib/tasks/diff-name-status.d.ts.map +1 -0
  205. package/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts +4 -3
  206. package/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts.map +1 -0
  207. package/node_modules/simple-git/dist/src/lib/tasks/fetch.d.ts +4 -3
  208. package/node_modules/simple-git/dist/src/lib/tasks/fetch.d.ts.map +1 -0
  209. package/node_modules/simple-git/dist/src/lib/tasks/first-commit.d.ts +2 -1
  210. package/node_modules/simple-git/dist/src/lib/tasks/first-commit.d.ts.map +1 -0
  211. package/node_modules/simple-git/dist/src/lib/tasks/grep.d.ts +2 -1
  212. package/node_modules/simple-git/dist/src/lib/tasks/grep.d.ts.map +1 -0
  213. package/node_modules/simple-git/dist/src/lib/tasks/hash-object.d.ts +2 -1
  214. package/node_modules/simple-git/dist/src/lib/tasks/hash-object.d.ts.map +1 -0
  215. package/node_modules/simple-git/dist/src/lib/tasks/init.d.ts +3 -2
  216. package/node_modules/simple-git/dist/src/lib/tasks/init.d.ts.map +1 -0
  217. package/node_modules/simple-git/dist/src/lib/tasks/interpret-trailers.d.ts +3 -0
  218. package/node_modules/simple-git/dist/src/lib/tasks/interpret-trailers.d.ts.map +1 -0
  219. package/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +3 -2
  220. package/node_modules/simple-git/dist/src/lib/tasks/log.d.ts.map +1 -0
  221. package/node_modules/simple-git/dist/src/lib/tasks/merge.d.ts +4 -3
  222. package/node_modules/simple-git/dist/src/lib/tasks/merge.d.ts.map +1 -0
  223. package/node_modules/simple-git/dist/src/lib/tasks/move.d.ts +3 -2
  224. package/node_modules/simple-git/dist/src/lib/tasks/move.d.ts.map +1 -0
  225. package/node_modules/simple-git/dist/src/lib/tasks/pull.d.ts +3 -2
  226. package/node_modules/simple-git/dist/src/lib/tasks/pull.d.ts.map +1 -0
  227. package/node_modules/simple-git/dist/src/lib/tasks/push.d.ts +3 -2
  228. package/node_modules/simple-git/dist/src/lib/tasks/push.d.ts.map +1 -0
  229. package/node_modules/simple-git/dist/src/lib/tasks/remote.d.ts +1 -0
  230. package/node_modules/simple-git/dist/src/lib/tasks/remote.d.ts.map +1 -0
  231. package/node_modules/simple-git/dist/src/lib/tasks/reset.d.ts +1 -0
  232. package/node_modules/simple-git/dist/src/lib/tasks/reset.d.ts.map +1 -0
  233. package/node_modules/simple-git/dist/src/lib/tasks/show.d.ts +2 -1
  234. package/node_modules/simple-git/dist/src/lib/tasks/show.d.ts.map +1 -0
  235. package/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +2 -1
  236. package/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts.map +1 -0
  237. package/node_modules/simple-git/dist/src/lib/tasks/status.d.ts +3 -2
  238. package/node_modules/simple-git/dist/src/lib/tasks/status.d.ts.map +1 -0
  239. package/node_modules/simple-git/dist/src/lib/tasks/sub-module.d.ts +2 -1
  240. package/node_modules/simple-git/dist/src/lib/tasks/sub-module.d.ts.map +1 -0
  241. package/node_modules/simple-git/dist/src/lib/tasks/tag.d.ts +3 -2
  242. package/node_modules/simple-git/dist/src/lib/tasks/tag.d.ts.map +1 -0
  243. package/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +1 -0
  244. package/node_modules/simple-git/dist/src/lib/tasks/task.d.ts.map +1 -0
  245. package/node_modules/simple-git/dist/src/lib/tasks/version.d.ts +2 -1
  246. package/node_modules/simple-git/dist/src/lib/tasks/version.d.ts.map +1 -0
  247. package/node_modules/simple-git/dist/src/lib/types/handlers.d.ts +2 -1
  248. package/node_modules/simple-git/dist/src/lib/types/handlers.d.ts.map +1 -0
  249. package/node_modules/simple-git/dist/src/lib/types/index.d.ts +19 -2
  250. package/node_modules/simple-git/dist/src/lib/types/index.d.ts.map +1 -0
  251. package/node_modules/simple-git/dist/src/lib/types/tasks.d.ts +4 -2
  252. package/node_modules/simple-git/dist/src/lib/types/tasks.d.ts.map +1 -0
  253. package/node_modules/simple-git/dist/src/lib/utils/argument-filters.d.ts +2 -0
  254. package/node_modules/simple-git/dist/src/lib/utils/argument-filters.d.ts.map +1 -0
  255. package/node_modules/simple-git/dist/src/lib/utils/exit-codes.d.ts +1 -0
  256. package/node_modules/simple-git/dist/src/lib/utils/exit-codes.d.ts.map +1 -0
  257. package/node_modules/simple-git/dist/src/lib/utils/git-output-streams.d.ts +2 -1
  258. package/node_modules/simple-git/dist/src/lib/utils/git-output-streams.d.ts.map +1 -0
  259. package/node_modules/simple-git/dist/src/lib/utils/index.d.ts +1 -0
  260. package/node_modules/simple-git/dist/src/lib/utils/index.d.ts.map +1 -0
  261. package/node_modules/simple-git/dist/src/lib/utils/line-parser.d.ts +1 -0
  262. package/node_modules/simple-git/dist/src/lib/utils/line-parser.d.ts.map +1 -0
  263. package/node_modules/simple-git/dist/src/lib/utils/simple-git-options.d.ts +2 -1
  264. package/node_modules/simple-git/dist/src/lib/utils/simple-git-options.d.ts.map +1 -0
  265. package/node_modules/simple-git/dist/src/lib/utils/task-options.d.ts +2 -1
  266. package/node_modules/simple-git/dist/src/lib/utils/task-options.d.ts.map +1 -0
  267. package/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts +3 -2
  268. package/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts.map +1 -0
  269. package/node_modules/simple-git/dist/src/lib/utils/util.d.ts +2 -0
  270. package/node_modules/simple-git/dist/src/lib/utils/util.d.ts.map +1 -0
  271. package/node_modules/simple-git/dist/src/typings/index.d.ts +4 -0
  272. package/node_modules/simple-git/dist/src/typings/index.d.ts.map +1 -0
  273. package/node_modules/simple-git/dist/src/typings/response.d.ts +479 -0
  274. package/node_modules/simple-git/dist/src/typings/response.d.ts.map +1 -0
  275. package/node_modules/simple-git/dist/src/typings/simple-git.d.ts +517 -0
  276. package/node_modules/simple-git/dist/src/typings/simple-git.d.ts.map +1 -0
  277. package/node_modules/simple-git/dist/src/typings/types.d.ts +11 -0
  278. package/node_modules/simple-git/dist/src/typings/types.d.ts.map +1 -0
  279. package/node_modules/simple-git/package.json +12 -16
  280. package/node_modules/simple-git/readme.md +29 -47
  281. package/node_modules/undici/docs/docs/api/Client.md +2 -0
  282. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +3 -1
  283. package/node_modules/undici/docs/docs/api/Dispatcher.md +1 -0
  284. package/node_modules/undici/lib/core/connect.js +10 -4
  285. package/node_modules/undici/lib/core/request.js +23 -2
  286. package/node_modules/undici/lib/core/symbols.js +1 -0
  287. package/node_modules/undici/lib/dispatcher/agent.js +6 -2
  288. package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
  289. package/node_modules/undici/lib/dispatcher/client-h1.js +23 -10
  290. package/node_modules/undici/lib/dispatcher/client-h2.js +84 -23
  291. package/node_modules/undici/lib/dispatcher/client.js +9 -4
  292. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
  293. package/node_modules/undici/lib/handler/cache-handler.js +69 -5
  294. package/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
  295. package/node_modules/undici/lib/handler/redirect-handler.js +8 -1
  296. package/node_modules/undici/lib/handler/retry-handler.js +109 -23
  297. package/node_modules/undici/lib/interceptor/cache.js +20 -1
  298. package/node_modules/undici/lib/interceptor/decompress.js +348 -46
  299. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  300. package/node_modules/undici/lib/web/cookies/index.js +3 -1
  301. package/node_modules/undici/lib/web/cookies/parse.js +138 -137
  302. package/node_modules/undici/lib/web/cookies/util.js +21 -2
  303. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +325 -149
  304. package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
  305. package/node_modules/undici/lib/web/fetch/index.js +3 -3
  306. package/node_modules/undici/lib/web/infra/index.js +14 -0
  307. package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  308. package/node_modules/undici/lib/web/websocket/connection.js +19 -9
  309. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  310. package/node_modules/undici/lib/web/websocket/receiver.js +13 -0
  311. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  312. package/node_modules/undici/package.json +1 -1
  313. package/node_modules/undici/types/client.d.ts +14 -0
  314. package/node_modules/undici/types/interceptors.d.ts +2 -0
  315. package/node_modules/zod/README.md +29 -2
  316. package/node_modules/zod/compile.cjs +96 -0
  317. package/node_modules/zod/compile.d.cts +1 -0
  318. package/node_modules/zod/compile.d.ts +1 -0
  319. package/node_modules/zod/compile.js +52 -0
  320. package/node_modules/zod/index.cjs +21 -2
  321. package/node_modules/zod/index.d.cts +1 -2
  322. package/node_modules/zod/index.d.ts +1 -2
  323. package/node_modules/zod/index.js +5 -2
  324. package/node_modules/zod/locales/index.cjs +19 -0
  325. package/node_modules/zod/mini/index.cjs +19 -0
  326. package/node_modules/zod/package.json +20 -8
  327. package/node_modules/zod/src/compile.ts +56 -0
  328. package/node_modules/zod/src/index.ts +5 -2
  329. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  330. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  331. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  332. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  333. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  334. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  335. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  336. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  337. package/node_modules/zod/src/v3/types.ts +5 -5
  338. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  339. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  340. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  341. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  342. package/node_modules/zod/src/v4/classic/external.ts +14 -9
  343. package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
  344. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  345. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  346. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  347. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  348. package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
  349. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  350. package/node_modules/zod/src/v4/classic/tests/array.test.ts +29 -2
  351. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
  352. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
  353. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  354. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  355. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  356. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
  357. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  358. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  359. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  360. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  361. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  362. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  363. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  364. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  365. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
  366. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
  367. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  368. package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
  369. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
  370. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  371. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  372. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  373. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  374. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  375. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  376. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  377. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
  378. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  379. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  380. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  381. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  382. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  383. package/node_modules/zod/src/v4/classic/tests/map.test.ts +19 -0
  384. package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
  385. package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
  386. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  387. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  388. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  389. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  390. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  391. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  392. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  393. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  394. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
  395. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  396. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  397. package/node_modules/zod/src/v4/classic/tests/set.test.ts +15 -0
  398. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  399. package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
  400. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  401. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
  402. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
  403. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  404. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  405. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  406. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  407. package/node_modules/zod/src/v4/core/api.ts +87 -35
  408. package/node_modules/zod/src/v4/core/checks.ts +119 -146
  409. package/node_modules/zod/src/v4/core/compile.ts +2322 -0
  410. package/node_modules/zod/src/v4/core/core.ts +99 -22
  411. package/node_modules/zod/src/v4/core/doc.ts +17 -9
  412. package/node_modules/zod/src/v4/core/errors.ts +113 -25
  413. package/node_modules/zod/src/v4/core/index.ts +3 -0
  414. package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
  415. package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
  416. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  417. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  418. package/node_modules/zod/src/v4/core/parse.ts +164 -50
  419. package/node_modules/zod/src/v4/core/regexes.ts +42 -15
  420. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  421. package/node_modules/zod/src/v4/core/schemas.ts +1035 -539
  422. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  423. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  424. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  425. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  426. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  427. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  428. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  429. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  430. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  431. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  432. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  433. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  434. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  435. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  436. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  437. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  438. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  439. package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
  440. package/node_modules/zod/src/v4/core/util.ts +467 -157
  441. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  442. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  443. package/node_modules/zod/src/v4/index.ts +3 -3
  444. package/node_modules/zod/src/v4/locales/ar.ts +5 -0
  445. package/node_modules/zod/src/v4/locales/az.ts +5 -0
  446. package/node_modules/zod/src/v4/locales/be.ts +12 -0
  447. package/node_modules/zod/src/v4/locales/bg.ts +5 -0
  448. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  449. package/node_modules/zod/src/v4/locales/ca.ts +5 -0
  450. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  451. package/node_modules/zod/src/v4/locales/cs.ts +5 -0
  452. package/node_modules/zod/src/v4/locales/da.ts +7 -2
  453. package/node_modules/zod/src/v4/locales/de.ts +5 -0
  454. package/node_modules/zod/src/v4/locales/el.ts +3 -0
  455. package/node_modules/zod/src/v4/locales/en.ts +17 -4
  456. package/node_modules/zod/src/v4/locales/eo.ts +5 -0
  457. package/node_modules/zod/src/v4/locales/es.ts +4 -0
  458. package/node_modules/zod/src/v4/locales/fa.ts +5 -0
  459. package/node_modules/zod/src/v4/locales/fi.ts +5 -0
  460. package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
  461. package/node_modules/zod/src/v4/locales/fr.ts +21 -14
  462. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  463. package/node_modules/zod/src/v4/locales/he.ts +8 -1
  464. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  465. package/node_modules/zod/src/v4/locales/hr.ts +4 -0
  466. package/node_modules/zod/src/v4/locales/hu.ts +5 -0
  467. package/node_modules/zod/src/v4/locales/hy.ts +11 -0
  468. package/node_modules/zod/src/v4/locales/id.ts +5 -0
  469. package/node_modules/zod/src/v4/locales/index.ts +11 -0
  470. package/node_modules/zod/src/v4/locales/is.ts +5 -0
  471. package/node_modules/zod/src/v4/locales/it.ts +5 -0
  472. package/node_modules/zod/src/v4/locales/ja.ts +5 -0
  473. package/node_modules/zod/src/v4/locales/ka.ts +5 -0
  474. package/node_modules/zod/src/v4/locales/km.ts +5 -0
  475. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  476. package/node_modules/zod/src/v4/locales/ko.ts +5 -0
  477. package/node_modules/zod/src/v4/locales/lt.ts +4 -0
  478. package/node_modules/zod/src/v4/locales/mk.ts +5 -0
  479. package/node_modules/zod/src/v4/locales/ms.ts +5 -0
  480. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  481. package/node_modules/zod/src/v4/locales/nl.ts +5 -0
  482. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  483. package/node_modules/zod/src/v4/locales/no.ts +7 -2
  484. package/node_modules/zod/src/v4/locales/ota.ts +5 -0
  485. package/node_modules/zod/src/v4/locales/pl.ts +5 -0
  486. package/node_modules/zod/src/v4/locales/ps.ts +5 -0
  487. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  488. package/node_modules/zod/src/v4/locales/pt.ts +101 -58
  489. package/node_modules/zod/src/v4/locales/ro.ts +3 -0
  490. package/node_modules/zod/src/v4/locales/ru.ts +12 -0
  491. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  492. package/node_modules/zod/src/v4/locales/sl.ts +5 -0
  493. package/node_modules/zod/src/v4/locales/sv.ts +7 -2
  494. package/node_modules/zod/src/v4/locales/ta.ts +5 -0
  495. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  496. package/node_modules/zod/src/v4/locales/th.ts +5 -0
  497. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  498. package/node_modules/zod/src/v4/locales/tr.ts +5 -0
  499. package/node_modules/zod/src/v4/locales/uk.ts +5 -0
  500. package/node_modules/zod/src/v4/locales/ur.ts +5 -0
  501. package/node_modules/zod/src/v4/locales/uz.ts +3 -0
  502. package/node_modules/zod/src/v4/locales/vi.ts +5 -0
  503. package/node_modules/zod/src/v4/locales/yo.ts +5 -0
  504. package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
  505. package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
  506. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  507. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  508. package/node_modules/zod/src/v4/mini/external.ts +12 -1
  509. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  510. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  511. package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
  512. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  513. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  514. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  515. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  516. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  517. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  518. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  519. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  520. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  521. package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
  522. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  523. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  524. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  525. package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
  526. package/node_modules/zod/v3/ZodError.cjs +41 -12
  527. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  528. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  529. package/node_modules/zod/v3/ZodError.js +22 -12
  530. package/node_modules/zod/v3/errors.cjs +19 -0
  531. package/node_modules/zod/v3/external.cjs +19 -0
  532. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  533. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  534. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  535. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  536. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  537. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  538. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  539. package/node_modules/zod/v3/index.cjs +19 -0
  540. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  541. package/node_modules/zod/v3/types.cjs +26 -5
  542. package/node_modules/zod/v3/types.js +7 -5
  543. package/node_modules/zod/v4/classic/checks.cjs +21 -1
  544. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  545. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  546. package/node_modules/zod/v4/classic/checks.js +1 -1
  547. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  548. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  549. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  550. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  551. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  552. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  553. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  554. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  555. package/node_modules/zod/v4/classic/errors.cjs +62 -34
  556. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  557. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  558. package/node_modules/zod/v4/classic/errors.js +43 -34
  559. package/node_modules/zod/v4/classic/external.cjs +51 -27
  560. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  561. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  562. package/node_modules/zod/v4/classic/external.js +5 -8
  563. package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
  564. package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
  565. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  566. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  567. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  568. package/node_modules/zod/v4/classic/in-out.js +36 -0
  569. package/node_modules/zod/v4/classic/index.cjs +21 -2
  570. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  571. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  572. package/node_modules/zod/v4/classic/index.js +2 -2
  573. package/node_modules/zod/v4/classic/iso.cjs +30 -22
  574. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  575. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  576. package/node_modules/zod/v4/classic/iso.js +2 -17
  577. package/node_modules/zod/v4/classic/parse.cjs +23 -1
  578. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  579. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  580. package/node_modules/zod/v4/classic/parse.js +1 -0
  581. package/node_modules/zod/v4/classic/schemas.cjs +591 -426
  582. package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
  583. package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
  584. package/node_modules/zod/v4/classic/schemas.js +564 -424
  585. package/node_modules/zod/v4/core/api.cjs +66 -24
  586. package/node_modules/zod/v4/core/api.d.cts +22 -12
  587. package/node_modules/zod/v4/core/api.d.ts +22 -12
  588. package/node_modules/zod/v4/core/api.js +44 -24
  589. package/node_modules/zod/v4/core/checks.cjs +88 -128
  590. package/node_modules/zod/v4/core/checks.d.cts +29 -13
  591. package/node_modules/zod/v4/core/checks.d.ts +29 -13
  592. package/node_modules/zod/v4/core/checks.js +68 -127
  593. package/node_modules/zod/v4/core/compile.cjs +1916 -0
  594. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  595. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  596. package/node_modules/zod/v4/core/compile.js +1866 -0
  597. package/node_modules/zod/v4/core/core.cjs +101 -19
  598. package/node_modules/zod/v4/core/core.d.cts +16 -4
  599. package/node_modules/zod/v4/core/core.d.ts +16 -4
  600. package/node_modules/zod/v4/core/core.js +83 -20
  601. package/node_modules/zod/v4/core/doc.cjs +31 -9
  602. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  603. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  604. package/node_modules/zod/v4/core/doc.js +12 -9
  605. package/node_modules/zod/v4/core/errors.cjs +126 -25
  606. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  607. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  608. package/node_modules/zod/v4/core/errors.js +107 -25
  609. package/node_modules/zod/v4/core/index.cjs +24 -1
  610. package/node_modules/zod/v4/core/index.d.cts +3 -0
  611. package/node_modules/zod/v4/core/index.d.ts +3 -0
  612. package/node_modules/zod/v4/core/index.js +3 -0
  613. package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
  614. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  615. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  616. package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  617. package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
  618. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  619. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  620. package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
  621. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  622. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  623. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  624. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  625. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  626. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  627. package/node_modules/zod/v4/core/memoizer.js +311 -0
  628. package/node_modules/zod/v4/core/parse.cjs +148 -46
  629. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  630. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  631. package/node_modules/zod/v4/core/parse.js +127 -45
  632. package/node_modules/zod/v4/core/regexes.cjs +54 -17
  633. package/node_modules/zod/v4/core/regexes.d.cts +5 -0
  634. package/node_modules/zod/v4/core/regexes.d.ts +5 -0
  635. package/node_modules/zod/v4/core/regexes.js +32 -15
  636. package/node_modules/zod/v4/core/registries.cjs +19 -0
  637. package/node_modules/zod/v4/core/registries.js +2 -2
  638. package/node_modules/zod/v4/core/schemas.cjs +815 -386
  639. package/node_modules/zod/v4/core/schemas.d.cts +126 -35
  640. package/node_modules/zod/v4/core/schemas.d.ts +126 -35
  641. package/node_modules/zod/v4/core/schemas.js +783 -386
  642. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  643. package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
  644. package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
  645. package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
  646. package/node_modules/zod/v4/core/to-json-schema.js +247 -44
  647. package/node_modules/zod/v4/core/util.cjs +387 -157
  648. package/node_modules/zod/v4/core/util.d.cts +81 -1
  649. package/node_modules/zod/v4/core/util.d.ts +81 -1
  650. package/node_modules/zod/v4/core/util.js +355 -156
  651. package/node_modules/zod/v4/core/versions.cjs +21 -2
  652. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  653. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  654. package/node_modules/zod/v4/core/versions.js +2 -2
  655. package/node_modules/zod/v4/core/visit.cjs +214 -0
  656. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  657. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  658. package/node_modules/zod/v4/core/visit.js +169 -0
  659. package/node_modules/zod/v4/index.cjs +34 -5
  660. package/node_modules/zod/v4/index.d.cts +2 -2
  661. package/node_modules/zod/v4/index.d.ts +2 -2
  662. package/node_modules/zod/v4/index.js +3 -2
  663. package/node_modules/zod/v4/locales/ar.cjs +5 -0
  664. package/node_modules/zod/v4/locales/ar.js +5 -0
  665. package/node_modules/zod/v4/locales/az.cjs +5 -0
  666. package/node_modules/zod/v4/locales/az.js +5 -0
  667. package/node_modules/zod/v4/locales/be.cjs +12 -0
  668. package/node_modules/zod/v4/locales/be.js +12 -0
  669. package/node_modules/zod/v4/locales/bg.cjs +5 -0
  670. package/node_modules/zod/v4/locales/bg.js +5 -0
  671. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  672. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  673. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  674. package/node_modules/zod/v4/locales/bn.js +113 -0
  675. package/node_modules/zod/v4/locales/ca.cjs +5 -0
  676. package/node_modules/zod/v4/locales/ca.js +5 -0
  677. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  678. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  679. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  680. package/node_modules/zod/v4/locales/ckb.js +133 -0
  681. package/node_modules/zod/v4/locales/cs.cjs +5 -0
  682. package/node_modules/zod/v4/locales/cs.js +5 -0
  683. package/node_modules/zod/v4/locales/da.cjs +7 -2
  684. package/node_modules/zod/v4/locales/da.js +7 -2
  685. package/node_modules/zod/v4/locales/de.cjs +5 -0
  686. package/node_modules/zod/v4/locales/de.js +5 -0
  687. package/node_modules/zod/v4/locales/el.cjs +3 -0
  688. package/node_modules/zod/v4/locales/el.js +3 -0
  689. package/node_modules/zod/v4/locales/en.cjs +16 -4
  690. package/node_modules/zod/v4/locales/en.js +16 -4
  691. package/node_modules/zod/v4/locales/eo.cjs +5 -0
  692. package/node_modules/zod/v4/locales/eo.js +5 -0
  693. package/node_modules/zod/v4/locales/es.cjs +4 -0
  694. package/node_modules/zod/v4/locales/es.js +4 -0
  695. package/node_modules/zod/v4/locales/fa.cjs +5 -0
  696. package/node_modules/zod/v4/locales/fa.js +5 -0
  697. package/node_modules/zod/v4/locales/fi.cjs +5 -0
  698. package/node_modules/zod/v4/locales/fi.js +5 -0
  699. package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
  700. package/node_modules/zod/v4/locales/fr-CA.js +5 -0
  701. package/node_modules/zod/v4/locales/fr.cjs +18 -14
  702. package/node_modules/zod/v4/locales/fr.js +18 -14
  703. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  704. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  705. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  706. package/node_modules/zod/v4/locales/gu.js +113 -0
  707. package/node_modules/zod/v4/locales/he.cjs +7 -0
  708. package/node_modules/zod/v4/locales/he.js +7 -0
  709. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  710. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  711. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  712. package/node_modules/zod/v4/locales/hi.js +111 -0
  713. package/node_modules/zod/v4/locales/hr.cjs +4 -0
  714. package/node_modules/zod/v4/locales/hr.js +4 -0
  715. package/node_modules/zod/v4/locales/hu.cjs +5 -0
  716. package/node_modules/zod/v4/locales/hu.js +5 -0
  717. package/node_modules/zod/v4/locales/hy.cjs +11 -0
  718. package/node_modules/zod/v4/locales/hy.js +11 -0
  719. package/node_modules/zod/v4/locales/id.cjs +5 -0
  720. package/node_modules/zod/v4/locales/id.js +5 -0
  721. package/node_modules/zod/v4/locales/index.cjs +43 -2
  722. package/node_modules/zod/v4/locales/index.d.cts +11 -0
  723. package/node_modules/zod/v4/locales/index.d.ts +11 -0
  724. package/node_modules/zod/v4/locales/index.js +11 -0
  725. package/node_modules/zod/v4/locales/is.cjs +5 -0
  726. package/node_modules/zod/v4/locales/is.js +5 -0
  727. package/node_modules/zod/v4/locales/it.cjs +5 -0
  728. package/node_modules/zod/v4/locales/it.js +5 -0
  729. package/node_modules/zod/v4/locales/ja.cjs +5 -0
  730. package/node_modules/zod/v4/locales/ja.js +5 -0
  731. package/node_modules/zod/v4/locales/ka.cjs +5 -0
  732. package/node_modules/zod/v4/locales/ka.js +5 -0
  733. package/node_modules/zod/v4/locales/km.cjs +5 -0
  734. package/node_modules/zod/v4/locales/km.js +5 -0
  735. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  736. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  737. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  738. package/node_modules/zod/v4/locales/kn.js +116 -0
  739. package/node_modules/zod/v4/locales/ko.cjs +5 -0
  740. package/node_modules/zod/v4/locales/ko.js +5 -0
  741. package/node_modules/zod/v4/locales/lt.cjs +4 -0
  742. package/node_modules/zod/v4/locales/lt.js +4 -0
  743. package/node_modules/zod/v4/locales/mk.cjs +5 -0
  744. package/node_modules/zod/v4/locales/mk.js +5 -0
  745. package/node_modules/zod/v4/locales/ms.cjs +5 -0
  746. package/node_modules/zod/v4/locales/ms.js +5 -0
  747. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  748. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  749. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  750. package/node_modules/zod/v4/locales/ne.js +111 -0
  751. package/node_modules/zod/v4/locales/nl.cjs +5 -0
  752. package/node_modules/zod/v4/locales/nl.js +5 -0
  753. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  754. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  755. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  756. package/node_modules/zod/v4/locales/nn.js +113 -0
  757. package/node_modules/zod/v4/locales/no.cjs +7 -2
  758. package/node_modules/zod/v4/locales/no.js +7 -2
  759. package/node_modules/zod/v4/locales/ota.cjs +5 -0
  760. package/node_modules/zod/v4/locales/ota.js +5 -0
  761. package/node_modules/zod/v4/locales/pl.cjs +5 -0
  762. package/node_modules/zod/v4/locales/pl.js +5 -0
  763. package/node_modules/zod/v4/locales/ps.cjs +5 -0
  764. package/node_modules/zod/v4/locales/ps.js +5 -0
  765. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  766. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  767. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  768. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  769. package/node_modules/zod/v4/locales/pt.cjs +89 -55
  770. package/node_modules/zod/v4/locales/pt.js +89 -55
  771. package/node_modules/zod/v4/locales/ro.cjs +3 -0
  772. package/node_modules/zod/v4/locales/ro.js +3 -0
  773. package/node_modules/zod/v4/locales/ru.cjs +12 -0
  774. package/node_modules/zod/v4/locales/ru.js +12 -0
  775. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  776. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  777. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  778. package/node_modules/zod/v4/locales/sk.js +116 -0
  779. package/node_modules/zod/v4/locales/sl.cjs +5 -0
  780. package/node_modules/zod/v4/locales/sl.js +5 -0
  781. package/node_modules/zod/v4/locales/sv.cjs +7 -2
  782. package/node_modules/zod/v4/locales/sv.js +7 -2
  783. package/node_modules/zod/v4/locales/ta.cjs +5 -0
  784. package/node_modules/zod/v4/locales/ta.js +5 -0
  785. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  786. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  787. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  788. package/node_modules/zod/v4/locales/tg.js +117 -0
  789. package/node_modules/zod/v4/locales/th.cjs +5 -0
  790. package/node_modules/zod/v4/locales/th.js +5 -0
  791. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  792. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  793. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  794. package/node_modules/zod/v4/locales/tk.js +107 -0
  795. package/node_modules/zod/v4/locales/tr.cjs +5 -0
  796. package/node_modules/zod/v4/locales/tr.js +5 -0
  797. package/node_modules/zod/v4/locales/uk.cjs +5 -0
  798. package/node_modules/zod/v4/locales/uk.js +5 -0
  799. package/node_modules/zod/v4/locales/ur.cjs +5 -0
  800. package/node_modules/zod/v4/locales/ur.js +5 -0
  801. package/node_modules/zod/v4/locales/uz.cjs +3 -0
  802. package/node_modules/zod/v4/locales/uz.js +3 -0
  803. package/node_modules/zod/v4/locales/vi.cjs +5 -0
  804. package/node_modules/zod/v4/locales/vi.js +5 -0
  805. package/node_modules/zod/v4/locales/yo.cjs +5 -0
  806. package/node_modules/zod/v4/locales/yo.js +5 -0
  807. package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
  808. package/node_modules/zod/v4/locales/zh-CN.js +5 -0
  809. package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
  810. package/node_modules/zod/v4/locales/zh-TW.js +5 -0
  811. package/node_modules/zod/v4/mini/checks.cjs +21 -1
  812. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  813. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  814. package/node_modules/zod/v4/mini/checks.js +1 -1
  815. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  816. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  817. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  818. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  819. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  820. package/node_modules/zod/v4/mini/external.cjs +33 -1
  821. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  822. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  823. package/node_modules/zod/v4/mini/external.js +3 -1
  824. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  825. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  826. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  827. package/node_modules/zod/v4/mini/in-out.js +36 -0
  828. package/node_modules/zod/v4/mini/index.cjs +19 -0
  829. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  830. package/node_modules/zod/v4/mini/parse.cjs +22 -1
  831. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  832. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  833. package/node_modules/zod/v4/mini/parse.js +1 -1
  834. package/node_modules/zod/v4/mini/schemas.cjs +117 -53
  835. package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
  836. package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
  837. package/node_modules/zod/v4/mini/schemas.js +92 -51
  838. package/node_modules/zod/v4-mini/index.cjs +19 -0
  839. package/package.json +14 -14
  840. package/node_modules/@zuplo/runtime/out/esm/chunk-DVFQRFED.js.map +0 -1
  841. package/node_modules/@zuplo/runtime/out/esm/chunk-FQIUJWH2.js +0 -105
  842. package/node_modules/@zuplo/runtime/out/esm/chunk-FQIUJWH2.js.map +0 -1
  843. package/node_modules/simple-git/dist/cjs/index.js +0 -4898
  844. package/node_modules/simple-git/dist/cjs/index.js.map +0 -7
  845. package/node_modules/simple-git/dist/esm/index.js +0 -4745
  846. package/node_modules/simple-git/dist/esm/index.js.map +0 -7
  847. package/node_modules/simple-git/dist/esm/package.json +0 -3
  848. package/node_modules/simple-git/dist/src/lib/responses/CheckIgnore.d.ts +0 -4
  849. package/node_modules/simple-git/dist/src/lib/runners/promise-wrapped.d.ts +0 -2
  850. package/node_modules/simple-git/dist/typings/errors.d.ts +0 -5
  851. package/node_modules/simple-git/dist/typings/index.d.ts +0 -14
  852. package/node_modules/simple-git/dist/typings/response.d.ts +0 -556
  853. package/node_modules/simple-git/dist/typings/simple-git.d.ts +0 -1033
  854. package/node_modules/simple-git/dist/typings/types.d.ts +0 -22
  855. package/node_modules/simple-git/promise.js +0 -17
  856. package/node_modules/zod/src/v4/core/config.ts +0 -15
  857. /package/node_modules/@zuplo/runtime/out/esm/{chunk-DVFQRFED.js.LEGAL.txt → chunk-NWYAKCSU.js.LEGAL.txt} +0 -0
  858. /package/node_modules/@zuplo/runtime/out/esm/{chunk-FQIUJWH2.js.LEGAL.txt → chunk-PXS4NOKU.js.LEGAL.txt} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/cmds/lint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAUV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA2Df,OAAO;;AA9D/B,wBAkEE"}
1
+ {"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/cmds/lint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAQV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAsDf,OAAO;;AAzD/B,wBA6DE"}
package/dist/cmds/lint.js CHANGED
@@ -1,7 +1,5 @@
1
1
  import { captureEvent } from "../common/analytics/lib.js";
2
2
  import { identify } from "../common/middleware/user-identification.js";
3
- import { ZuploProjectValidator } from "../common/validators/file-system-validator.js";
4
- import { YargsChecker } from "../common/validators/lib.js";
5
3
  import { lint } from "../lint/handler.js";
6
4
  export default {
7
5
  desc: "Lints your OpenAPI specs and policies for errors and Zuplo conventions",
@@ -54,9 +52,6 @@ export default {
54
52
  "Emit SARIF for GitHub Code Scanning",
55
53
  ],
56
54
  ])
57
- .check(async (argv) => {
58
- return await new YargsChecker(new ZuploProjectValidator()).check(argv);
59
- })
60
55
  .middleware([identify]);
61
56
  },
62
57
  handler: async (argv) => {
@@ -1 +1 @@
1
- {"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/cmds/lint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAa,IAAI,EAAE,MAAM,oBAAoB,CAAC;AA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O,MAAM,IAAI,YAAY,CAC3B,IAAI,qBAAqB,EAAE,CAC5B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;aACD,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,IAAiB,CAAC,CAAC;IAChC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport { ZuploProjectValidator } from \"../common/validators/file-system-validator.js\";\nimport { YargsChecker } from \"../common/validators/lib.js\";\nimport { Arguments, lint } from \"../lint/handler.js\";\n\nexport default {\n desc: \"Lints your OpenAPI specs and policies for errors and Zuplo conventions\",\n command: \"lint\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 lint [options]\")\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your Zuplo API\",\n default: \".\",\n normalize: true,\n })\n .option(\"config\", {\n type: \"string\",\n describe:\n \"Path to a lint config file. Defaults to zuplo.lint.jsonc or zuplo.lint.json in the project directory.\",\n normalize: true,\n })\n .option(\"format\", {\n type: \"string\",\n describe: \"Output format\",\n choices: [\"text\", \"json\", \"sarif\"],\n default: \"text\",\n })\n .option(\"fail-on\", {\n type: \"string\",\n describe:\n \"Severity threshold that fails the command. Defaults to the failOn value in your lint config, or 'error'.\",\n choices: [\"error\", \"warn\", \"none\"],\n })\n .option(\"fix\", {\n type: \"boolean\",\n describe:\n \"Rewrite your OpenAPI files to fix what can be fixed automatically, then report what is left\",\n default: false,\n })\n .option(\"lint-binary\", {\n type: \"string\",\n describe:\n \"Path to a zuplo-lint executable to use instead of the one installed with the CLI\",\n normalize: true,\n hidden: true,\n })\n .example([\n [\"$0 lint\", \"Lint the project in the current directory\"],\n [\"$0 lint --fix\", \"Apply the fixes that can be made automatically\"],\n [\n \"$0 lint --fail-on warn\",\n \"Fail the command on warnings as well as errors\",\n ],\n [\n \"$0 lint --format sarif > results.sarif\",\n \"Emit SARIF for GitHub Code Scanning\",\n ],\n ])\n .check(async (argv) => {\n return await new YargsChecker<typeof argv>(\n new ZuploProjectValidator()\n ).check(argv);\n })\n .middleware([identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo lint\" });\n await lint(argv as Arguments);\n },\n};\n"]}
1
+ {"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/cmds/lint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAa,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAErD,eAAe;IACb,IAAI,EAAE,wEAAwE;IAC9E,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,mBAAmB,CAAC;aAC1B,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,yCAAyC;YACnD,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,IAAI;SAChB,CAAC;aACD,MAAM,CAAC,QAAQ,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EACN,uGAAuG;YACzG,SAAS,EAAE,IAAI;SAChB,CAAC;aACD,MAAM,CAAC,QAAQ,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;YAClC,OAAO,EAAE,MAAM;SAChB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EACN,0GAA0G;YAC5G,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;SACnC,CAAC;aACD,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,SAAS;YACf,QAAQ,EACN,6FAA6F;YAC/F,OAAO,EAAE,KAAK;SACf,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EACN,kFAAkF;YACpF,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,IAAI;SACb,CAAC;aACD,OAAO,CAAC;YACP,CAAC,SAAS,EAAE,2CAA2C,CAAC;YACxD,CAAC,eAAe,EAAE,gDAAgD,CAAC;YACnE;gBACE,wBAAwB;gBACxB,gDAAgD;aACjD;YACD;gBACE,wCAAwC;gBACxC,qCAAqC;aACtC;SACF,CAAC;aACD,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,IAAiB,CAAC,CAAC;IAChC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport { Arguments, lint } from \"../lint/handler.js\";\n\nexport default {\n desc: \"Lints your OpenAPI specs and policies for errors and Zuplo conventions\",\n command: \"lint\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 lint [options]\")\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your Zuplo API\",\n default: \".\",\n normalize: true,\n })\n .option(\"config\", {\n type: \"string\",\n describe:\n \"Path to a lint config file. Defaults to zuplo.lint.jsonc or zuplo.lint.json in the project directory.\",\n normalize: true,\n })\n .option(\"format\", {\n type: \"string\",\n describe: \"Output format\",\n choices: [\"text\", \"json\", \"sarif\"],\n default: \"text\",\n })\n .option(\"fail-on\", {\n type: \"string\",\n describe:\n \"Severity threshold that fails the command. Defaults to the failOn value in your lint config, or 'error'.\",\n choices: [\"error\", \"warn\", \"none\"],\n })\n .option(\"fix\", {\n type: \"boolean\",\n describe:\n \"Rewrite your OpenAPI files to fix what can be fixed automatically, then report what is left\",\n default: false,\n })\n .option(\"lint-binary\", {\n type: \"string\",\n describe:\n \"Path to a zuplo-lint executable to use instead of the one installed with the CLI\",\n normalize: true,\n hidden: true,\n })\n .example([\n [\"$0 lint\", \"Lint the project in the current directory\"],\n [\"$0 lint --fix\", \"Apply the fixes that can be made automatically\"],\n [\n \"$0 lint --fail-on warn\",\n \"Fail the command on warnings as well as errors\",\n ],\n [\n \"$0 lint --format sarif > results.sarif\",\n \"Emit SARIF for GitHub Code Scanning\",\n ],\n ])\n .middleware([identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo lint\" });\n await lint(argv as Arguments);\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/lint/handler.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AASD,wBAAsB,IAAI,CAAC,IAAI,EAAE,SAAS,iBAqDzC"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/lint/handler.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AASD,wBAAsB,IAAI,CAAC,IAAI,EAAE,SAAS,iBAgEzC"}
@@ -2,10 +2,19 @@ import path from "node:path";
2
2
  import { execa } from "execa";
3
3
  import { shutdownAnalytics } from "../common/analytics/lib.js";
4
4
  import { printCriticalFailureToConsole } from "../common/output.js";
5
+ import { ZuploProjectValidator } from "../common/validators/file-system-validator.js";
5
6
  import { LintBinaryNotFoundError, resolveLintBinary, } from "./resolve-binary.js";
6
7
  const EXIT_VIOLATIONS_FOUND = 1;
7
8
  const EXIT_RUN_FAILED = 2;
8
9
  export async function lint(argv) {
10
+ const project = await new ZuploProjectValidator().validate({
11
+ dir: argv.dir,
12
+ });
13
+ if (!project.ok) {
14
+ printCriticalFailureToConsole(project.error.message);
15
+ await exit(EXIT_RUN_FAILED);
16
+ return;
17
+ }
9
18
  let binary;
10
19
  try {
11
20
  binary = resolveLintBinary({ override: argv.lintBinary });
@@ -1 +1 @@
1
- {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../src/lint/handler.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAe7B,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,eAAe,GAAG,CAAC,CAAC;AAE1B,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,IAAe;IACxC,IAAI,MAAc,CAAC;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,iBAAiB,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,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AAe,CAAC,CAAC;YAC5B,OAAO;QACT,CAAC;QAKD,IAAI,QAAQ,KAAK,qBAAqB,EAAE,CAAC;YACvC,6BAA6B,CAC3B,iCAAiC,QAAQ,IAAI,CAC9C,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAQD,KAAK,UAAU,IAAI,CAAC,IAAY;IAC9B,MAAM,iBAAiB,EAAE,CAAC;IAC1B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC;AAOD,SAAS,aAAa,CAAC,GAAY;IACjC,IAAI,GAAG,YAAY,KAAK,IAAI,UAAU,IAAI,GAAG,EAAE,CAAC;QAC9C,MAAM,EAAE,QAAQ,EAAE,GAAG,GAA4B,CAAC;QAClD,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import path from \"node:path\";\nimport { execa } from \"execa\";\nimport { shutdownAnalytics } from \"../common/analytics/lib.js\";\nimport { printCriticalFailureToConsole } from \"../common/output.js\";\nimport {\n LintBinaryNotFoundError,\n resolveLintBinary,\n} from \"./resolve-binary.js\";\n\nexport interface Arguments {\n dir: string;\n config?: string;\n format: string;\n failOn?: string;\n fix: boolean;\n lintBinary?: string;\n}\n\n/**\n * Exit codes, matching the linter's own contract so CI can tell the two apart:\n * 1 means the project has violations, 2 means the linter could not run.\n */\nconst EXIT_VIOLATIONS_FOUND = 1;\nconst EXIT_RUN_FAILED = 2;\n\nexport async function lint(argv: Arguments) {\n let binary: string;\n try {\n binary = resolveLintBinary({ override: argv.lintBinary });\n } catch (err) {\n if (err instanceof LintBinaryNotFoundError) {\n printCriticalFailureToConsole(err.message);\n await exit(EXIT_RUN_FAILED);\n return;\n }\n throw err;\n }\n\n const args = [\"--dir\", path.resolve(argv.dir), \"--format\", argv.format];\n if (argv.config) {\n args.push(\"--config\", path.resolve(argv.config));\n }\n if (argv.failOn) {\n args.push(\"--fail-on\", argv.failOn);\n }\n if (argv.fix) {\n args.push(\"--fix\");\n }\n\n try {\n // The linter writes its own report — results to stdout, diagnostics to\n // stderr — so inherit the streams rather than buffering and re-printing.\n // That also leaves its color and TTY detection intact.\n await execa(binary, args, { stdio: \"inherit\" });\n return;\n } catch (cause) {\n const exitCode = childExitCode(cause);\n\n if (exitCode === undefined) {\n printCriticalFailureToConsole(\n `Could not run the linter at ${binary}.\\n` +\n `${cause instanceof Error ? cause.message : String(cause)}`\n );\n await exit(EXIT_RUN_FAILED);\n return;\n }\n\n // Anything other than \"violations found\" means the linter itself failed.\n // Its diagnostic already went to stderr, but on its own that reads like a\n // lint result rather than a broken invocation.\n if (exitCode !== EXIT_VIOLATIONS_FOUND) {\n printCriticalFailureToConsole(\n `Lint failed to run (exit code ${exitCode}).`\n );\n }\n\n await exit(exitCode);\n }\n}\n\n/**\n * Exit with the linter's own status rather than throwing. Throwing would send\n * this through cli.ts's catch, which prints a redundant error and dumps the\n * help text on top of a report the user has already read. Matches how\n * `zuplo test` propagates a failing run.\n */\nasync function exit(code: number): Promise<never> {\n await shutdownAnalytics();\n process.exit(code);\n}\n\n/**\n * The child's exit status, or undefined when the process never ran. execa types\n * `exitCode` as a number, but a spawn failure — the file is not executable, or\n * is a binary for another architecture — produces an error without one.\n */\nfunction childExitCode(err: unknown): number | undefined {\n if (err instanceof Error && \"exitCode\" in err) {\n const { exitCode } = err as { exitCode: unknown };\n return typeof exitCode === \"number\" ? exitCode : undefined;\n }\n return undefined;\n}\n"]}
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../src/lint/handler.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC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K,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import path from \"node:path\";\nimport { execa } from \"execa\";\nimport { shutdownAnalytics } from \"../common/analytics/lib.js\";\nimport { printCriticalFailureToConsole } from \"../common/output.js\";\nimport { ZuploProjectValidator } from \"../common/validators/file-system-validator.js\";\nimport {\n LintBinaryNotFoundError,\n resolveLintBinary,\n} from \"./resolve-binary.js\";\n\nexport interface Arguments {\n dir: string;\n config?: string;\n format: string;\n failOn?: string;\n fix: boolean;\n lintBinary?: string;\n}\n\n/**\n * Exit codes, matching the linter's own contract so CI can tell the two apart:\n * 1 means the project has violations, 2 means the linter could not run.\n */\nconst EXIT_VIOLATIONS_FOUND = 1;\nconst EXIT_RUN_FAILED = 2;\n\nexport async function lint(argv: Arguments) {\n // Checked here rather than in a yargs .check(): a failed check exits 1 via\n // cli.ts, which CI cannot tell apart from \"violations found\".\n const project = await new ZuploProjectValidator().validate({\n dir: argv.dir,\n });\n if (!project.ok) {\n printCriticalFailureToConsole(project.error.message);\n await exit(EXIT_RUN_FAILED);\n return;\n }\n\n let binary: string;\n try {\n binary = resolveLintBinary({ override: argv.lintBinary });\n } catch (err) {\n if (err instanceof LintBinaryNotFoundError) {\n printCriticalFailureToConsole(err.message);\n await exit(EXIT_RUN_FAILED);\n return;\n }\n throw err;\n }\n\n const args = [\"--dir\", path.resolve(argv.dir), \"--format\", argv.format];\n if (argv.config) {\n args.push(\"--config\", path.resolve(argv.config));\n }\n if (argv.failOn) {\n args.push(\"--fail-on\", argv.failOn);\n }\n if (argv.fix) {\n args.push(\"--fix\");\n }\n\n try {\n // The linter writes its own report — results to stdout, diagnostics to\n // stderr — so inherit the streams rather than buffering and re-printing.\n // That also leaves its color and TTY detection intact.\n await execa(binary, args, { stdio: \"inherit\" });\n return;\n } catch (cause) {\n const exitCode = childExitCode(cause);\n\n if (exitCode === undefined) {\n printCriticalFailureToConsole(\n `Could not run the linter at ${binary}.\\n` +\n `${cause instanceof Error ? cause.message : String(cause)}`\n );\n await exit(EXIT_RUN_FAILED);\n return;\n }\n\n // Anything other than \"violations found\" means the linter itself failed.\n // Its diagnostic already went to stderr, but on its own that reads like a\n // lint result rather than a broken invocation.\n if (exitCode !== EXIT_VIOLATIONS_FOUND) {\n printCriticalFailureToConsole(\n `Lint failed to run (exit code ${exitCode}).`\n );\n }\n\n await exit(exitCode);\n }\n}\n\n/**\n * Exit with the linter's own status rather than throwing. Throwing would send\n * this through cli.ts's catch, which prints a redundant error and dumps the\n * help text on top of a report the user has already read. Matches how\n * `zuplo test` propagates a failing run.\n */\nasync function exit(code: number): Promise<never> {\n await shutdownAnalytics();\n process.exit(code);\n}\n\n/**\n * The child's exit status, or undefined when the process never ran. execa types\n * `exitCode` as a number, but a spawn failure — the file is not executable, or\n * is a binary for another architecture — produces an error without one.\n */\nfunction childExitCode(err: unknown): number | undefined {\n if (err instanceof Error && \"exitCode\" in err) {\n const { exitCode } = err as { exitCode: unknown };\n return typeof exitCode === \"number\" ? exitCode : undefined;\n }\n return undefined;\n}\n"]}
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Steve King
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@simple-git/args-pathspec");function*v(e,t){const n=t==="global";for(const o of e)o.isGlobal===n&&(yield o)}const S=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),P=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),E=new Set(["edit","remove-section","rename-section","set","unset"]),A=new Set(["get","get-color","get-colorbool","list"]);function F(e,t){for(const{name:o}of v(e,"task")){if(S.has(o))return p(!0,t);if(P.has(o))return p(!1,t)}const n=t.at(0)?.toLowerCase();return n===void 0?null:E.has(n)?p(!0,t.slice(1)):A.has(n)?p(!1,t.slice(1)):t.length===1?p(!1,t):p(!0,t)}function p(e=!1,t=[]){const n=t.at(0)?.toLowerCase();return n===void 0?null:{isWrite:e,isRead:!e,key:n,value:t.at(1)}}function M(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function N(e){const t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function O(e){for(const{name:t}of v(e,"task"))switch(t){case"--global":return"global";case"--system":return"system";case"--worktree":return"worktree";case"--local":return"local";case"--file":case"-f":return"file"}return"local"}function G({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*L(e){for(const t of e){const n=G(t),o=n&&N(t.value);o&&(yield{...o,scope:n})}}function $(e,t,n){const o={read:[],write:[...L(t)]};return e==="config"&&D(o,O(t),F(t,n)),o}function D(e,t,n){if(n===null)return;const o=M(t,n);n.isWrite?e.write.push(o):e.read.push(o)}const U={short:new Map([["c",!0]])},T={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...U.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},R={clone:{short:new Map([["b",!0],["j",!0],["l",!1],["n",!1],["o",!0],["q",!1],["s",!1],["u",!0]]),long:new Set(["branch","config","jobs","origin","upload-pack","u","template"])},commit:{short:new Map([["C",!0],["F",!0],["c",!0],["m",!0],["t",!0]]),long:new Set(["file","message","reedit-message","reuse-message","template"])},config:{short:new Map([["e",!1],["f",!0],["l",!1]]),long:new Set(["blob","comment","default","file","type","value"])},fetch:{short:new Map,long:new Set(["upload-pack"])},init:{short:new Map,long:new Set(["template"])},pull:{short:new Map,long:new Set(["upload-pack"])},push:{short:new Map,long:new Set(["exec","receive-pack"])}},I={short:new Map,long:new Set};function j(e){const t=R[e??""]??I;return{short:new Map([...U.short.entries(),...t.short.entries()]),long:t.long}}function b(e,t=T){if(e.startsWith("--")){const n=e.indexOf("=");if(n>2)return[{name:e.slice(0,n),value:e.slice(n+1),needsNext:!1}];const o=e.slice(2);return[{name:e,needsNext:t.long.has(o)}]}if(e.length===2){const n=e.charAt(1),o=t.short.get(n);return[{name:e,needsNext:o===!0}]}return W(e,t.short)}function W(e,t){const n=e.slice(1).split(""),o=[];for(let s=0;s<n.length;s++){const r=n[s],a=t.get(r);if(a===void 0)return[{name:e,needsNext:!1}];if(a){const l=n.slice(s+1).join("");if(l&&![...l].every(m=>t.has(m)))return o.push({name:`-${r}`,value:l,needsNext:!1}),o}o.push({name:`-${r}`,needsNext:a})}return o}function B(e,t=[]){let n=0;for(;n<e.length;){const o=String(e[n]);if(!o.startsWith("-")||o.length<2)break;const s=b(o);let r=n+1;for(const a of s){const l={name:a.name,value:a.value,absorbedNext:!1,isGlobal:!0};a.needsNext&&l.value===void 0&&r<e.length&&(l.value=String(e[r]),l.absorbedNext=!0,r++),t.push(l)}n=r}return{flags:t,taskIndex:n}}function q(e,t,n=[]){const o=j(t),s=[],r=[];let a=0;for(;a<e.length;){const l=e[a];if(h.isPathSpec(l)){r.push(...h.toPaths(l)),a++;continue}const f=String(l);if(f==="--"){for(let g=a+1;g<e.length;g++){const u=e[g];h.isPathSpec(u)?r.push(...h.toPaths(u)):r.push(String(u))}break}if(!f.startsWith("-")||f.length<2){s.push(f),a++;continue}const m=b(f,o);let d=a+1;for(const g of m){const u={name:g.name,value:g.value,absorbedNext:!1,isGlobal:!1};g.needsNext&&u.value===void 0&&d<e.length&&!h.isPathSpec(e[d])&&(u.value=String(e[d]),u.absorbedNext=!0,d++),n.push(u)}a=d}return{flags:n,positionals:s,pathspecs:r}}function*V({write:e}){for(const t of e)for(const n of K){const o=n(t.key);o&&(yield o)}}function c(e,t,n=String(e)){const o=typeof e=="string"?new RegExp(`\\s*${e.toLowerCase()}`):e;return function(r){if(o.test(r))return{category:t,message:`Configuring ${n} is not permitted without enabling ${t}`}}}function i(e,t){const n=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return c(n,t,e)}const K=[c("alias","allowUnsafeAlias"),c("core.askPass","allowUnsafeAskPass"),c("core.editor","allowUnsafeEditor"),c("core.fsmonitor","allowUnsafeFsMonitor"),c("core.gitProxy","allowUnsafeGitProxy"),c("core.hooksPath","allowUnsafeHooksPath"),c("core.pager","allowUnsafePager"),c("core.sshCommand","allowUnsafeSshCommand"),i("credential.helper","allowUnsafeCredentialHelper"),i("diff.command","allowUnsafeDiffExternal"),c("diff.external","allowUnsafeDiffExternal"),i("diff.textconv","allowUnsafeDiffTextConv"),i("filter.clean","allowUnsafeFilter"),i("filter.smudge","allowUnsafeFilter"),i("gpg.program","allowUnsafeGpgProgram"),c("init.templateDir","allowUnsafeTemplateDir"),i("merge.driver","allowUnsafeMergeDriver"),i("mergetool.path","allowUnsafeMergeDriver"),i("mergetool.cmd","allowUnsafeMergeDriver"),i("protocol.allow","allowUnsafeProtocolOverride"),i("remote.receivepack","allowUnsafePack"),i("remote.uploadpack","allowUnsafePack"),c("sequence.editor","allowUnsafeEditor")];function*H(e,t){for(const n of t)for(const o of Y){const s=o(e,n.name);s&&(yield s)}}function w(e,t,n,o=String(t)){const s=typeof t=="string"?new RegExp(`\\s*${t.toLowerCase()}`):t,r=`Use of ${e?`${e} with option `:""}${o} is not permitted without enabling ${n}`;return function(l,f){if((!e||l===e)&&s.test(f))return{category:n,message:r}}}const Y=[w(null,/--(upload|receive)-pack/,"allowUnsafePack","--upload-pack or --receive-pack"),w("clone",/^-\w*u/,"allowUnsafePack"),w("clone","--u","allowUnsafePack"),w("push","--exec","allowUnsafePack"),w(null,"--template","allowUnsafeTemplateDir")];function C(e,t,n){return[...H(e,t),...V(n)]}function x(...e){const{flags:t,taskIndex:n}=B(e),o=n<e.length?String(e[n]).toLowerCase():null,s=o!==null?e.slice(n+1):[],{positionals:r,pathspecs:a}=q(s,o,t),l=$(o,t,r);return{task:o,flags:t.map(J),paths:a,config:l,vulnerabilities:z(C(o,t,l))}}function z(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function J({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}const y={editor:"allowUnsafeEditor",git_askpass:"allowUnsafeAskPass",git_config_global:"allowUnsafeConfigPaths",git_config_system:"allowUnsafeConfigPaths",git_config_count:"allowUnsafeConfigEnvCount",git_config:"allowUnsafeConfigPaths",git_editor:"allowUnsafeEditor",git_exec_path:"allowUnsafeConfigPaths",git_external_diff:"allowUnsafeDiffExternal",git_pager:"allowUnsafePager",git_proxy_command:"allowUnsafeGitProxy",git_template_dir:"allowUnsafeTemplateDir",git_sequence_editor:"allowUnsafeEditor",git_ssh:"allowUnsafeSshCommand",git_ssh_command:"allowUnsafeSshCommand",pager:"allowUnsafePager",prefix:"allowUnsafeConfigPaths",ssh_askpass:"allowUnsafeAskPass"};function*Q(e){const t=parseInt(e.git_config_count??"0",10);for(let n=0;n<t;n++){const o=e[`git_config_key_${n}`],s=e[`git_config_value_${n}`];o!==void 0&&(yield{key:o.toLowerCase().trim(),value:s,scope:"env"})}}function*X(e){for(const t of Object.keys(e))if(k(t)){const n=y[t];yield{category:n,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${n}`}}}function k(e){return Object.hasOwn(y,e)}function Z(e){const t={};for(const[n,o]of Object.entries(e)){const s=n.toLowerCase().trim();(k(s)||s.startsWith("git"))&&(t[s]=String(o))}return t}function _(e){const t=Z(e),n={read:[],write:[...Q(t)]},o=[...X(t),...C(null,[],n)];return{config:n,vulnerabilities:o}}function ee(e,t){return[...x(...e).vulnerabilities,..._(t).vulnerabilities]}exports.parseArgv=x;exports.parseEnv=_;exports.vulnerabilityCheck=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("@simple-git/args-pathspec");function*x(e,t){const n=t==="global";for(const a of e)a.isGlobal===n&&(yield a)}const S=new Set(["--add","--edit","--remove-section","--rename-section","--replace-all","--unset","--unset-all","-e"]),E=new Set(["--get","--get-all","--get-color","--get-colorbool","--get-regexp","--get-urlmatch","--list","-l"]),F=new Set(["edit","remove-section","rename-section","set","unset"]),A=new Set(["get","get-color","get-colorbool","list"]);function O(e,t){for(const{name:a}of x(e,"task")){if(S.has(a))return w(!0,t);if(E.has(a))return w(!1,t)}const n=t.at(0)?.toLowerCase();return n===void 0?null:F.has(n)?w(!0,t.slice(1)):A.has(n)?w(!1,t.slice(1)):t.length===1?w(!1,t):w(!0,t)}function w(e=!1,t=[]){const n=t.at(0)?.toLowerCase();return n===void 0?null:{isWrite:e,isRead:!e,key:n,value:t.at(1)}}function G(e,t){return t.isWrite&&t.value!==void 0?{key:t.key,value:t.value,scope:e}:{key:t.key,scope:e}}function M(e){const t=e?.indexOf("=")||-1;return!e||t<0?null:{key:e.slice(0,t).trim().toLowerCase(),value:e.slice(t+1)}}function N(e){for(const{name:t}of x(e,"task"))switch(t){case"--global":return"global";case"--system":return"system";case"--worktree":return"worktree";case"--local":return"local";case"--file":case"-f":return"file"}return"local"}function $({name:e}){if(e==="-c"||e==="--config")return"inline";if(e==="--config-env")return"env"}function*D(e){for(const t of e){const n=$(t),a=n&&M(t.value);a&&(yield{...a,scope:n})}}function L(e,t,n){const a={read:[],write:[...D(t)]};return e==="config"&&I(a,N(t),O(t,n)),a}function I(e,t,n){if(n===null)return;const a=G(t,n);n.isWrite?e.write.push(a):e.read.push(a)}const b={short:new Map([["c",!0]])},T={short:new Map([["C",!0],["P",!1],["h",!1],["p",!1],["v",!1],...b.short.entries()]),long:new Set(["attr-source","config-env","exec-path","git-dir","list-cmds","namespace","super-prefix","work-tree"])},R={clone:{short:new Map([["b",!0],["j",!0],["l",!1],["n",!1],["o",!0],["q",!1],["s",!1],["u",!0]]),long:new Set(["branch","config","jobs","origin","upload-pack","u","template"])},commit:{short:new Map([["C",!0],["F",!0],["c",!0],["m",!0],["t",!0]]),long:new Set(["file","message","reedit-message","reuse-message","template"])},config:{short:new Map([["e",!1],["f",!0],["l",!1]]),long:new Set(["blob","comment","default","file","type","value"])},fetch:{short:new Map,long:new Set(["upload-pack"])},init:{short:new Map,long:new Set(["template"])},pull:{short:new Map,long:new Set(["upload-pack"])},push:{short:new Map,long:new Set(["exec","receive-pack"])},rebase:{short:new Map([["X",!0],["f",!1],["i",!1],["k",!1],["m",!1],["n",!1],["q",!1],["r",!1],["s",!0],["v",!1],["x",!0]]),long:new Set(["exec","onto","strategy","strategy-option"])}},j={short:new Map,long:new Set};function B(e){const t=R[e??""]??j;return{short:new Map([...b.short.entries(),...t.short.entries()]),long:t.long}}function C(e,t=T){if(e.startsWith("--")){const n=e.indexOf("=");if(n>2)return[{name:e.slice(0,n),value:e.slice(n+1),needsNext:!1}];const a=e.slice(2);return[{name:e,needsNext:t.long.has(a)}]}if(e.length===2){const n=e.charAt(1),a=t.short.get(n);return[{name:e,needsNext:a===!0}]}return W(e,t.short)}function W(e,t){const n=e.slice(1).split(""),a=[];for(let o=0;o<n.length;o++){const s=n[o],r=t.get(s);if(r===void 0)return[{name:e,needsNext:!1}];if(r){const i=n.slice(o+1).join("");if(i&&![...i].every(h=>t.has(h)))return a.push({name:`-${s}`,value:i,needsNext:!1}),a}a.push({name:`-${s}`,needsNext:r})}return a}function q(e,t=[]){let n=0;for(;n<e.length;){const a=String(e[n]);if(!a.startsWith("-")||a.length<2)break;const o=C(a);let s=n+1;for(const r of o){const i={name:r.name,value:r.value,absorbedNext:!1,isGlobal:!0};r.needsNext&&i.value===void 0&&s<e.length&&(i.value=String(e[s]),i.absorbedNext=!0,s++),t.push(i)}n=s}return{flags:t,taskIndex:n}}function V(e,t,n=[]){const a=B(t),o=[],s=[];let r=0;for(;r<e.length;){const i=e[r];if(m.isPathSpec(i)){s.push(...m.toPaths(i)),r++;continue}const p=String(i);if(p==="--"){for(let d=r+1;d<e.length;d++){const g=e[d];m.isPathSpec(g)?s.push(...m.toPaths(g)):s.push(String(g))}break}if(!p.startsWith("-")||p.length<2){o.push(p),r++;continue}const h=C(p,a);let u=r+1;for(const d of h){const g={name:d.name,value:d.value,absorbedNext:!1,isGlobal:!1};d.needsNext&&g.value===void 0&&u<e.length&&!m.isPathSpec(e[u])&&(g.value=String(e[u]),g.absorbedNext=!0,u++),n.push(g)}r=u}return{flags:n,positionals:o,pathspecs:s}}function*K({write:e}){for(const t of e)for(const n of H){const a=n(t.key);a&&(yield a)}}function f(e,t,n=String(e)){const a=typeof e=="string"?new RegExp(`\\s*${e.toLowerCase()}`):e;return function(s){if(a.test(s))return{category:t,message:`Configuring ${n} is not permitted without enabling ${t}`}}}function l(e,t){const n=new RegExp(`\\s*${e.toLowerCase().replace(/\./g,"(..+)?.")}`);return f(n,t,e)}const H=[f("alias","allowUnsafeAlias"),f("core.askPass","allowUnsafeAskPass"),f("core.editor","allowUnsafeEditor"),f("core.fsmonitor","allowUnsafeFsMonitor"),f("core.gitProxy","allowUnsafeGitProxy"),f("core.hooksPath","allowUnsafeHooksPath"),f("core.pager","allowUnsafePager"),f("core.sshCommand","allowUnsafeSshCommand"),l("credential.helper","allowUnsafeCredentialHelper"),l("diff.command","allowUnsafeDiffExternal"),f("diff.external","allowUnsafeDiffExternal"),l("difftool.cmd","allowUnsafeDiffExternal"),l("diff.textconv","allowUnsafeDiffTextConv"),l("filter.clean","allowUnsafeFilter"),l("filter.process","allowUnsafeFilter"),l("filter.smudge","allowUnsafeFilter"),l("gpg.program","allowUnsafeGpgProgram"),f("include.path","allowUnsafeInclude"),l("includeIf","allowUnsafeInclude"),f("init.templateDir","allowUnsafeTemplateDir"),l("pager.","allowUnsafePager"),l("merge.driver","allowUnsafeMergeDriver"),l("mergetool.path","allowUnsafeMergeDriver"),l("mergetool.cmd","allowUnsafeMergeDriver"),l("protocol.allow","allowUnsafeProtocolOverride"),l("remote.receivepack","allowUnsafePack"),l("remote.uploadpack","allowUnsafePack"),f("uploadpack.packObjectsHook","allowUnsafePack"),f("sequence.editor","allowUnsafeEditor"),l("submodule.update","allowUnsafeSubmodule"),l("tar.command","allowUnsafeCommandBinaries"),l("trailer.cmd","allowUnsafeCommandBinaries"),l("trailer.command","allowUnsafeCommandBinaries"),l("url.insteadOf","allowUnsafeUrlRewrite")];function*X(e,t){for(const n of t)for(const a of Y){const o=a(e,n);o&&(yield o)}}function c(e,t,n,{name:a=String(t),globalOnly:o=!1,withValue:s=!1}={}){const r=typeof t=="string"?new RegExp(`\\s*${t.toLowerCase()}`):t,i=`Use of ${e?`${e} with option `:""}${a} is not permitted without enabling ${n}`;return function(h,u){if(!(e&&h!==e)&&!(o&&!u.isGlobal)&&!(s&&u.value===void 0)&&r.test(u.name))return{category:n,message:i}}}const v={globalOnly:!0,withValue:!0},Y=[c(null,/--(upload|receive)-pack/,"allowUnsafePack",{name:"--upload-pack or --receive-pack"}),c("clone",/^-\w*u/,"allowUnsafePack"),c("clone","--u","allowUnsafePack"),c("push",/^--exec$/,"allowUnsafePack",{name:"--exec"}),c("rebase",/^(-x|--ex(ec?)?)$/,"allowUnsafeExec",{name:"-x or --exec"}),c(null,"--template","allowUnsafeTemplateDir"),c(null,"--exec-path","allowUnsafeExec",v),c(null,"--git-dir","allowUnsafeConfigPaths",v),c(null,"--work-tree","allowUnsafeConfigPaths",v),c(null,/^-C$/,"allowUnsafeConfigPaths",{...v,name:"-C"})];function k(e,t,n){return[...X(e,t),...K(n)]}function y(...e){const{flags:t,taskIndex:n}=q(e),a=n<e.length?String(e[n]).toLowerCase():null,o=a!==null?e.slice(n+1):[],{positionals:s,pathspecs:r}=V(o,a,t),i=L(a,t,s);return{task:a,flags:t.map(J),paths:r,config:i,vulnerabilities:z(k(a,t,i))}}function z(e){return Object.defineProperty(e,"vulnerabilities",{value:e})}function J({value:e,name:t}){return e!==void 0?{name:t,value:e}:{name:t}}const _={editor:"allowUnsafeEditor",git_askpass:"allowUnsafeAskPass",git_config_global:"allowUnsafeConfigPaths",git_config_system:"allowUnsafeConfigPaths",git_config_count:"allowUnsafeConfigEnvCount",git_config_parameters:"allowUnsafeConfigEnvCount",git_config:"allowUnsafeConfigPaths",git_editor:"allowUnsafeEditor",git_exec_path:"allowUnsafeExec",git_external_diff:"allowUnsafeDiffExternal",git_pager:"allowUnsafePager",git_proxy_command:"allowUnsafeGitProxy",git_template_dir:"allowUnsafeTemplateDir",git_sequence_editor:"allowUnsafeEditor",git_ssh:"allowUnsafeSshCommand",git_ssh_command:"allowUnsafeSshCommand",pager:"allowUnsafePager",prefix:"allowUnsafeConfigPaths",ssh_askpass:"allowUnsafeAskPass",visual:"allowUnsafeEditor"};function*Q(e){const t=parseInt(e.git_config_count??"0",10);for(let n=0;n<t;n++){const a=e[`git_config_key_${n}`],o=e[`git_config_value_${n}`];a!==void 0&&(yield{key:a.toLowerCase().trim(),value:o,scope:"env"})}}function*Z(e){for(const t of Object.keys(e))if(U(t)){const n=_[t];yield{category:n,message:`Use of "${t.toUpperCase()}" is not permitted without enabling ${n}`}}}function U(e){return Object.hasOwn(_,e)}function ee(e){const t={};for(const[n,a]of Object.entries(e)){const o=n.toLowerCase().trim();(U(o)||o.startsWith("git"))&&(t[o]=String(a))}return t}function P(e){const t=ee(e),n={read:[],write:[...Q(t)]},a=[...Z(t),...k(null,[],n)];return{config:n,vulnerabilities:a}}function te(e,t){return[...y(...e).vulnerabilities,...P(t).vulnerabilities]}exports.isGitEnvKey=U;exports.parseArgv=y;exports.parseEnv=P;exports.vulnerabilityCheck=te;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/flags/flags.helpers.ts","../src/config/config-operands.ts","../src/config/detect-config-action.ts","../src/config/analyse-config.ts","../src/tokens/flag-specs.ts","../src/tokens/token-expander.ts","../src/flags/parse-global-flags.ts","../src/flags/parse-task-flags.ts","../src/vulnerabilities/detect-vulnerable-config-writes.ts","../src/vulnerabilities/detect-vulnerable-flags.ts","../src/vulnerabilities/vulnerability-analysis.ts","../src/args/parse-argv.ts","../src/env/parse-env.ts","../src/vulnerabilities/vulnerability-check.ts"],"sourcesContent":["export interface Flag {\n name: string;\n value?: string;\n /** Value came from the next token rather than being embedded after `=`. */\n absorbedNext: boolean;\n /** Switch appeared before the git sub-command. */\n isGlobal: boolean;\n}\n\nexport function* scopedFlags(flags: Flag[], scope: 'global' | 'task') {\n const findGlobal = scope === 'global';\n for (const flag of flags) {\n if (flag.isGlobal === findGlobal) {\n yield flag;\n }\n }\n}\n","// Flags that unambiguously signal a write operation on git config.\nexport const CONFIG_WRITE_FLAGS = new Set([\n '--add',\n '--edit',\n '--remove-section',\n '--rename-section',\n '--replace-all',\n '--unset',\n '--unset-all',\n '-e',\n]);\n\n// Flags that unambiguously signal a read operation.\nexport const CONFIG_READ_FLAGS = new Set([\n '--get',\n '--get-all',\n '--get-color',\n '--get-colorbool',\n '--get-regexp',\n '--get-urlmatch',\n '--list',\n '-l',\n]);\n\n// Sub-command verbs accepted as the first positional by newer git versions.\nexport const CONFIG_WRITE_VERBS = new Set([\n 'edit',\n 'remove-section',\n 'rename-section',\n 'set',\n 'unset',\n]);\nexport const CONFIG_READ_VERBS = new Set(['get', 'get-color', 'get-colorbool', 'list']);\n","import type { ConfigScope } from '../args/parse-argv.types';\nimport { type Flag, scopedFlags } from '../flags/flags.helpers';\nimport type { ConfigOperation } from './config.types';\nimport {\n CONFIG_READ_FLAGS,\n CONFIG_READ_VERBS,\n CONFIG_WRITE_FLAGS,\n CONFIG_WRITE_VERBS,\n} from './config-operands';\n\nexport function detectConfigAction(flags: Flag[], positionals: string[]): ConfigOperation | null {\n for (const { name } of scopedFlags(flags, 'task')) {\n if (CONFIG_WRITE_FLAGS.has(name)) {\n return configOperation(true, positionals);\n }\n if (CONFIG_READ_FLAGS.has(name)) {\n return configOperation(false, positionals);\n }\n }\n\n const verb = positionals.at(0)?.toLowerCase();\n\n if (verb === undefined) {\n return null;\n }\n\n if (CONFIG_WRITE_VERBS.has(verb)) {\n return configOperation(true, positionals.slice(1));\n }\n\n if (CONFIG_READ_VERBS.has(verb)) {\n return configOperation(false, positionals.slice(1));\n }\n\n if (positionals.length === 1) {\n return configOperation(false, positionals);\n }\n\n return configOperation(true, positionals);\n}\n\nfunction configOperation(isWrite = false, positionals: string[] = []): ConfigOperation | null {\n const key = positionals.at(0)?.toLowerCase();\n\n if (key === undefined) {\n return null;\n }\n\n return {\n isWrite,\n isRead: !isWrite,\n key,\n value: positionals.at(1),\n };\n}\n\nexport function toOperation(scope: ConfigScope, operation: ConfigOperation) {\n if (operation.isWrite && operation.value !== undefined) {\n return { key: operation.key, value: operation.value, scope };\n }\n return { key: operation.key, scope };\n}\n","import type { ConfigScope, ConfigWrite, ParsedConfigActivity } from '../args/parse-argv.types';\nimport { type Flag, scopedFlags } from '../flags/flags.helpers';\nimport type { ConfigOperation } from './config.types';\nimport { detectConfigAction, toOperation } from './detect-config-action';\n\nfunction parseAssignment(raw: string | undefined): { key: string; value: string } | null {\n const eq = raw?.indexOf('=') || -1;\n\n if (!raw || eq < 0) {\n return null;\n }\n\n return {\n key: raw.slice(0, eq).trim().toLowerCase(),\n value: raw.slice(eq + 1),\n };\n}\n\nfunction detectConfigScope(flags: Flag[]): ConfigScope {\n for (const { name } of scopedFlags(flags, 'task')) {\n switch (name) {\n case '--global':\n return 'global';\n case '--system':\n return 'system';\n case '--worktree':\n return 'worktree';\n case '--local':\n return 'local';\n case '--file':\n case '-f':\n return 'file';\n }\n }\n return 'local';\n}\n\nfunction detectConfigOverrideScope({ name }: Flag): ConfigScope | void {\n if (name === '-c' || name === '--config') {\n return 'inline';\n }\n if (name === '--config-env') {\n return 'env';\n }\n}\n\n/**\n * Generates the stream of ConfigWrite settings found in the supplied flags,\n * triggered by `-c` and `--config` for inline configuration and `--config-env`\n * to set a config setting based on environment variable.\n */\nfunction* collectWriteFlags(flags: Flag[]): Generator<ConfigWrite> {\n for (const flag of flags) {\n const scope = detectConfigOverrideScope(flag);\n const assignment = scope && parseAssignment(flag.value);\n\n if (assignment) {\n yield {\n ...assignment,\n scope,\n };\n }\n }\n}\n\nexport function collectConfigAccess(\n task: string | null,\n flags: Flag[],\n positionals: string[]\n): ParsedConfigActivity {\n const parsedConfig: ParsedConfigActivity = {\n read: [],\n write: [...collectWriteFlags(flags)],\n };\n\n if (task === 'config') {\n appendParsedConfigAction(\n parsedConfig,\n detectConfigScope(flags),\n detectConfigAction(flags, positionals)\n );\n }\n\n return parsedConfig;\n}\n\nfunction appendParsedConfigAction(\n parsedConfig: ParsedConfigActivity,\n scope: ConfigScope,\n action: ConfigOperation | null\n) {\n if (action === null) {\n return;\n }\n\n const config = toOperation(scope, action);\n if (action.isWrite) {\n parsedConfig.write.push(config);\n } else {\n parsedConfig.read.push(config);\n }\n}\n","// ── Option tables ─────────────────────────────────────────────────────────────\n//\n// Each scope has:\n// short – Map<char, consumesNext> (known single-letter switches; true = takes next token)\n// long – Set<stem> (long switch stems, without --, that take the next token)\n//\n// Only switches listed here are \"known\". An unknown char anywhere in a combined\n// cluster causes the entire cluster to be kept as one opaque token.\n\nexport interface FlagSpec {\n readonly short: ReadonlyMap<string, boolean>;\n readonly long: ReadonlySet<string>;\n}\n\nconst UNIVERSAL: FlagSpec = {\n short: new Map([\n ['c', true], // -c <k=v> set config key for this invocation\n ]),\n long: new Set(),\n};\n\nexport const GLOBAL: FlagSpec = {\n short: new Map([\n ['C', true], // -C <path> change working directory\n ['P', false], // -P no pager (alias for --no-pager)\n ['h', false], // -h help\n ['p', false], // -p paginate\n ['v', false], // -v version\n ...UNIVERSAL.short.entries(),\n ]),\n long: new Set([\n 'attr-source',\n 'config-env',\n 'exec-path',\n 'git-dir',\n 'list-cmds',\n 'namespace',\n 'super-prefix',\n 'work-tree',\n ]),\n};\n\nconst COMMANDS: Record<string, FlagSpec> = {\n clone: {\n short: new Map([\n ['b', true], // -b <branch>\n ['j', true], // -j <n> parallel jobs\n ['l', false], // -l local\n ['n', false], // -n no-checkout\n ['o', true], // -o <name> remote name\n ['q', false], // -q quiet\n ['s', false], // -s shared\n ['u', true], // -u <upload-pack>\n ]),\n long: new Set(['branch', 'config', 'jobs', 'origin', 'upload-pack', 'u', 'template']),\n },\n commit: {\n short: new Map([\n ['C', true], // -C <commit> reuse message\n ['F', true], // -F <file> read message from file\n ['c', true], // -c <commit> reedit message\n ['m', true], // -m <msg>\n ['t', true], // -t <template>\n ]),\n long: new Set(['file', 'message', 'reedit-message', 'reuse-message', 'template']),\n },\n config: {\n short: new Map([\n ['e', false], // -e open editor\n ['f', true], // -f <file>\n ['l', false], // -l list\n ]),\n long: new Set(['blob', 'comment', 'default', 'file', 'type', 'value']),\n },\n fetch: {\n short: new Map(),\n long: new Set(['upload-pack']),\n },\n init: {\n short: new Map(),\n long: new Set(['template']),\n },\n pull: {\n short: new Map(),\n long: new Set(['upload-pack']),\n },\n push: {\n short: new Map(),\n long: new Set(['exec', 'receive-pack']),\n },\n};\n\nconst EMPTY: FlagSpec = { short: new Map(), long: new Set() };\n\nexport function getFlagSpecForTask(task?: string | null) {\n const spec = COMMANDS[task ?? ''] ?? EMPTY;\n\n return {\n short: new Map([...UNIVERSAL.short.entries(), ...spec.short.entries()]),\n long: spec.long,\n };\n}\n","import { GLOBAL } from './flag-specs';\n\n/** Parse a single raw token (e.g. `'-m'`, `'--amend'`, `'-uc'`) into one or\n * more switch descriptors. Values are not yet resolved for needsNext=true. */\nexport function expandToken(\n raw: string,\n spec = GLOBAL\n): Array<{\n name: string;\n value?: string;\n needsNext: boolean;\n}> {\n if (raw.startsWith('--')) {\n const eq = raw.indexOf('=');\n if (eq > 2) {\n return [{ name: raw.slice(0, eq), value: raw.slice(eq + 1), needsNext: false }];\n }\n const stem = raw.slice(2);\n return [{ name: raw, needsNext: spec.long.has(stem) }];\n }\n\n // Single short switch\n if (raw.length === 2) {\n const char = raw.charAt(1);\n const consumes = spec.short.get(char);\n return [{ name: raw, needsNext: consumes === true }];\n }\n\n // Combined short cluster: try to expand char-by-char\n return expandCluster(raw, spec.short);\n}\n\nfunction expandCluster(\n raw: string,\n shortSpec: ReadonlyMap<string, boolean>\n): Array<{ name: string; value?: string; needsNext: boolean }> {\n const chars = raw.slice(1).split('');\n const result: Array<{ name: string; value?: string; needsNext: boolean }> = [];\n\n for (let i = 0; i < chars.length; i++) {\n const char = chars[i];\n const consumes = shortSpec.get(char);\n\n if (consumes === undefined) {\n // Unknown char: keep the whole raw token as opaque\n return [{ name: raw, needsNext: false }];\n }\n\n if (consumes) {\n const remainder = chars.slice(i + 1).join('');\n if (remainder) {\n const remainderAllKnown = [...remainder].every((c) => shortSpec.has(c));\n if (!remainderAllKnown) {\n // Remaining chars are the embedded value, not separate flags\n result.push({ name: `-${char}`, value: remainder, needsNext: false });\n return result;\n }\n }\n }\n\n result.push({ name: `-${char}`, needsNext: consumes });\n }\n\n return result;\n}\n","import { expandToken } from '../tokens/token-expander';\nimport type { Flag } from './flags.helpers';\n\nexport interface GlobalFlags {\n flags: Flag[];\n taskIndex: number;\n}\n\nexport function parseGlobalFlags(tokens: readonly unknown[], flags: Flag[] = []): GlobalFlags {\n let i = 0;\n\n while (i < tokens.length) {\n const raw = String(tokens[i]);\n if (!raw.startsWith('-') || raw.length < 2) break;\n\n const parsed = expandToken(raw);\n let next = i + 1;\n\n for (const token of parsed) {\n const flag: Flag = {\n name: token.name,\n value: token.value,\n absorbedNext: false,\n isGlobal: true,\n };\n if (token.needsNext && flag.value === undefined && next < tokens.length) {\n flag.value = String(tokens[next]);\n flag.absorbedNext = true;\n next++;\n }\n flags.push(flag);\n }\n\n i = next;\n }\n\n return { flags, taskIndex: i };\n}\n","import { isPathSpec, toPaths } from '@simple-git/args-pathspec';\n\nimport { getFlagSpecForTask } from '../tokens/flag-specs';\nimport { expandToken } from '../tokens/token-expander';\nimport type { Flag } from './flags.helpers';\n\ntype TaskFlags = {\n flags: Flag[];\n positionals: string[];\n pathspecs: string[];\n};\n\nexport function parseTaskFlags(\n tokens: readonly unknown[],\n task: string | null,\n flags: Flag[] = []\n): TaskFlags {\n const spec = getFlagSpecForTask(task);\n const positionals: string[] = [];\n const pathspecs: string[] = [];\n\n let i = 0;\n while (i < tokens.length) {\n const current = tokens[i];\n\n if (isPathSpec(current)) {\n pathspecs.push(...toPaths(current as string));\n i++;\n continue;\n }\n\n const raw = String(current);\n\n if (raw === '--') {\n for (let j = i + 1; j < tokens.length; j++) {\n const t = tokens[j];\n isPathSpec(t) ? pathspecs.push(...toPaths(t as string)) : pathspecs.push(String(t));\n }\n break;\n }\n\n if (!raw.startsWith('-') || raw.length < 2) {\n positionals.push(raw);\n i++;\n continue;\n }\n\n const parsed = expandToken(raw, spec);\n let next = i + 1;\n\n for (const token of parsed) {\n const flag: Flag = {\n name: token.name,\n value: token.value,\n absorbedNext: false,\n isGlobal: false,\n };\n if (\n token.needsNext &&\n flag.value === undefined &&\n next < tokens.length &&\n !isPathSpec(tokens[next])\n ) {\n flag.value = String(tokens[next]);\n flag.absorbedNext = true;\n next++;\n }\n flags.push(flag);\n }\n\n i = next;\n }\n\n return { flags, positionals, pathspecs };\n}\n","import type { ParsedConfigActivity } from '../args/parse-argv.types';\nimport type { Vulnerability, VulnerabilityCategory } from './vulnerability.types';\n\nexport function* detectVulnerableConfigWrites({\n write,\n}: ParsedConfigActivity): Generator<Vulnerability> {\n for (const config of write) {\n for (const helper of preventUnsafeConfig) {\n const vulnerability = helper(config.key);\n if (vulnerability) {\n yield vulnerability;\n }\n }\n }\n}\n\nfunction preventConfigBuilder(\n config: string | RegExp,\n category: VulnerabilityCategory,\n message = String(config)\n) {\n const regex = typeof config === 'string' ? new RegExp(`\\\\s*${config.toLowerCase()}`) : config;\n\n return function preventCommand(key: string): Vulnerability | void {\n if (regex.test(key)) {\n return {\n category,\n message: `Configuring ${message} is not permitted without enabling ${category}`,\n };\n }\n };\n}\n\nfunction preventExpandedConfigBuilder(config: string, category: VulnerabilityCategory) {\n const regex = new RegExp(`\\\\s*${config.toLowerCase().replace(/\\./g, '(\\..+)?.')}`);\n return preventConfigBuilder(regex, category, config);\n}\n\nconst preventUnsafeConfig = [\n preventConfigBuilder('alias', 'allowUnsafeAlias'),\n preventConfigBuilder('core.askPass', 'allowUnsafeAskPass'),\n preventConfigBuilder('core.editor', 'allowUnsafeEditor'),\n preventConfigBuilder('core.fsmonitor', 'allowUnsafeFsMonitor'),\n preventConfigBuilder('core.gitProxy', 'allowUnsafeGitProxy'),\n preventConfigBuilder('core.hooksPath', 'allowUnsafeHooksPath'),\n preventConfigBuilder('core.pager', 'allowUnsafePager'),\n preventConfigBuilder('core.sshCommand', 'allowUnsafeSshCommand'),\n preventExpandedConfigBuilder('credential.helper', 'allowUnsafeCredentialHelper'),\n preventExpandedConfigBuilder('diff.command', 'allowUnsafeDiffExternal'),\n preventConfigBuilder('diff.external', 'allowUnsafeDiffExternal'),\n preventExpandedConfigBuilder('diff.textconv', 'allowUnsafeDiffTextConv'),\n preventExpandedConfigBuilder('filter.clean', 'allowUnsafeFilter'),\n preventExpandedConfigBuilder('filter.smudge', 'allowUnsafeFilter'),\n preventExpandedConfigBuilder('gpg.program', 'allowUnsafeGpgProgram'),\n preventConfigBuilder('init.templateDir', 'allowUnsafeTemplateDir'),\n preventExpandedConfigBuilder('merge.driver', 'allowUnsafeMergeDriver'),\n preventExpandedConfigBuilder('mergetool.path', 'allowUnsafeMergeDriver'),\n preventExpandedConfigBuilder('mergetool.cmd', 'allowUnsafeMergeDriver'),\n preventExpandedConfigBuilder('protocol.allow', 'allowUnsafeProtocolOverride'),\n preventExpandedConfigBuilder('remote.receivepack', 'allowUnsafePack'),\n preventExpandedConfigBuilder('remote.uploadpack', 'allowUnsafePack'),\n preventConfigBuilder('sequence.editor', 'allowUnsafeEditor'),\n];\n","import type { Flag } from '../flags/flags.helpers';\nimport type { Vulnerability, VulnerabilityCategory } from './vulnerability.types';\n\nexport function* detectVulnerableFlags(\n task: null | string,\n flags: Flag[]\n): Generator<Vulnerability> {\n for (const flag of flags) {\n for (const helper of preventUnsafeFlags) {\n const vulnerability = helper(task, flag.name);\n if (vulnerability) {\n yield vulnerability;\n }\n }\n }\n}\n\nfunction preventFlagBuilder(\n task: string | null,\n flag: string | RegExp,\n category: VulnerabilityCategory,\n name = String(flag)\n) {\n const regex = typeof flag === 'string' ? new RegExp(`\\\\s*${flag.toLowerCase()}`) : flag;\n const message = `Use of ${task ? `${task} with option ` : ''}${name} is not permitted without enabling ${category}`;\n\n return function preventFlag(currentTask: string | null, flagName: string): Vulnerability | void {\n if ((!task || currentTask === task) && regex.test(flagName)) {\n return {\n category,\n message,\n };\n }\n };\n}\n\nconst preventUnsafeFlags = [\n preventFlagBuilder(\n null,\n /--(upload|receive)-pack/,\n 'allowUnsafePack',\n '--upload-pack or --receive-pack'\n ),\n preventFlagBuilder('clone', /^-\\w*u/, 'allowUnsafePack'),\n preventFlagBuilder('clone', '--u', 'allowUnsafePack'),\n preventFlagBuilder('push', '--exec', 'allowUnsafePack'),\n preventFlagBuilder(null, '--template', 'allowUnsafeTemplateDir'),\n];\n","import type { ParsedConfigActivity } from '../args/parse-argv.types';\nimport type { Flag } from '../flags/flags.helpers';\nimport { detectVulnerableConfigWrites } from './detect-vulnerable-config-writes';\nimport { detectVulnerableFlags } from './detect-vulnerable-flags';\nimport type { Vulnerability } from './vulnerability.types';\n\nexport function vulnerabilityAnalysis(\n task: null | string,\n flags: Flag[],\n config: ParsedConfigActivity\n): Vulnerability[] {\n return [...detectVulnerableFlags(task, flags), ...detectVulnerableConfigWrites(config)];\n}\n","import { collectConfigAccess } from '../config/analyse-config';\nimport type { Flag } from '../flags/flags.helpers';\nimport { parseGlobalFlags } from '../flags/parse-global-flags';\nimport { parseTaskFlags } from '../flags/parse-task-flags';\nimport type { Vulnerability } from '../vulnerabilities/vulnerability.types';\nimport { vulnerabilityAnalysis } from '../vulnerabilities/vulnerability-analysis';\nimport type { ParsedArgv, ParsedFlag } from './parse-argv.types';\n\n/**\n * Parse the tokens that would be forwarded to a `git` child-process and\n * return a structured summary of what the invocation does.\n */\nexport function parseArgv(...tokens: readonly unknown[]): ParsedArgv {\n const { flags, taskIndex } = parseGlobalFlags(tokens);\n\n const task = taskIndex < tokens.length ? String(tokens[taskIndex]).toLowerCase() : null;\n const taskTokens = task !== null ? tokens.slice(taskIndex + 1) : [];\n\n const { positionals, pathspecs } = parseTaskFlags(taskTokens, task, flags);\n const config = collectConfigAccess(task, flags, positionals);\n\n return {\n task,\n flags: flags.map(toParsedFlag),\n paths: pathspecs,\n config,\n vulnerabilities: vulnerabilityList(vulnerabilityAnalysis(task, flags, config)),\n };\n}\n\nfunction vulnerabilityList(vulnerabilities: Vulnerability[]) {\n return Object.defineProperty(vulnerabilities, 'vulnerabilities', {\n value: vulnerabilities,\n });\n}\n\nfunction toParsedFlag({ value, name }: Flag): ParsedFlag {\n return value !== undefined ? { name, value } : { name };\n}\n","import type { ConfigWrite, ParsedConfigActivity } from '../args/parse-argv.types';\nimport type { Vulnerability, VulnerabilityCategory } from '../vulnerabilities/vulnerability.types';\nimport { vulnerabilityAnalysis } from '../vulnerabilities/vulnerability-analysis';\n\nconst GitEnvKeys = {\n 'editor': 'allowUnsafeEditor',\n 'git_askpass': 'allowUnsafeAskPass',\n 'git_config_global': 'allowUnsafeConfigPaths',\n 'git_config_system': 'allowUnsafeConfigPaths',\n 'git_config_count': 'allowUnsafeConfigEnvCount',\n 'git_config': 'allowUnsafeConfigPaths',\n 'git_editor': 'allowUnsafeEditor',\n 'git_exec_path': 'allowUnsafeConfigPaths',\n 'git_external_diff': 'allowUnsafeDiffExternal',\n 'git_pager': 'allowUnsafePager',\n 'git_proxy_command': 'allowUnsafeGitProxy',\n 'git_template_dir': 'allowUnsafeTemplateDir',\n 'git_sequence_editor': 'allowUnsafeEditor',\n 'git_ssh': 'allowUnsafeSshCommand',\n 'git_ssh_command': 'allowUnsafeSshCommand',\n 'pager': 'allowUnsafePager',\n 'prefix': 'allowUnsafeConfigPaths',\n 'ssh_askpass': 'allowUnsafeAskPass',\n} as const satisfies Record<string, VulnerabilityCategory>;\n\ntype GitEnv = Record<string, string> & {\n git_config_count?: string;\n};\n\nfunction* collectConfigByCount(env: GitEnv): Generator<ConfigWrite> {\n const count = parseInt(env.git_config_count ?? '0', 10);\n for (let index = 0; index < count; index++) {\n const key = env[`git_config_key_${index}`];\n const value = env[`git_config_value_${index}`];\n\n if (key !== undefined) {\n yield { key: key.toLowerCase().trim(), value, scope: 'env' };\n }\n }\n}\n\nfunction* collectConfigVulnerabilities(env: GitEnv): Generator<Vulnerability> {\n for (const key of Object.keys(env)) {\n if (isGitEnvKey(key)) {\n const category = GitEnvKeys[key];\n yield {\n category,\n message: `Use of \"${key.toUpperCase()}\" is not permitted without enabling ${category}`,\n };\n }\n }\n}\n\nfunction isGitEnvKey(key: string): key is keyof typeof GitEnvKeys {\n return Object.hasOwn(GitEnvKeys, key);\n}\n\nfunction prepareEnv(env: Record<string, unknown>): GitEnv {\n const gitEnv: GitEnv = {};\n for (const [key, value] of Object.entries(env)) {\n const envKey = key.toLowerCase().trim();\n if (isGitEnvKey(envKey) || envKey.startsWith('git')) {\n gitEnv[envKey] = String(value);\n }\n }\n return gitEnv;\n}\n\nexport function parseEnv(raw: Record<string, unknown>) {\n const env = prepareEnv(raw);\n const config: ParsedConfigActivity = {\n read: [],\n write: [...collectConfigByCount(env)],\n };\n const vulnerabilities = [\n ...collectConfigVulnerabilities(env),\n ...vulnerabilityAnalysis(null, [], config),\n ];\n\n return {\n config,\n vulnerabilities,\n };\n}\n","import { parseArgv } from '../args/parse-argv';\nimport { parseEnv } from '../env/parse-env';\n\n/**\n * Retrieves just the vulnerabilities identified in the supplied varargs tokens\n * and environment variables.\n */\nexport function vulnerabilityCheck(tokens: readonly string[], env: Record<string, unknown>) {\n return [...parseArgv(...tokens).vulnerabilities, ...parseEnv(env).vulnerabilities];\n}\n"],"names":["scopedFlags","flags","scope","findGlobal","flag","CONFIG_WRITE_FLAGS","CONFIG_READ_FLAGS","CONFIG_WRITE_VERBS","CONFIG_READ_VERBS","detectConfigAction","positionals","name","configOperation","verb","isWrite","key","toOperation","operation","parseAssignment","raw","eq","detectConfigScope","detectConfigOverrideScope","collectWriteFlags","assignment","collectConfigAccess","task","parsedConfig","appendParsedConfigAction","action","config","UNIVERSAL","GLOBAL","COMMANDS","EMPTY","getFlagSpecForTask","spec","expandToken","stem","char","consumes","expandCluster","shortSpec","chars","result","i","remainder","c","parseGlobalFlags","tokens","parsed","next","token","parseTaskFlags","pathspecs","current","isPathSpec","toPaths","j","t","detectVulnerableConfigWrites","write","helper","preventUnsafeConfig","vulnerability","preventConfigBuilder","category","message","regex","preventExpandedConfigBuilder","detectVulnerableFlags","preventUnsafeFlags","preventFlagBuilder","currentTask","flagName","vulnerabilityAnalysis","parseArgv","taskIndex","taskTokens","toParsedFlag","vulnerabilityList","vulnerabilities","value","GitEnvKeys","collectConfigByCount","env","count","index","collectConfigVulnerabilities","isGitEnvKey","prepareEnv","gitEnv","envKey","parseEnv","vulnerabilityCheck"],"mappings":"6HASO,SAAUA,EAAYC,EAAeC,EAA0B,CACnE,MAAMC,EAAaD,IAAU,SAC7B,UAAWE,KAAQH,EACZG,EA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mD,EAAWiB,EAAWpE,CAAG,EAC/B,KAAM,CACH,SAAAmD,EACA,QAAS,WAAWnD,EAAI,YAAA,CAAa,uCAAuCmD,CAAQ,EAAA,CAE1F,CAEN,CAEA,SAASuB,EAAY1E,EAA6C,CAC/D,OAAO,OAAO,OAAOoE,EAAYpE,CAAG,CACvC,CAEA,SAAS2E,EAAWL,EAAsC,CACvD,MAAMM,EAAiB,CAAA,EACvB,SAAW,CAAC5E,EAAKmE,CAAK,IAAK,OAAO,QAAQG,CAAG,EAAG,CAC7C,MAAMO,EAAS7E,EAAI,YAAA,EAAc,KAAA,GAC7B0E,EAAYG,CAAM,GAAKA,EAAO,WAAW,KAAK,KAC/CD,EAAOC,CAAM,EAAI,OAAOV,CAAK,EAEnC,CACA,OAAOS,CACV,CAEO,SAASE,EAAS1E,EAA8B,CACpD,MAAMkE,EAAMK,EAAWvE,CAAG,EACpBW,EAA+B,CAClC,KAAM,CAAA,EACN,MAAO,CAAC,GAAGsD,EAAqBC,CAAG,CAAC,CAAA,EAEjCJ,EAAkB,CACrB,GAAGO,EAA6BH,CAAG,EACnC,GAAGV,EAAsB,KAAM,CAAA,EAAI7C,CAAM,CAAA,EAG5C,MAAO,CACJ,OAAAA,EACA,gBAAAmD,CAAA,CAEN,CC5EO,SAASa,GAAmB7C,EAA2BoC,EAA8B,CACzF,MAAO,CAAC,GAAGT,EAAU,GAAG3B,CAAM,EAAE,gBAAiB,GAAG4C,EAASR,CAAG,EAAE,eAAe,CACpF"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/flags/flags.helpers.ts","../src/config/config-operands.ts","../src/config/detect-config-action.ts","../src/config/analyse-config.ts","../src/tokens/flag-specs.ts","../src/tokens/token-expander.ts","../src/flags/parse-global-flags.ts","../src/flags/parse-task-flags.ts","../src/vulnerabilities/detect-vulnerable-config-writes.ts","../src/vulnerabilities/detect-vulnerable-flags.ts","../src/vulnerabilities/vulnerability-analysis.ts","../src/args/parse-argv.ts","../src/env/parse-env.ts","../src/vulnerabilities/vulnerability-check.ts"],"sourcesContent":["export interface Flag {\n name: string;\n value?: string;\n /** Value came from the next token rather than being embedded after `=`. */\n absorbedNext: boolean;\n /** Switch appeared before the git sub-command. */\n isGlobal: boolean;\n}\n\nexport function* scopedFlags(flags: Flag[], scope: 'global' | 'task') {\n const findGlobal = scope === 'global';\n for (const flag of flags) {\n if (flag.isGlobal === findGlobal) {\n yield flag;\n }\n }\n}\n","// Flags that unambiguously signal a write operation on git config.\nexport const CONFIG_WRITE_FLAGS = new Set([\n '--add',\n '--edit',\n '--remove-section',\n '--rename-section',\n '--replace-all',\n '--unset',\n '--unset-all',\n '-e',\n]);\n\n// Flags that unambiguously signal a read operation.\nexport const CONFIG_READ_FLAGS = new Set([\n '--get',\n '--get-all',\n '--get-color',\n '--get-colorbool',\n '--get-regexp',\n '--get-urlmatch',\n '--list',\n '-l',\n]);\n\n// Sub-command verbs accepted as the first positional by newer git versions.\nexport const CONFIG_WRITE_VERBS = new Set([\n 'edit',\n 'remove-section',\n 'rename-section',\n 'set',\n 'unset',\n]);\nexport const CONFIG_READ_VERBS = new Set(['get', 'get-color', 'get-colorbool', 'list']);\n","import type { ConfigScope } from '../args/parse-argv.types';\nimport { type Flag, scopedFlags } from '../flags/flags.helpers';\nimport type { ConfigOperation } from './config.types';\nimport {\n CONFIG_READ_FLAGS,\n CONFIG_READ_VERBS,\n CONFIG_WRITE_FLAGS,\n CONFIG_WRITE_VERBS,\n} from './config-operands';\n\nexport function detectConfigAction(flags: Flag[], positionals: string[]): ConfigOperation | null {\n for (const { name } of scopedFlags(flags, 'task')) {\n if (CONFIG_WRITE_FLAGS.has(name)) {\n return configOperation(true, positionals);\n }\n if (CONFIG_READ_FLAGS.has(name)) {\n return configOperation(false, positionals);\n }\n }\n\n const verb = positionals.at(0)?.toLowerCase();\n\n if (verb === undefined) {\n return null;\n }\n\n if (CONFIG_WRITE_VERBS.has(verb)) {\n return configOperation(true, positionals.slice(1));\n }\n\n if (CONFIG_READ_VERBS.has(verb)) {\n return configOperation(false, positionals.slice(1));\n }\n\n if (positionals.length === 1) {\n return configOperation(false, positionals);\n }\n\n return configOperation(true, positionals);\n}\n\nfunction configOperation(isWrite = false, positionals: string[] = []): ConfigOperation | null {\n const key = positionals.at(0)?.toLowerCase();\n\n if (key === undefined) {\n return null;\n }\n\n return {\n isWrite,\n isRead: !isWrite,\n key,\n value: positionals.at(1),\n };\n}\n\nexport function toOperation(scope: ConfigScope, operation: ConfigOperation) {\n if (operation.isWrite && operation.value !== undefined) {\n return { key: operation.key, value: operation.value, scope };\n }\n return { key: operation.key, scope };\n}\n","import type { ConfigScope, ConfigWrite, ParsedConfigActivity } from '../args/parse-argv.types';\nimport { type Flag, scopedFlags } from '../flags/flags.helpers';\nimport type { ConfigOperation } from './config.types';\nimport { detectConfigAction, toOperation } from './detect-config-action';\n\nfunction parseAssignment(raw: string | undefined): { key: string; value: string } | null {\n const eq = raw?.indexOf('=') || -1;\n\n if (!raw || eq < 0) {\n return null;\n }\n\n return {\n key: raw.slice(0, eq).trim().toLowerCase(),\n value: raw.slice(eq + 1),\n };\n}\n\nfunction detectConfigScope(flags: Flag[]): ConfigScope {\n for (const { name } of scopedFlags(flags, 'task')) {\n switch (name) {\n case '--global':\n return 'global';\n case '--system':\n return 'system';\n case '--worktree':\n return 'worktree';\n case '--local':\n return 'local';\n case '--file':\n case '-f':\n return 'file';\n }\n }\n return 'local';\n}\n\nfunction detectConfigOverrideScope({ name }: Flag): ConfigScope | void {\n if (name === '-c' || name === '--config') {\n return 'inline';\n }\n if (name === '--config-env') {\n return 'env';\n }\n}\n\n/**\n * Generates the stream of ConfigWrite settings found in the supplied flags,\n * triggered by `-c` and `--config` for inline configuration and `--config-env`\n * to set a config setting based on environment variable.\n */\nfunction* collectWriteFlags(flags: Flag[]): Generator<ConfigWrite> {\n for (const flag of flags) {\n const scope = detectConfigOverrideScope(flag);\n const assignment = scope && parseAssignment(flag.value);\n\n if (assignment) {\n yield {\n ...assignment,\n scope,\n };\n }\n }\n}\n\nexport function collectConfigAccess(\n task: string | null,\n flags: Flag[],\n positionals: string[]\n): ParsedConfigActivity {\n const parsedConfig: ParsedConfigActivity = {\n read: [],\n write: [...collectWriteFlags(flags)],\n };\n\n if (task === 'config') {\n appendParsedConfigAction(\n parsedConfig,\n detectConfigScope(flags),\n detectConfigAction(flags, positionals)\n );\n }\n\n return parsedConfig;\n}\n\nfunction appendParsedConfigAction(\n parsedConfig: ParsedConfigActivity,\n scope: ConfigScope,\n action: ConfigOperation | null\n) {\n if (action === null) {\n return;\n }\n\n const config = toOperation(scope, action);\n if (action.isWrite) {\n parsedConfig.write.push(config);\n } else {\n parsedConfig.read.push(config);\n }\n}\n","// ── Option tables ─────────────────────────────────────────────────────────────\n//\n// Each scope has:\n// short – Map<char, consumesNext> (known single-letter switches; true = takes next token)\n// long – Set<stem> (long switch stems, without --, that take the next token)\n//\n// Only switches listed here are \"known\". An unknown char anywhere in a combined\n// cluster causes the entire cluster to be kept as one opaque token.\n\nexport interface FlagSpec {\n readonly short: ReadonlyMap<string, boolean>;\n readonly long: ReadonlySet<string>;\n}\n\nconst UNIVERSAL: FlagSpec = {\n short: new Map([\n ['c', true], // -c <k=v> set config key for this invocation\n ]),\n long: new Set(),\n};\n\nexport const GLOBAL: FlagSpec = {\n short: new Map([\n ['C', true], // -C <path> change working directory\n ['P', false], // -P no pager (alias for --no-pager)\n ['h', false], // -h help\n ['p', false], // -p paginate\n ['v', false], // -v version\n ...UNIVERSAL.short.entries(),\n ]),\n long: new Set([\n 'attr-source',\n 'config-env',\n 'exec-path',\n 'git-dir',\n 'list-cmds',\n 'namespace',\n 'super-prefix',\n 'work-tree',\n ]),\n};\n\nconst COMMANDS: Record<string, FlagSpec> = {\n clone: {\n short: new Map([\n ['b', true], // -b <branch>\n ['j', true], // -j <n> parallel jobs\n ['l', false], // -l local\n ['n', false], // -n no-checkout\n ['o', true], // -o <name> remote name\n ['q', false], // -q quiet\n ['s', false], // -s shared\n ['u', true], // -u <upload-pack>\n ]),\n long: new Set(['branch', 'config', 'jobs', 'origin', 'upload-pack', 'u', 'template']),\n },\n commit: {\n short: new Map([\n ['C', true], // -C <commit> reuse message\n ['F', true], // -F <file> read message from file\n ['c', true], // -c <commit> reedit message\n ['m', true], // -m <msg>\n ['t', true], // -t <template>\n ]),\n long: new Set(['file', 'message', 'reedit-message', 'reuse-message', 'template']),\n },\n config: {\n short: new Map([\n ['e', false], // -e open editor\n ['f', true], // -f <file>\n ['l', false], // -l list\n ]),\n long: new Set(['blob', 'comment', 'default', 'file', 'type', 'value']),\n },\n fetch: {\n short: new Map(),\n long: new Set(['upload-pack']),\n },\n init: {\n short: new Map(),\n long: new Set(['template']),\n },\n pull: {\n short: new Map(),\n long: new Set(['upload-pack']),\n },\n push: {\n short: new Map(),\n long: new Set(['exec', 'receive-pack']),\n },\n rebase: {\n short: new Map([\n ['X', true], // -X <option> strategy option\n ['f', false], // -f force-rebase\n ['i', false], // -i interactive\n ['k', false], // -k keep-base\n ['m', false], // -m merge\n ['n', false], // -n no-stat\n ['q', false], // -q quiet\n ['r', false], // -r rebase-merges\n ['s', true], // -s <strategy>\n ['v', false], // -v verbose\n ['x', true], // -x <cmd> exec\n ]),\n long: new Set(['exec', 'onto', 'strategy', 'strategy-option']),\n },\n};\n\nconst EMPTY: FlagSpec = { short: new Map(), long: new Set() };\n\nexport function getFlagSpecForTask(task?: string | null) {\n const spec = COMMANDS[task ?? ''] ?? EMPTY;\n\n return {\n short: new Map([...UNIVERSAL.short.entries(), ...spec.short.entries()]),\n long: spec.long,\n };\n}\n","import { GLOBAL } from './flag-specs';\n\n/** Parse a single raw token (e.g. `'-m'`, `'--amend'`, `'-uc'`) into one or\n * more switch descriptors. Values are not yet resolved for needsNext=true. */\nexport function expandToken(\n raw: string,\n spec = GLOBAL\n): Array<{\n name: string;\n value?: string;\n needsNext: boolean;\n}> {\n if (raw.startsWith('--')) {\n const eq = raw.indexOf('=');\n if (eq > 2) {\n return [{ name: raw.slice(0, eq), value: raw.slice(eq + 1), needsNext: false }];\n }\n const stem = raw.slice(2);\n return [{ name: raw, needsNext: spec.long.has(stem) }];\n }\n\n // Single short switch\n if (raw.length === 2) {\n const char = raw.charAt(1);\n const consumes = spec.short.get(char);\n return [{ name: raw, needsNext: consumes === true }];\n }\n\n // Combined short cluster: try to expand char-by-char\n return expandCluster(raw, spec.short);\n}\n\nfunction expandCluster(\n raw: string,\n shortSpec: ReadonlyMap<string, boolean>\n): Array<{ name: string; value?: string; needsNext: boolean }> {\n const chars = raw.slice(1).split('');\n const result: Array<{ name: string; value?: string; needsNext: boolean }> = [];\n\n for (let i = 0; i < chars.length; i++) {\n const char = chars[i];\n const consumes = shortSpec.get(char);\n\n if (consumes === undefined) {\n // Unknown char: keep the whole raw token as opaque\n return [{ name: raw, needsNext: false }];\n }\n\n if (consumes) {\n const remainder = chars.slice(i + 1).join('');\n if (remainder) {\n const remainderAllKnown = [...remainder].every((c) => shortSpec.has(c));\n if (!remainderAllKnown) {\n // Remaining chars are the embedded value, not separate flags\n result.push({ name: `-${char}`, value: remainder, needsNext: false });\n return result;\n }\n }\n }\n\n result.push({ name: `-${char}`, needsNext: consumes });\n }\n\n return result;\n}\n","import { expandToken } from '../tokens/token-expander';\nimport type { Flag } from './flags.helpers';\n\nexport interface GlobalFlags {\n flags: Flag[];\n taskIndex: number;\n}\n\nexport function parseGlobalFlags(tokens: readonly unknown[], flags: Flag[] = []): GlobalFlags {\n let i = 0;\n\n while (i < tokens.length) {\n const raw = String(tokens[i]);\n if (!raw.startsWith('-') || raw.length < 2) break;\n\n const parsed = expandToken(raw);\n let next = i + 1;\n\n for (const token of parsed) {\n const flag: Flag = {\n name: token.name,\n value: token.value,\n absorbedNext: false,\n isGlobal: true,\n };\n if (token.needsNext && flag.value === undefined && next < tokens.length) {\n flag.value = String(tokens[next]);\n flag.absorbedNext = true;\n next++;\n }\n flags.push(flag);\n }\n\n i = next;\n }\n\n return { flags, taskIndex: i };\n}\n","import { isPathSpec, toPaths } from '@simple-git/args-pathspec';\n\nimport { getFlagSpecForTask } from '../tokens/flag-specs';\nimport { expandToken } from '../tokens/token-expander';\nimport type { Flag } from './flags.helpers';\n\ntype TaskFlags = {\n flags: Flag[];\n positionals: string[];\n pathspecs: string[];\n};\n\nexport function parseTaskFlags(\n tokens: readonly unknown[],\n task: string | null,\n flags: Flag[] = []\n): TaskFlags {\n const spec = getFlagSpecForTask(task);\n const positionals: string[] = [];\n const pathspecs: string[] = [];\n\n let i = 0;\n while (i < tokens.length) {\n const current = tokens[i];\n\n if (isPathSpec(current)) {\n pathspecs.push(...toPaths(current as string));\n i++;\n continue;\n }\n\n const raw = String(current);\n\n if (raw === '--') {\n for (let j = i + 1; j < tokens.length; j++) {\n const t = tokens[j];\n isPathSpec(t) ? pathspecs.push(...toPaths(t as string)) : pathspecs.push(String(t));\n }\n break;\n }\n\n if (!raw.startsWith('-') || raw.length < 2) {\n positionals.push(raw);\n i++;\n continue;\n }\n\n const parsed = expandToken(raw, spec);\n let next = i + 1;\n\n for (const token of parsed) {\n const flag: Flag = {\n name: token.name,\n value: token.value,\n absorbedNext: false,\n isGlobal: false,\n };\n if (\n token.needsNext &&\n flag.value === undefined &&\n next < tokens.length &&\n !isPathSpec(tokens[next])\n ) {\n flag.value = String(tokens[next]);\n flag.absorbedNext = true;\n next++;\n }\n flags.push(flag);\n }\n\n i = next;\n }\n\n return { flags, positionals, pathspecs };\n}\n","import type { ParsedConfigActivity } from '../args/parse-argv.types';\nimport type { Vulnerability, VulnerabilityCategory } from './vulnerability.types';\n\nexport function* detectVulnerableConfigWrites({\n write,\n}: ParsedConfigActivity): Generator<Vulnerability> {\n for (const config of write) {\n for (const helper of preventUnsafeConfig) {\n const vulnerability = helper(config.key);\n if (vulnerability) {\n yield vulnerability;\n }\n }\n }\n}\n\nfunction preventConfigBuilder(\n config: string | RegExp,\n category: VulnerabilityCategory,\n message = String(config)\n) {\n const regex = typeof config === 'string' ? new RegExp(`\\\\s*${config.toLowerCase()}`) : config;\n\n return function preventCommand(key: string): Vulnerability | void {\n if (regex.test(key)) {\n return {\n category,\n message: `Configuring ${message} is not permitted without enabling ${category}`,\n };\n }\n };\n}\n\nfunction preventExpandedConfigBuilder(config: string, category: VulnerabilityCategory) {\n const regex = new RegExp(`\\\\s*${config.toLowerCase().replace(/\\./g, '(..+)?.')}`);\n return preventConfigBuilder(regex, category, config);\n}\n\nconst preventUnsafeConfig = [\n preventConfigBuilder('alias', 'allowUnsafeAlias'),\n preventConfigBuilder('core.askPass', 'allowUnsafeAskPass'),\n preventConfigBuilder('core.editor', 'allowUnsafeEditor'),\n preventConfigBuilder('core.fsmonitor', 'allowUnsafeFsMonitor'),\n preventConfigBuilder('core.gitProxy', 'allowUnsafeGitProxy'),\n preventConfigBuilder('core.hooksPath', 'allowUnsafeHooksPath'),\n preventConfigBuilder('core.pager', 'allowUnsafePager'),\n preventConfigBuilder('core.sshCommand', 'allowUnsafeSshCommand'),\n preventExpandedConfigBuilder('credential.helper', 'allowUnsafeCredentialHelper'),\n preventExpandedConfigBuilder('diff.command', 'allowUnsafeDiffExternal'),\n preventConfigBuilder('diff.external', 'allowUnsafeDiffExternal'),\n preventExpandedConfigBuilder('difftool.cmd', 'allowUnsafeDiffExternal'),\n preventExpandedConfigBuilder('diff.textconv', 'allowUnsafeDiffTextConv'),\n preventExpandedConfigBuilder('filter.clean', 'allowUnsafeFilter'),\n preventExpandedConfigBuilder('filter.process', 'allowUnsafeFilter'),\n preventExpandedConfigBuilder('filter.smudge', 'allowUnsafeFilter'),\n preventExpandedConfigBuilder('gpg.program', 'allowUnsafeGpgProgram'),\n preventConfigBuilder('include.path', 'allowUnsafeInclude'),\n preventExpandedConfigBuilder('includeIf', 'allowUnsafeInclude'),\n preventConfigBuilder('init.templateDir', 'allowUnsafeTemplateDir'),\n preventExpandedConfigBuilder('pager.', 'allowUnsafePager'),\n preventExpandedConfigBuilder('merge.driver', 'allowUnsafeMergeDriver'),\n preventExpandedConfigBuilder('mergetool.path', 'allowUnsafeMergeDriver'),\n preventExpandedConfigBuilder('mergetool.cmd', 'allowUnsafeMergeDriver'),\n preventExpandedConfigBuilder('protocol.allow', 'allowUnsafeProtocolOverride'),\n preventExpandedConfigBuilder('remote.receivepack', 'allowUnsafePack'),\n preventExpandedConfigBuilder('remote.uploadpack', 'allowUnsafePack'),\n preventConfigBuilder('uploadpack.packObjectsHook', 'allowUnsafePack'),\n preventConfigBuilder('sequence.editor', 'allowUnsafeEditor'),\n preventExpandedConfigBuilder('submodule.update', 'allowUnsafeSubmodule'),\n preventExpandedConfigBuilder('tar.command', 'allowUnsafeCommandBinaries'),\n preventExpandedConfigBuilder('trailer.cmd', 'allowUnsafeCommandBinaries'),\n preventExpandedConfigBuilder('trailer.command', 'allowUnsafeCommandBinaries'),\n preventExpandedConfigBuilder('url.insteadOf', 'allowUnsafeUrlRewrite'),\n];\n","import type { Flag } from '../flags/flags.helpers';\nimport type { Vulnerability, VulnerabilityCategory } from './vulnerability.types';\n\nexport function* detectVulnerableFlags(\n task: null | string,\n flags: Flag[]\n): Generator<Vulnerability> {\n for (const flag of flags) {\n for (const helper of preventUnsafeFlags) {\n const vulnerability = helper(task, flag);\n if (vulnerability) {\n yield vulnerability;\n }\n }\n }\n}\n\ninterface PreventFlagOptions {\n /** Label to use in the error message in place of the matcher itself */\n name?: string;\n\n /** Only match when the switch appears before the git sub-command */\n globalOnly?: boolean;\n\n /**\n * Only match when the switch was supplied with a value - without one switches\n * such as `--git-dir` and `--exec-path` are getters rather than setters.\n */\n withValue?: boolean;\n}\n\nfunction preventFlagBuilder(\n task: string | null,\n flag: string | RegExp,\n category: VulnerabilityCategory,\n { name = String(flag), globalOnly = false, withValue = false }: PreventFlagOptions = {}\n) {\n const regex = typeof flag === 'string' ? new RegExp(`\\\\s*${flag.toLowerCase()}`) : flag;\n const message = `Use of ${task ? `${task} with option ` : ''}${name} is not permitted without enabling ${category}`;\n\n return function preventFlag(currentTask: string | null, flag: Flag): Vulnerability | void {\n if (task && currentTask !== task) {\n return;\n }\n\n if (globalOnly && !flag.isGlobal) {\n return;\n }\n\n if (withValue && flag.value === undefined) {\n return;\n }\n\n if (regex.test(flag.name)) {\n return {\n category,\n message,\n };\n }\n };\n}\n\nconst pathTakingGlobal: PreventFlagOptions = { globalOnly: true, withValue: true };\n\nconst preventUnsafeFlags = [\n preventFlagBuilder(null, /--(upload|receive)-pack/, 'allowUnsafePack', {\n name: '--upload-pack or --receive-pack',\n }),\n preventFlagBuilder('clone', /^-\\w*u/, 'allowUnsafePack'),\n preventFlagBuilder('clone', '--u', 'allowUnsafePack'),\n preventFlagBuilder('push', /^--exec$/, 'allowUnsafePack', { name: '--exec' }),\n // `git` accepts unambiguous abbreviations of long options, so `--ex` and `--exe` are `--exec`\n preventFlagBuilder('rebase', /^(-x|--ex(ec?)?)$/, 'allowUnsafeExec', { name: '-x or --exec' }),\n preventFlagBuilder(null, '--template', 'allowUnsafeTemplateDir'),\n preventFlagBuilder(null, '--exec-path', 'allowUnsafeExec', pathTakingGlobal),\n // `git` reads the configuration of whichever repository these name, so the\n // directory alone is enough to deliver config the argv guards never see\n preventFlagBuilder(null, '--git-dir', 'allowUnsafeConfigPaths', pathTakingGlobal),\n preventFlagBuilder(null, '--work-tree', 'allowUnsafeConfigPaths', pathTakingGlobal),\n preventFlagBuilder(null, /^-C$/, 'allowUnsafeConfigPaths', { ...pathTakingGlobal, name: '-C' }),\n];\n","import type { ParsedConfigActivity } from '../args/parse-argv.types';\nimport type { Flag } from '../flags/flags.helpers';\nimport { detectVulnerableConfigWrites } from './detect-vulnerable-config-writes';\nimport { detectVulnerableFlags } from './detect-vulnerable-flags';\nimport type { Vulnerability } from './vulnerability.types';\n\nexport function vulnerabilityAnalysis(\n task: null | string,\n flags: Flag[],\n config: ParsedConfigActivity\n): Vulnerability[] {\n return [...detectVulnerableFlags(task, flags), ...detectVulnerableConfigWrites(config)];\n}\n","import { collectConfigAccess } from '../config/analyse-config';\nimport type { Flag } from '../flags/flags.helpers';\nimport { parseGlobalFlags } from '../flags/parse-global-flags';\nimport { parseTaskFlags } from '../flags/parse-task-flags';\nimport type { Vulnerability } from '../vulnerabilities/vulnerability.types';\nimport { vulnerabilityAnalysis } from '../vulnerabilities/vulnerability-analysis';\nimport type { ParsedArgv, ParsedFlag } from './parse-argv.types';\n\n/**\n * Parse the tokens that would be forwarded to a `git` child-process and\n * return a structured summary of what the invocation does.\n */\nexport function parseArgv(...tokens: readonly unknown[]): ParsedArgv {\n const { flags, taskIndex } = parseGlobalFlags(tokens);\n\n const task = taskIndex < tokens.length ? String(tokens[taskIndex]).toLowerCase() : null;\n const taskTokens = task !== null ? tokens.slice(taskIndex + 1) : [];\n\n const { positionals, pathspecs } = parseTaskFlags(taskTokens, task, flags);\n const config = collectConfigAccess(task, flags, positionals);\n\n return {\n task,\n flags: flags.map(toParsedFlag),\n paths: pathspecs,\n config,\n vulnerabilities: vulnerabilityList(vulnerabilityAnalysis(task, flags, config)),\n };\n}\n\nfunction vulnerabilityList(vulnerabilities: Vulnerability[]) {\n return Object.defineProperty(vulnerabilities, 'vulnerabilities', {\n value: vulnerabilities,\n });\n}\n\nfunction toParsedFlag({ value, name }: Flag): ParsedFlag {\n return value !== undefined ? { name, value } : { name };\n}\n","import type { ConfigWrite, ParsedConfigActivity } from '../args/parse-argv.types';\nimport type { Vulnerability, VulnerabilityCategory } from '../vulnerabilities/vulnerability.types';\nimport { vulnerabilityAnalysis } from '../vulnerabilities/vulnerability-analysis';\n\nconst GitEnvKeys = {\n 'editor': 'allowUnsafeEditor',\n 'git_askpass': 'allowUnsafeAskPass',\n 'git_config_global': 'allowUnsafeConfigPaths',\n 'git_config_system': 'allowUnsafeConfigPaths',\n 'git_config_count': 'allowUnsafeConfigEnvCount',\n 'git_config_parameters': 'allowUnsafeConfigEnvCount',\n 'git_config': 'allowUnsafeConfigPaths',\n 'git_editor': 'allowUnsafeEditor',\n 'git_exec_path': 'allowUnsafeExec',\n 'git_external_diff': 'allowUnsafeDiffExternal',\n 'git_pager': 'allowUnsafePager',\n 'git_proxy_command': 'allowUnsafeGitProxy',\n 'git_template_dir': 'allowUnsafeTemplateDir',\n 'git_sequence_editor': 'allowUnsafeEditor',\n 'git_ssh': 'allowUnsafeSshCommand',\n 'git_ssh_command': 'allowUnsafeSshCommand',\n 'pager': 'allowUnsafePager',\n 'prefix': 'allowUnsafeConfigPaths',\n 'ssh_askpass': 'allowUnsafeAskPass',\n 'visual': 'allowUnsafeEditor',\n} as const satisfies Record<string, VulnerabilityCategory>;\n\ntype GitEnv = Record<string, string> & {\n git_config_count?: string;\n};\n\nfunction* collectConfigByCount(env: GitEnv): Generator<ConfigWrite> {\n const count = parseInt(env.git_config_count ?? '0', 10);\n for (let index = 0; index < count; index++) {\n const key = env[`git_config_key_${index}`];\n const value = env[`git_config_value_${index}`];\n\n if (key !== undefined) {\n yield { key: key.toLowerCase().trim(), value, scope: 'env' };\n }\n }\n}\n\nfunction* collectConfigVulnerabilities(env: GitEnv): Generator<Vulnerability> {\n for (const key of Object.keys(env)) {\n if (isGitEnvKey(key)) {\n const category = GitEnvKeys[key];\n yield {\n category,\n message: `Use of \"${key.toUpperCase()}\" is not permitted without enabling ${category}`,\n };\n }\n }\n}\n\nexport function isGitEnvKey(key: string): key is keyof typeof GitEnvKeys {\n return Object.hasOwn(GitEnvKeys, key);\n}\n\nfunction prepareEnv(env: Record<string, unknown>): GitEnv {\n const gitEnv: GitEnv = {};\n for (const [key, value] of Object.entries(env)) {\n const envKey = key.toLowerCase().trim();\n if (isGitEnvKey(envKey) || envKey.startsWith('git')) {\n gitEnv[envKey] = String(value);\n }\n }\n return gitEnv;\n}\n\nexport function parseEnv(raw: Record<string, unknown>) {\n const env = prepareEnv(raw);\n const config: ParsedConfigActivity = {\n read: [],\n write: [...collectConfigByCount(env)],\n };\n const vulnerabilities = [\n ...collectConfigVulnerabilities(env),\n ...vulnerabilityAnalysis(null, [], config),\n ];\n\n return {\n config,\n vulnerabilities,\n };\n}\n","import { parseArgv } from '../args/parse-argv';\nimport { parseEnv } from '../env/parse-env';\n\n/**\n * Retrieves just the vulnerabilities identified in the supplied varargs tokens\n * and environment variables.\n */\nexport function vulnerabilityCheck(tokens: readonly string[], env: Record<string, unknown>) {\n return [...parseArgv(...tokens).vulnerabilities, ...parseEnv(env).vulnerabilities];\n}\n"],"names":["scopedFlags","flags","scope","findGlobal","flag","CONFIG_WRITE_FLAGS","CONFIG_READ_FLAGS","CONFIG_WRITE_VERBS","CONFIG_READ_VERBS","detectConfigAction","positionals","name","configOperation","verb","isWrite","key","toOperation","operation","parseAssignment","raw","eq","detectConfigScope","detectConfigOverrideScope","collectWriteFlags","assignment","collectConfigAccess","task","parsedConfig","appendParsedConfigAction","action","config","UNIVERSAL","GLOBAL","COMMANDS","EMPTY","getFlagSpecForTask","spec","expandToken","stem","char","consumes","expandCluster","shortSpec","chars","result","i","remainder","c","parseGlobalFlags","tokens","parsed","next","token","parseTaskFlags","pathspecs","current","isPathSpec","toPaths","j","t","detectVulnerableConfigWrites","write","helper","preventUnsafeConfig","vulnerability","preventConfigBuilder","category","message","regex","preventExpandedConfigBuilder","detectVulnerableFlags","preventUnsafeFlags","preventFlagBuilder","globalOnly","withValue","currentTask","pathTakingGlobal","vulnerabilityAnalysis","parseArgv","taskIndex","taskTokens","toParsedFlag","vulnerabilityList","vulnerabilities","value","GitEnvKeys","collectConfigByCount","env","count","index","collectConfigVulnerabilities","isGitEnvKey","prepareEnv","gitEnv","envKey","parseEnv","vulnerabilityCheck"],"mappings":"6HASO,SAAUA,EAAYC,EAAeC,EAA0B,CACnE,MAAMC,EAAaD,IAAU,SAC7B,UAAWE,KAAQH,EACZG,EAAK,WAAaD,IACnB,MAAMC,EAGf,CCfO,MAAMC,MAAyB,IAAI,CACvC,QACA,SACA,mBACA,mBACA,gBACA,UACA,cACA,IACH,CAAC,EAGYC,MAAwB,IAAI,CACtC,QACA,YACA,cACA,kBACA,eACA,iBACA,SACA,IACH,CAAC,EAGYC,MAAyB,IAAI,CACvC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WL,EAAsC,CACvD,MAAMM,EAAiB,CAAA,EACvB,SAAW,CAAC9E,EAAKqE,CAAK,IAAK,OAAO,QAAQG,CAAG,EAAG,CAC7C,MAAMO,EAAS/E,EAAI,YAAA,EAAc,KAAA,GAC7B4E,EAAYG,CAAM,GAAKA,EAAO,WAAW,KAAK,KAC/CD,EAAOC,CAAM,EAAI,OAAOV,CAAK,EAEnC,CACA,OAAOS,CACV,CAEO,SAASE,EAAS5E,EAA8B,CACpD,MAAMoE,EAAMK,GAAWzE,CAAG,EACpBW,EAA+B,CAClC,KAAM,CAAA,EACN,MAAO,CAAC,GAAGwD,EAAqBC,CAAG,CAAC,CAAA,EAEjCJ,EAAkB,CACrB,GAAGO,EAA6BH,CAAG,EACnC,GAAGV,EAAsB,KAAM,CAAA,EAAI/C,CAAM,CAAA,EAG5C,MAAO,CACJ,OAAAA,EACA,gBAAAqD,CAAA,CAEN,CC9EO,SAASa,GAAmB/C,EAA2BsC,EAA8B,CACzF,MAAO,CAAC,GAAGT,EAAU,GAAG7B,CAAM,EAAE,gBAAiB,GAAG8C,EAASR,CAAG,EAAE,eAAe,CACpF"}
@@ -1,5 +1,6 @@
1
1
  export { parseArgv } from './src/args/parse-argv';
2
2
  export type { ConfigRead, ConfigScope, ConfigWrite, ParsedArgv, ParsedFlag, } from './src/args/parse-argv.types';
3
- export { parseEnv } from './src/env/parse-env';
3
+ export { isGitEnvKey, parseEnv } from './src/env/parse-env';
4
4
  export type { Vulnerability, VulnerabilityCategory, VulnerabilityCategoryFlags, } from './src/vulnerabilities/vulnerability.types';
5
5
  export { vulnerabilityCheck } from './src/vulnerabilities/vulnerability-check';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,YAAY,EACT,UAAU,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,GACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EACT,aAAa,EACb,qBAAqB,EACrB,0BAA0B,GAC5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC"}