@socketsecurity/cli 1.1.102 → 1.1.151
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.
- package/CHANGELOG.md +273 -3
- package/README.md +9 -0
- package/bin/cli.js +33 -1
- package/dist/cli.js +6598 -1912
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +8 -10
- package/dist/constants.js.map +1 -1
- package/dist/init.gradle +73 -0
- package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
- package/dist/manifest-scripts/socket-facts.init.gradle +581 -0
- package/dist/manifest-scripts/socket-facts.plugin.scala +544 -0
- package/dist/shadow-npm-bin2.js +6 -6
- package/dist/shadow-npm-bin2.js.map +1 -1
- package/dist/shadow-npm-inject.js +10 -10
- package/dist/shadow-npm-inject.js.map +1 -1
- package/dist/shadow-pnpm-bin2.js +13 -13
- package/dist/shadow-pnpm-bin2.js.map +1 -1
- package/dist/shadow-yarn-bin.js +3 -3
- package/dist/shadow-yarn-bin.js.map +1 -1
- package/dist/socket-completion.bash +0 -0
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/audit-log/output-audit-log.d.mts.map +1 -1
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +1 -1
- package/dist/types/commands/ci/handle-ci.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-get.d.mts.map +1 -1
- package/dist/types/commands/config/handle-config-set.d.mts.map +1 -1
- package/dist/types/commands/config/output-config-set.d.mts.map +1 -1
- package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/handle-fix.d.mts +1 -1
- package/dist/types/commands/fix/handle-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/types.d.mts +1 -0
- package/dist/types/commands/fix/types.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/bazel-cquery.d.mts +70 -0
- package/dist/types/commands/manifest/bazel/bazel-cquery.d.mts.map +1 -0
- package/dist/types/commands/manifest/bazel/bazel-pypi-discovery.d.mts +44 -0
- package/dist/types/commands/manifest/bazel/bazel-pypi-discovery.d.mts.map +1 -0
- package/dist/types/commands/manifest/bazel/bazel-pypi-parser.d.mts +46 -0
- package/dist/types/commands/manifest/bazel/bazel-pypi-parser.d.mts.map +1 -0
- package/dist/types/commands/manifest/bazel/bazel-query-runner.d.mts +66 -8
- package/dist/types/commands/manifest/bazel/bazel-query-runner.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/bazel-repo-discovery.d.mts +69 -29
- package/dist/types/commands/manifest/bazel/bazel-repo-discovery.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/bazel-workspace-walk.d.mts +18 -0
- package/dist/types/commands/manifest/bazel/bazel-workspace-walk.d.mts.map +1 -0
- package/dist/types/commands/manifest/bazel/cmd-manifest-bazel.d.mts +26 -0
- package/dist/types/commands/manifest/bazel/cmd-manifest-bazel.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts +110 -7
- package/dist/types/commands/manifest/bazel/extract_bazel_to_maven.d.mts.map +1 -1
- package/dist/types/commands/manifest/bazel/extract_bazel_to_pypi.d.mts +20 -0
- package/dist/types/commands/manifest/bazel/extract_bazel_to_pypi.d.mts.map +1 -0
- package/dist/types/commands/manifest/cmd-manifest-auto.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-maven.d.mts +9 -0
- package/dist/types/commands/manifest/cmd-manifest-maven.d.mts.map +1 -0
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
- package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts +9 -1
- package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts.map +1 -1
- package/dist/types/commands/manifest/convert-maven-to-facts.d.mts +15 -0
- package/dist/types/commands/manifest/convert-maven-to-facts.d.mts.map +1 -0
- package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts +19 -0
- package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts.map +1 -0
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts +2 -1
- package/dist/types/commands/manifest/convert_gradle_to_maven.d.mts.map +1 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +1 -0
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +1 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts +12 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +1 -1
- package/dist/types/commands/manifest/parse-build-tool-opts.d.mts +9 -0
- package/dist/types/commands/manifest/parse-build-tool-opts.d.mts.map +1 -0
- package/dist/types/commands/manifest/run-manifest-facts.d.mts +24 -0
- package/dist/types/commands/manifest/run-manifest-facts.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/assemble.d.mts +16 -0
- package/dist/types/commands/manifest/scripts/assemble.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/build-tool.d.mts +3 -0
- package/dist/types/commands/manifest/scripts/build-tool.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/facts.d.mts +46 -0
- package/dist/types/commands/manifest/scripts/facts.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/records.d.mts +66 -0
- package/dist/types/commands/manifest/scripts/records.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/resolution-report-gradle.d.mts +10 -0
- package/dist/types/commands/manifest/scripts/resolution-report-gradle.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/resolution-report-ivy.d.mts +7 -0
- package/dist/types/commands/manifest/scripts/resolution-report-ivy.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/resolution-report-maven.d.mts +8 -0
- package/dist/types/commands/manifest/scripts/resolution-report-maven.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts +43 -0
- package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/resolution-report.d.mts +18 -0
- package/dist/types/commands/manifest/scripts/resolution-report.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/run.d.mts +43 -0
- package/dist/types/commands/manifest/scripts/run.d.mts.map +1 -0
- package/dist/types/commands/manifest/scripts/sidecar.d.mts +27 -0
- package/dist/types/commands/manifest/scripts/sidecar.d.mts.map +1 -0
- package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +1 -1
- package/dist/types/commands/organization/fetch-organization-list.d.mts +2 -2
- package/dist/types/commands/organization/fetch-organization-list.d.mts.map +1 -1
- package/dist/types/commands/package/output-purls-shallow-score.d.mts.map +1 -1
- package/dist/types/commands/repository/fetch-create-repo.d.mts +2 -2
- package/dist/types/commands/repository/fetch-create-repo.d.mts.map +1 -1
- package/dist/types/commands/repository/fetch-delete-repo.d.mts +2 -2
- package/dist/types/commands/repository/fetch-delete-repo.d.mts.map +1 -1
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts +2 -2
- package/dist/types/commands/repository/fetch-list-all-repos.d.mts.map +1 -1
- package/dist/types/commands/repository/fetch-list-repos.d.mts +2 -2
- package/dist/types/commands/repository/fetch-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repository/fetch-update-repo.d.mts +2 -2
- package/dist/types/commands/repository/fetch-update-repo.d.mts.map +1 -1
- package/dist/types/commands/repository/fetch-view-repo.d.mts +2 -2
- package/dist/types/commands/repository/fetch-view-repo.d.mts.map +1 -1
- package/dist/types/commands/repository/handle-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repository/output-create-repo.d.mts +2 -2
- package/dist/types/commands/repository/output-create-repo.d.mts.map +1 -1
- package/dist/types/commands/repository/output-delete-repo.d.mts +2 -2
- package/dist/types/commands/repository/output-delete-repo.d.mts.map +1 -1
- package/dist/types/commands/repository/output-list-repos.d.mts +2 -2
- package/dist/types/commands/repository/output-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repository/output-update-repo.d.mts +2 -2
- package/dist/types/commands/repository/output-update-repo.d.mts.map +1 -1
- package/dist/types/commands/repository/output-view-repo.d.mts +2 -2
- package/dist/types/commands/repository/output-view-repo.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +1 -1
- package/dist/types/commands/scan/create-scan-from-github.d.mts.map +1 -1
- package/dist/types/commands/scan/exclude-paths.d.mts +2 -2
- package/dist/types/commands/scan/exclude-paths.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts +2 -2
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts +2 -2
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts +2 -2
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts +2 -2
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-scan.d.mts +4 -0
- package/dist/types/commands/scan/fetch-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +2 -1
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +1 -1
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts +9 -5
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts.map +1 -1
- package/dist/types/commands/scan/output-create-new-scan.d.mts +2 -2
- package/dist/types/commands/scan/output-create-new-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/output-delete-scan.d.mts +2 -2
- package/dist/types/commands/scan/output-delete-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/output-list-scans.d.mts +2 -2
- package/dist/types/commands/scan/output-list-scans.d.mts.map +1 -1
- package/dist/types/commands/scan/output-scan-metadata.d.mts +2 -2
- package/dist/types/commands/scan/output-scan-metadata.d.mts.map +1 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts +2 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +1 -1
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts +10 -3
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +1 -1
- package/dist/types/commands/scan/reachability-flags.d.mts.map +1 -1
- package/dist/types/commands/scan/reachability-units.d.mts +18 -0
- package/dist/types/commands/scan/reachability-units.d.mts.map +1 -0
- package/dist/types/commands/scan/stream-scan.d.mts +3 -1
- package/dist/types/commands/scan/stream-scan.d.mts.map +1 -1
- package/dist/types/constants.d.mts +2 -4
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/utils/api.d.mts +53 -7
- package/dist/types/utils/api.d.mts.map +1 -1
- package/dist/types/utils/config.d.mts.map +1 -1
- package/dist/types/utils/dlx.d.mts +4 -3
- package/dist/types/utils/dlx.d.mts.map +1 -1
- package/dist/types/utils/ecosystem.d.mts +8 -1
- package/dist/types/utils/ecosystem.d.mts.map +1 -1
- package/dist/types/utils/fs.d.mts +1 -0
- package/dist/types/utils/fs.d.mts.map +1 -1
- package/dist/types/utils/glob.d.mts +5 -4
- package/dist/types/utils/glob.d.mts.map +1 -1
- package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
- package/dist/types/utils/path-resolve.d.mts +1 -1
- package/dist/types/utils/path-resolve.d.mts.map +1 -1
- package/dist/types/utils/sdk.d.mts +6 -0
- package/dist/types/utils/sdk.d.mts.map +1 -1
- package/dist/types/utils/self-update.d.mts +3 -0
- package/dist/types/utils/self-update.d.mts.map +1 -0
- package/dist/types/utils/socket-json.d.mts +17 -0
- package/dist/types/utils/socket-json.d.mts.map +1 -1
- package/dist/types/utils/socket-package-alert.d.mts.map +1 -1
- package/dist/utils.js +614 -283
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +50578 -27781
- package/external/blessed/lib/tput.js +5 -5
- package/package.json +60 -131
- package/requirements.json +1 -1
- package/shadow-bin/npm +0 -0
- package/shadow-bin/npx +0 -0
- package/shadow-bin/pnpm +0 -0
- package/shadow-bin/yarn +0 -0
- package/dist/socket-facts.init.gradle +0 -353
- package/dist/types/commands/manifest/bazel/bazel-build-parser.d.mts +0 -34
- package/dist/types/commands/manifest/bazel/bazel-build-parser.d.mts.map +0 -1
- package/external/blessed/usr/fonts/AUTHORS +0 -1
- package/external/blessed/usr/fonts/LICENSE +0 -94
- package/external/blessed/usr/fonts/README +0 -340
- package/external/blessed/usr/fonts/ter-u14b.json +0 -17826
- package/external/blessed/usr/fonts/ter-u14n.json +0 -17826
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-audit-log.d.mts","sourceRoot":"","sources":["../../../../src/commands/audit-log/output-audit-log.mts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAKjE,wBAAsB,cAAc,CAClC,MAAM,EAAE,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC,EACpE,EACE,OAAO,EACP,OAAO,EACP,UAAU,EACV,IAAI,EACJ,OAAO,EACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB,GACA,OAAO,CAAC,IAAI,CAAC,CAkCf;AAsBD,wBAAsB,YAAY,CAChC,SAAS,EAAE,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC,EACvE,EACE,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB,GACA,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"output-audit-log.d.mts","sourceRoot":"","sources":["../../../../src/commands/audit-log/output-audit-log.mts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAKjE,wBAAsB,cAAc,CAClC,MAAM,EAAE,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC,EACpE,EACE,OAAO,EACP,OAAO,EACP,UAAU,EACV,IAAI,EACJ,OAAO,EACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB,GACA,OAAO,CAAC,IAAI,CAAC,CAkCf;AAsBD,wBAAsB,YAAY,CAChC,SAAS,EAAE,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC,EACvE,EACE,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB,GACA,OAAO,CAAC,MAAM,CAAC,CA0CjB;AAED,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,EAC9D,EACE,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB,GACA,OAAO,CAAC,MAAM,CAAC,CAiCjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-default-org-slug.d.mts","sourceRoot":"","sources":["../../../../src/commands/ci/fetch-default-org-slug.mts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,sEAAsE;AACtE,wBAAsB,iBAAiB,CACrC,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"fetch-default-org-slug.d.mts","sourceRoot":"","sources":["../../../../src/commands/ci/fetch-default-org-slug.mts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,sEAAsE;AACtE,wBAAsB,iBAAiB,CACrC,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAwD1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-ci.d.mts","sourceRoot":"","sources":["../../../../src/commands/ci/handle-ci.mts"],"names":[],"mappings":"AAaA,wBAAsB,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"handle-ci.d.mts","sourceRoot":"","sources":["../../../../src/commands/ci/handle-ci.mts"],"names":[],"mappings":"AAaA,wBAAsB,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAuEnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-config-get.d.mts","sourceRoot":"","sources":["../../../../src/commands/config/handle-config-get.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handle-config-get.d.mts","sourceRoot":"","sources":["../../../../src/commands/config/handle-config-get.mts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEzD,wBAAsB,eAAe,CAAC,EACpC,GAAG,EACH,UAAU,EACX,EAAE;IACD,GAAG,EAAE,MAAM,WAAW,CAAA;IACtB,UAAU,EAAE,UAAU,CAAA;CACvB,iBAgBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-config-set.d.mts","sourceRoot":"","sources":["../../../../src/commands/config/handle-config-set.mts"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"handle-config-set.d.mts","sourceRoot":"","sources":["../../../../src/commands/config/handle-config-set.mts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEzD,wBAAsB,eAAe,CAAC,EACpC,GAAG,EACH,UAAU,EACV,KAAK,EACN,EAAE;IACD,GAAG,EAAE,MAAM,WAAW,CAAA;IACtB,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;CACd,iBAyBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-config-set.d.mts","sourceRoot":"","sources":["../../../../src/commands/config/output-config-set.mts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE1D,wBAAsB,eAAe,CACnC,MAAM,EAAE,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,EACnC,UAAU,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"output-config-set.d.mts","sourceRoot":"","sources":["../../../../src/commands/config/output-config-set.mts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE1D,wBAAsB,eAAe,CACnC,MAAM,EAAE,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,EACnC,UAAU,EAAE,UAAU,iBAwBvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/cmd-fix.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cmd-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/cmd-fix.mts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,uCAAuC,CAAA;AAG9C,eAAO,MAAM,QAAQ,QAAQ,CAAA;AAQ7B,eAAO,MAAM,MAAM;;;;CAIlB,CAAA;AA4MD,iBAAe,GAAG,CAChB,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAClC,UAAU,EAAE,UAAU,EACtB,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAChC,OAAO,CAAC,IAAI,CAAC,CAqRf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coana-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/coana-fix.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coana-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/coana-fix.mts"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAwI9C,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC,CAAC,CAsqBjE"}
|
|
@@ -17,6 +17,6 @@ type ConvertIdsOptions = {
|
|
|
17
17
|
* Filters out invalid IDs and logs conversion results.
|
|
18
18
|
*/
|
|
19
19
|
export declare function convertIdsToGhsas(ids: string[], options?: ConvertIdsOptions | undefined): Promise<string[]>;
|
|
20
|
-
export declare function handleFix({ all, applyFixes, autopilot, coanaVersion, cwd, debug, disableExternalToolChecks, disableMajorUpdates, ecosystems, exclude, ghsas, include, minSatisfying, minimumReleaseAge, orgSlug, outputFile, outputKind, packageManagers, prCheck, prLimit, rangeStyle, showAffectedDirectDependencies, silence, spinner, unknownFlags }: HandleFixConfig): Promise<void>;
|
|
20
|
+
export declare function handleFix({ all, applyFixes, autopilot, coanaVersion, cwd, debug, disableExternalToolChecks, disableMajorUpdates, ecosystems, exclude, excludePaths, ghsas, include, minSatisfying, minimumReleaseAge, orgSlug, outputFile, outputKind, packageManagers, prCheck, prLimit, rangeStyle, showAffectedDirectDependencies, silence, spinner, unknownFlags }: HandleFixConfig): Promise<void>;
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=handle-fix.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/handle-fix.mts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAA;AAKjE,MAAM,MAAM,eAAe,GAAG,KAAK,CACjC,SAAS,GAAG;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB,CACF,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B,CAAA;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EAAE,EACb,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,GACtC,OAAO,CAAC,MAAM,EAAE,CAAC,CA2EnB;AAED,wBAAsB,SAAS,CAAC,EAC9B,GAAG,EACH,UAAU,EACV,SAAS,EACT,YAAY,EACZ,GAAG,EACH,KAAK,EACL,yBAAyB,EACzB,mBAAmB,EACnB,UAAU,EACV,OAAO,EACP,KAAK,EACL,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,UAAU,EACV,eAAe,EACf,OAAO,EACP,OAAO,EACP,UAAU,EACV,8BAA8B,EAC9B,OAAO,EACP,OAAO,EACP,YAAY,EACb,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"handle-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/handle-fix.mts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAA;AAKjE,MAAM,MAAM,eAAe,GAAG,KAAK,CACjC,SAAS,GAAG;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB,CACF,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B,CAAA;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EAAE,EACb,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,GACtC,OAAO,CAAC,MAAM,EAAE,CAAC,CA2EnB;AAED,wBAAsB,SAAS,CAAC,EAC9B,GAAG,EACH,UAAU,EACV,SAAS,EACT,YAAY,EACZ,GAAG,EACH,KAAK,EACL,yBAAyB,EACzB,mBAAmB,EACnB,UAAU,EACV,OAAO,EACP,YAAY,EACZ,KAAK,EACL,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,UAAU,EACV,eAAe,EACf,OAAO,EACP,OAAO,EACP,UAAU,EACV,8BAA8B,EAC9B,OAAO,EACP,OAAO,EACP,YAAY,EACb,EAAE,eAAe,iBA4DjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/types.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAEnE,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,OAAO,CAAA;IACZ,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,OAAO,CAAA;IACd,yBAAyB,EAAE,OAAO,CAAA;IAClC,mBAAmB,EAAE,OAAO,CAAA;IAC5B,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,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A;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,8BAA8B,EAAE,OAAO,CAAA;IACvC,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { BazelQueryOptions } from './bazel-query-runner.mts';
|
|
2
|
+
// One Maven artifact recovered from the cquery stream. `ruleKind` is whatever
|
|
3
|
+
// `ruleClass` jsonproto reports (`jvm_import`, `aar_import`, `java_library`,
|
|
4
|
+
// `kt_jvm_import`, any future rules_jvm_external rule), so the type is open.
|
|
5
|
+
// `deps` holds resolved versionless Maven coordinates (the parser resolves the
|
|
6
|
+
// rule's label edges against this repo's own targets), not raw Bazel labels.
|
|
7
|
+
export type ExtractedArtifact = {
|
|
8
|
+
deps: string[];
|
|
9
|
+
mavenCoordinates: string;
|
|
10
|
+
ruleKind: string;
|
|
11
|
+
ruleName: string;
|
|
12
|
+
sourceRepo?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type CqueryStatus = 'ok' | 'partial' | 'timeout' | 'empty' | 'error';
|
|
15
|
+
export type CqueryRepoResult = {
|
|
16
|
+
repoName: string;
|
|
17
|
+
workspaceRelPath: string;
|
|
18
|
+
status: CqueryStatus;
|
|
19
|
+
artifacts: ExtractedArtifact[];
|
|
20
|
+
// Hub-prefixed dep labels the parser could not resolve to a coordinate
|
|
21
|
+
// (missing target or ambiguous suffix). A non-empty list means the graph
|
|
22
|
+
// is known-incomplete; the orchestrator flips the hub partial.
|
|
23
|
+
unresolvedLabels: string[];
|
|
24
|
+
stderr: string;
|
|
25
|
+
durationMs: number;
|
|
26
|
+
};
|
|
27
|
+
export type RunMetadataCqueryArgs = {
|
|
28
|
+
repoName: string;
|
|
29
|
+
workspaceRoot: string;
|
|
30
|
+
// Provenance label (e.g. "examples/dagger"). Empty string for the root
|
|
31
|
+
// workspace. Embedded in each artifact's `sourceRepo` as
|
|
32
|
+
// `workspace:<path>+repo:<name>`.
|
|
33
|
+
workspaceRelPath: string;
|
|
34
|
+
// Per-repo timeout in milliseconds. 60s default for auto-manifest;
|
|
35
|
+
// 120s for explicit invocation. Orchestrator picks; runner just enforces.
|
|
36
|
+
timeoutMs: number;
|
|
37
|
+
opts: BazelQueryOptions;
|
|
38
|
+
};
|
|
39
|
+
// Result of parsing one repo's cquery stream: the recovered artifacts (with
|
|
40
|
+
// resolved coordinate edges in `deps`) plus any hub-prefixed dep labels that
|
|
41
|
+
// could not be resolved.
|
|
42
|
+
export type ParseCqueryResult = {
|
|
43
|
+
artifacts: ExtractedArtifact[];
|
|
44
|
+
unresolvedLabels: string[];
|
|
45
|
+
};
|
|
46
|
+
// Build the full cquery argv for a per-repo metadata cquery. Exposed for
|
|
47
|
+
// argv-shape unit tests without touching `spawn`.
|
|
48
|
+
export declare function buildMetadataCqueryArgv(repoName: string, opts: BazelQueryOptions): string[];
|
|
49
|
+
// Strip the trailing version segment from a Maven coordinate, preserving any
|
|
50
|
+
// packaging/classifier segments. `g:a:v` -> `g:a`,
|
|
51
|
+
// `g:a:packaging:v` -> `g:a:packaging`,
|
|
52
|
+
// `g:a:packaging:classifier:v` -> `g:a:packaging:classifier`. Coordinates with
|
|
53
|
+
// fewer than 3 segments have no version to strip and are returned unchanged.
|
|
54
|
+
// This matches depscan's `coordinateToParts` keying (position 3 = extension,
|
|
55
|
+
// position 4 = classifier on the versionless key), so AAR/classifier artifacts
|
|
56
|
+
// key correctly instead of being mis-keyed as bare `group:artifact` jars.
|
|
57
|
+
export declare function versionlessCoordinate(coord: string): string;
|
|
58
|
+
// Pure parser for the jsonproto cquery stream. Returns one
|
|
59
|
+
// `ExtractedArtifact` per rule with a recoverable maven coordinate (its `deps`
|
|
60
|
+
// holding resolved versionless coordinates) plus the set of hub-prefixed dep
|
|
61
|
+
// labels that could not be resolved. The `sourceRepo` field carries
|
|
62
|
+
// `<workspaceRelPath>:<repoName>` provenance when a workspace path was
|
|
63
|
+
// provided; otherwise just the repo name.
|
|
64
|
+
export declare function parseCqueryJsonproto(stdout: string, repoName: string, workspaceRelPath: string): ParseCqueryResult;
|
|
65
|
+
// Spawn the per-repo metadata cquery, parse the result, and return a
|
|
66
|
+
// structured outcome. On spawn timeout, return `status: 'timeout'` so the
|
|
67
|
+
// orchestrator can reap the server (`bazel --output_user_root=<dir>
|
|
68
|
+
// shutdown` + `rm -rf`) before moving on.
|
|
69
|
+
export declare function runMetadataCqueryForRepo(args: RunMetadataCqueryArgs): Promise<CqueryRepoResult>;
|
|
70
|
+
//# sourceMappingURL=bazel-cquery.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bazel-cquery.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/bazel-cquery.mts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,8EAA8E;AAC9E,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,gBAAgB,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAE3E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,YA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CAA0C;AAC1C,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAwE3B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RepoProbe } from './bazel-repo-discovery.mts';
|
|
2
|
+
// Result shape returned by `validatePypiHub`. Kept local to the PyPI module
|
|
3
|
+
// since validation here is hub-alias-marker based (different from the
|
|
4
|
+
// Maven-side tri-state classifier).
|
|
5
|
+
export type ValidationResult = {
|
|
6
|
+
valid: boolean;
|
|
7
|
+
// Probe stdout — populated whenever the probe was reachable, even when
|
|
8
|
+
// validation rejects the hub. Empty string when the probe itself threw.
|
|
9
|
+
stdout: string;
|
|
10
|
+
};
|
|
11
|
+
// Parse `bazel mod dump_repo_mapping "" --output=json` output. Also accepts
|
|
12
|
+
// the older streamed jsonproto shape (apparentName / apparent_name records).
|
|
13
|
+
// PyPI-only; the Maven path consumes `bazel mod show_extension` instead.
|
|
14
|
+
export declare function parseVisibleRepoCandidates(output: string): string[];
|
|
15
|
+
export type PypiHubInfo = {
|
|
16
|
+
hubName: string;
|
|
17
|
+
source: 'MODULE.bazel' | 'WORKSPACE' | 'WORKSPACE.bazel' | '.bzl' | 'visible-repos' | 'default-seed' | 'bazel-mod-show-extension';
|
|
18
|
+
workspaceMode: 'bzlmod' | 'legacy' | 'unknown';
|
|
19
|
+
pythonVersion?: string | undefined;
|
|
20
|
+
requirementsLockLabel?: string | undefined;
|
|
21
|
+
requirementsLockPath?: string | undefined;
|
|
22
|
+
probeStdout: string;
|
|
23
|
+
visibleRepoNames?: string[] | undefined;
|
|
24
|
+
};
|
|
25
|
+
export type PypiHubCandidate = Omit<PypiHubInfo, 'probeStdout' | 'visibleRepoNames'>;
|
|
26
|
+
export declare function parseBazelModPipExtensionCandidates(stdout: string, verbose?: boolean): PypiHubCandidate[];
|
|
27
|
+
// Step 1: parse candidate pip hub names from Bzlmod MODULE.bazel and legacy
|
|
28
|
+
// WORKSPACE / .bzl entry points.
|
|
29
|
+
//
|
|
30
|
+
// Precedence: Bzlmod (MODULE.bazel pip.parse) hits are pushed first, then
|
|
31
|
+
// legacy (pip_parse / pip_install / pip_repository) hits. dedupCapped keeps
|
|
32
|
+
// the first occurrence, so during migration scenarios where both
|
|
33
|
+
// MODULE.bazel and WORKSPACE define a hub with the same name, the Bzlmod
|
|
34
|
+
// entry wins implicitly. Pass verbose=true to surface dropped duplicates.
|
|
35
|
+
export declare function parsePypiHubCandidates(cwd: string, verbose?: boolean): PypiHubCandidate[];
|
|
36
|
+
// Step 2: validate a candidate by running the probe and confirming
|
|
37
|
+
// `:pkg` labels or alias rules appear in stdout. Does NOT require
|
|
38
|
+
// `pypi_name=` (that marker lives on spoke repos).
|
|
39
|
+
export declare function validatePypiHub(hubName: string, probe: RepoProbe, verbose?: boolean): Promise<ValidationResult>;
|
|
40
|
+
// Composition: parse, then validate each candidate; return validated subset
|
|
41
|
+
// as a Map keyed by hub name with the validated PypiHubInfo.
|
|
42
|
+
// Always seeds with the default 'pypi' hub name first.
|
|
43
|
+
export declare function discoverPypiHubs(cwd: string, probe: RepoProbe, nativeCandidates?: string[], verbose?: boolean, bazelCommandCandidates?: PypiHubCandidate[]): Promise<Map<string, PypiHubInfo>>;
|
|
44
|
+
//# sourceMappingURL=bazel-pypi-discovery.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bazel-pypi-discovery.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/bazel-pypi-discovery.mts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAE3D,4EAA4E;AAC5E,sEAAsE;AACtE,oCAAoC;AACpC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,OAAO,CAAA;IACd,yEAAuE;IACvE,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AA6CD,4EAA4E;AAC5E,6EAA6E;A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AE,MAAM,EACX,KAAK,EAAE,SAAS,EAChB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,OAAO,EACjB,sBAAsB,CAAC,EAAE,gBAAgB,EAAE,GAC1C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAyDnC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type ExtractedPypiPackage = {
|
|
2
|
+
name: string;
|
|
3
|
+
version: string;
|
|
4
|
+
bazelName: string;
|
|
5
|
+
source?: 'lockfile' | 'spoke-tag' | undefined;
|
|
6
|
+
originalLine?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type ReachedPypiLabel = {
|
|
9
|
+
hubName: string;
|
|
10
|
+
originalLabel: string;
|
|
11
|
+
bazelName: string;
|
|
12
|
+
normalizedName: string;
|
|
13
|
+
apparentLabel: string;
|
|
14
|
+
spokeLabel?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
// Normalize a PyPI package name per PEP 503:
|
|
17
|
+
// lowercase, then collapse `.`, `_`, and `-` runs to a single `-`.
|
|
18
|
+
export declare function normalizePypiName(name: string): string;
|
|
19
|
+
// Convert a Bazel underscore_name to a PyPI hyphenated-name.
|
|
20
|
+
export declare function bazelNameToPypiName(bazelName: string): string;
|
|
21
|
+
// Resolves a Bazel label or workspace-relative path to a filesystem path.
|
|
22
|
+
// Returns undefined for labels that cannot be resolved locally.
|
|
23
|
+
export declare function resolveRequirementsLockPath(label: string | undefined, cwd: string): string | undefined;
|
|
24
|
+
// Parse a `requirements_lock.txt`-style file into a map keyed by normalized
|
|
25
|
+
// PyPI name. This intentionally ignores unpinned PEP 508 requirement forms
|
|
26
|
+
// because the Bazel extractor must emit exact package versions.
|
|
27
|
+
export declare function parseRequirementsLock(text: string): Map<string, ExtractedPypiPackage>;
|
|
28
|
+
// Read and parse a requirements lockfile from a resolved path, capping file
|
|
29
|
+
// size. Returns undefined when the file is missing, oversized, or unreadable.
|
|
30
|
+
export declare function readRequirementsLockFile(resolvedPath: string | undefined): Map<string, ExtractedPypiPackage> | undefined;
|
|
31
|
+
export declare function parsePypiTagsFromBuildOutput(text: string): ExtractedPypiPackage | null;
|
|
32
|
+
export declare function parseAliasActualFromBuildOutput(text: string): string | undefined;
|
|
33
|
+
// Extract hub package labels from `bazel query` output that match
|
|
34
|
+
// `@<hub>//<name>:pkg` patterns (both line-start and embedded in
|
|
35
|
+
// `--output=build` deps arrays).
|
|
36
|
+
export declare function filterReachedPypiPackages(queryOutput: string, hubName: string): ReachedPypiLabel[];
|
|
37
|
+
// Collect name==version pairs for the reached closure, resolving versions
|
|
38
|
+
// from the lockfile fast path or spoke-tag fallback. Enforces version
|
|
39
|
+
// conflict detection and deterministic output.
|
|
40
|
+
export declare function collectPypiPackages(reached: ReachedPypiLabel[], lockfile: Map<string, ExtractedPypiPackage> | undefined, spokeTagLookup: Map<string, ExtractedPypiPackage> | undefined): Array<{
|
|
41
|
+
name: string;
|
|
42
|
+
version: string;
|
|
43
|
+
source: string;
|
|
44
|
+
label: string;
|
|
45
|
+
}>;
|
|
46
|
+
//# sourceMappingURL=bazel-pypi-parser.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bazel-pypi-parser.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/bazel-pypi-parser.mts"],"names":[],"mappings":"AAoBA,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,CAAA;IAC7C,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;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AG,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAAG,SAAS,GAC5D,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAqDzE"}
|
|
@@ -6,6 +6,13 @@ export type BazelQueryOptions = {
|
|
|
6
6
|
bazelRc?: string;
|
|
7
7
|
bazelFlags?: string;
|
|
8
8
|
bazelOutputBase?: string;
|
|
9
|
+
// Per-invocation `--output_user_root` for server isolation. When set, all
|
|
10
|
+
// argv builders inject it as a startup flag so a timed-out Bazel server
|
|
11
|
+
// can be reaped via `bazel --output_user_root=<this> shutdown` + `rm -rf`
|
|
12
|
+
// without disturbing the user's shared output_user_root. The Maven
|
|
13
|
+
// orchestrator mkdtemp's a fresh path per invocation; the legacy PyPI
|
|
14
|
+
// path may leave it unset for now.
|
|
15
|
+
outputUserRoot?: string;
|
|
9
16
|
env?: NodeJS.ProcessEnv;
|
|
10
17
|
verbose?: boolean;
|
|
11
18
|
};
|
|
@@ -19,23 +26,74 @@ export type BazelQueryResult = {
|
|
|
19
26
|
// whitespace are not supported (documented limitation; same trust model as
|
|
20
27
|
// gradleOpts).
|
|
21
28
|
export declare function splitBazelFlags(flags: string | undefined): string[];
|
|
29
|
+
// Build the shared startup-flag prefix for any bazel invocation. Centralised
|
|
30
|
+
// so `--output_user_root` propagates to every spawn — principle 7 of the
|
|
31
|
+
// Maven design requires per-invocation server isolation across query,
|
|
32
|
+
// cquery, and `bazel mod` commands alike.
|
|
33
|
+
declare function buildStartupFlags(opts: BazelQueryOptions): string[];
|
|
34
|
+
declare function buildBazelModShowVisibleReposArgv(opts: BazelQueryOptions): string[];
|
|
35
|
+
declare function buildBazelModShowMavenExtensionArgv(opts: BazelQueryOptions): string[];
|
|
36
|
+
declare function buildBazelModShowPipExtensionArgv(opts: BazelQueryOptions): string[];
|
|
37
|
+
declare function buildBazelArgv(queryStr: string, opts: BazelQueryOptions, output?: string): string[];
|
|
38
|
+
// Lightweight presence-check cquery used by the tri-state probe classifier.
|
|
39
|
+
// `--keep_going --output=label` keeps it fast even on partial-analysis
|
|
40
|
+
// repos and avoids paying for `--output=jsonproto` plus
|
|
41
|
+
// `--proto:output_rule_attrs` (which the heavier metadata extraction in
|
|
42
|
+
// `bazel-cquery.mts` needs but the probe does not).
|
|
43
|
+
declare function buildBazelProbeCqueryArgv(repoName: string, opts: BazelQueryOptions): string[];
|
|
22
44
|
/**
|
|
23
45
|
* Run `bazel query` with the standardized argv shape and capture
|
|
24
46
|
* stdout/stderr/code. Wraps the call in a spinner that resolves on success
|
|
25
47
|
* and fails on non-zero exit. Rejected spawn calls are normalized into a
|
|
26
48
|
* BazelQueryResult so retry/skip handling can inspect stderr.
|
|
27
49
|
*/
|
|
28
|
-
export declare function runBazelQuery(queryStr: string, opts: BazelQueryOptions): Promise<BazelQueryResult>;
|
|
50
|
+
export declare function runBazelQuery(queryStr: string, opts: BazelQueryOptions, output?: string): Promise<BazelQueryResult>;
|
|
29
51
|
/**
|
|
30
|
-
* Bzlmod-native visible repository enumeration.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
52
|
+
* Bzlmod-native visible repository enumeration. NOTE: only consumed by the
|
|
53
|
+
* legacy PyPI path; the Maven path uses `runBazelModShowMavenExtension`
|
|
54
|
+
* instead because `dump_repo_mapping` over-enumerates apparent names that
|
|
55
|
+
* are not Maven hubs.
|
|
33
56
|
*/
|
|
34
57
|
export declare function runBazelModShowVisibleRepos(opts: BazelQueryOptions): Promise<BazelQueryResult>;
|
|
35
58
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
59
|
+
* Bzlmod-native Maven hub enumeration via the rules_jvm_external maven
|
|
60
|
+
* extension. The text-format report lists every repo the extension
|
|
61
|
+
* generated; `parseShowExtensionOutput` (bazel-repo-discovery.mts)
|
|
62
|
+
* extracts the hubs from the `Fetched repositories:` section.
|
|
39
63
|
*/
|
|
40
|
-
export declare function
|
|
64
|
+
export declare function runBazelModShowMavenExtension(opts: BazelQueryOptions): Promise<BazelQueryResult>;
|
|
65
|
+
/**
|
|
66
|
+
* Bzlmod-native rules_python pip extension usage inspection. Used by the
|
|
67
|
+
* PyPI path; kept here since the argv shape is identical to the maven
|
|
68
|
+
* variant modulo the extension target.
|
|
69
|
+
*/
|
|
70
|
+
export declare function runBazelModShowPipExtension(opts: BazelQueryOptions): Promise<BazelQueryResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Build a `RepoProbe` (compatible with bazel-repo-discovery's tri-state
|
|
73
|
+
* classifier) bound to opts. Runs the lightweight presence-check cquery
|
|
74
|
+
* `@<name>//... --output=label --keep_going` — cheap enough to attempt
|
|
75
|
+
* every conventional Maven hub name without triggering `repository_rule`
|
|
76
|
+
* fetches on undefined names (Exp 3).
|
|
77
|
+
*/
|
|
78
|
+
export declare function buildMavenProbeFor(opts: BazelQueryOptions): RepoProbe;
|
|
79
|
+
/**
|
|
80
|
+
* Build a `RepoProbe` for validating pip hub candidates.
|
|
81
|
+
* Queries the hub for package targets (e.g. `@<hub>//...`) and returns the
|
|
82
|
+
* full result triple so the caller can check for `:pkg` labels or alias
|
|
83
|
+
* rules. Does NOT require `pypi_name=` tags in the hub output, because
|
|
84
|
+
* those tags live on spoke repos, not the hub alias layer.
|
|
85
|
+
*/
|
|
86
|
+
export declare function buildPypiProbeFor(opts: BazelQueryOptions): RepoProbe;
|
|
87
|
+
// Re-exported for direct test access — useful when asserting on argv shape
|
|
88
|
+
// without spawning. Returns the exact argv `runBazelModShowMavenExtension`
|
|
89
|
+
// would pass to spawn.
|
|
90
|
+
export declare const _internalArgvBuilders: {
|
|
91
|
+
buildBazelArgv: typeof buildBazelArgv;
|
|
92
|
+
buildBazelModShowMavenExtensionArgv: typeof buildBazelModShowMavenExtensionArgv;
|
|
93
|
+
buildBazelModShowPipExtensionArgv: typeof buildBazelModShowPipExtensionArgv;
|
|
94
|
+
buildBazelModShowVisibleReposArgv: typeof buildBazelModShowVisibleReposArgv;
|
|
95
|
+
buildBazelProbeCqueryArgv: typeof buildBazelProbeCqueryArgv;
|
|
96
|
+
buildStartupFlags: typeof buildStartupFlags;
|
|
97
|
+
};
|
|
98
|
+
export {};
|
|
41
99
|
//# sourceMappingURL=bazel-query-runner.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bazel-query-runner.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/bazel-query-runner.mts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;
|
|
1
|
+
{"version":3,"file":"bazel-query-runner.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/bazel-query-runner.mts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MA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AChB,IAAI,EAAE,iBAAiB,EACvB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAsC3B;AAiCD;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,SAAS,CAUrE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,SAAS,CAMpE;AAED,6EAA2E;AAC3E,2EAA2E;AAC3E,uBAAuB;AACvB,eAAO,MAAM,qBAAqB;;;;;;;CAOjC,CAAA"}
|
|
@@ -1,34 +1,74 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
// The importer token Bazel prints for a hub generated for the root module
|
|
2
|
+
// itself (`(imported by <root>, …)`). Hubs imported only by rulesets
|
|
3
|
+
// (`rules_jvm_external@6.7`, `stardoc@0.7.2`, …) are build-tooling, not the
|
|
4
|
+
// user's SBOM, and are filtered out by the orchestrator.
|
|
5
|
+
export declare const ROOT_MODULE_IMPORTER = "<root>";
|
|
6
|
+
// One hub repo from a `bazel mod show_extension` report: its name plus the
|
|
7
|
+
// modules that imported it (the `(imported by …)` annotation), merged across
|
|
8
|
+
// every line the repo appears on.
|
|
9
|
+
export type ShowExtensionRepo = {
|
|
10
|
+
name: string;
|
|
11
|
+
importers: string[];
|
|
12
|
+
};
|
|
13
|
+
export type ProbeResult = {
|
|
9
14
|
code: number;
|
|
10
|
-
}>;
|
|
11
|
-
export type ValidationResult = {
|
|
12
|
-
valid: boolean;
|
|
13
|
-
// Probe stdout — populated whenever the probe was reachable, even when
|
|
14
|
-
// validation rejects the repo. Empty string when the probe itself threw.
|
|
15
15
|
stdout: string;
|
|
16
|
+
stderr: string;
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
-
// `
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
18
|
+
export type RepoProbe = (repoName: string) => Promise<ProbeResult>;
|
|
19
|
+
// `indeterminate` means the probe could not be classified: an unrecognized
|
|
20
|
+
// non-zero exit, or the probe threw outright (the Bazel invocation itself
|
|
21
|
+
// failed). It is NOT evidence that the repo is undefined — treating it as
|
|
22
|
+
// `not-defined` would silently under-report a hub that may well hold Maven
|
|
23
|
+
// deps. The orchestrator must propagate it so the run is never reported
|
|
24
|
+
// `complete` when a probe was indeterminate.
|
|
25
|
+
export type ProbeStatus = 'populated' | 'empty' | 'not-defined' | 'indeterminate';
|
|
26
|
+
// Conventional Maven hub names rules_jvm_external sets up under
|
|
27
|
+
// WORKSPACE-mode invocations. Probing each one is cheap (a failed visibility
|
|
28
|
+
// lookup never triggers a `repository_rule` fetch) so the orchestrator can
|
|
29
|
+
// try them all without paying the cost of a real cquery on undefined repos.
|
|
30
|
+
export declare const CONVENTIONAL_MAVEN_REPO_NAMES: readonly string[];
|
|
31
|
+
// Outcome of running `bazel mod show_extension` for the maven extension,
|
|
32
|
+
// distinct from the per-repo `ProbeStatus`:
|
|
33
|
+
// `not-defined` — authoritative: no maven extension in this workspace
|
|
34
|
+
// (clean run with zero kept hubs, OR rules_jvm_external is
|
|
35
|
+
// not in the dependency graph).
|
|
36
|
+
// `indeterminate` — enumeration could not be performed (eval/load failure,
|
|
37
|
+
// binary missing); the run must not be reported complete.
|
|
38
|
+
// `defined` — the report parsed and yielded one or more root hubs;
|
|
39
|
+
// the caller uses the parsed hub list directly.
|
|
40
|
+
export type ShowExtensionStatus = 'defined' | 'indeterminate' | 'not-defined';
|
|
41
|
+
// Classify a `bazel mod show_extension` result. `keptRootHubCount` is the
|
|
42
|
+
// number of root-imported hubs the caller parsed from a code-0 run (see
|
|
43
|
+
// `parseShowExtensionOutput` + the `<root>` importer filter); it disambiguates
|
|
44
|
+
// the code-0 cases without re-parsing here.
|
|
29
45
|
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
|
|
46
|
+
// IMPORTANT (security correctness): a non-zero exit is the DEFAULT outcome for
|
|
47
|
+
// every bzlmod repo that does not use rules_jvm_external, so we must NOT treat
|
|
48
|
+
// non-zero as indeterminate by default. We only escalate to `indeterminate`
|
|
49
|
+
// when stderr looks like a real evaluation/load failure; an argument/resolution
|
|
50
|
+
// error about the missing extension is the legitimate no-Maven case.
|
|
51
|
+
export declare function classifyShowExtensionResult(result: ProbeResult, keptRootHubCount: number): ShowExtensionStatus;
|
|
52
|
+
// Pure parser for `bazel mod show_extension @rules_jvm_external//:extensions.bzl%maven`
|
|
53
|
+
// stdout. Returns the hub repos listed under `Fetched repositories:` — i.e.
|
|
54
|
+
// items annotated with `(imported by ...)` — each carrying the set of modules
|
|
55
|
+
// that imported it. Generated per-artifact repos (no annotation) are skipped.
|
|
56
|
+
// A repo can legitimately appear on multiple lines with different importers,
|
|
57
|
+
// so importers are merged per repo (name-only dedupe would lose that, and the
|
|
58
|
+
// importers data is what lets the orchestrator keep only root-imported hubs).
|
|
59
|
+
// Output is sorted by name. Tolerant of `DEBUG:` / `WARNING:` lines from
|
|
60
|
+
// Bazel; the section header `## @@<canonical>//:extensions.bzl%maven:` is the
|
|
61
|
+
// anchor.
|
|
62
|
+
export declare function parseShowExtensionOutput(stdout: string): ShowExtensionRepo[];
|
|
63
|
+
// Classify a raw probe result into one of three states. The probe contract
|
|
64
|
+
// is whatever the runner emits — typically a lightweight
|
|
65
|
+
// `cquery '@<name>//...' --keep_going --output=label`. The orchestrator
|
|
66
|
+
// treats `empty` and `not-defined` uniformly as no-ops; the distinction
|
|
67
|
+
// is preserved for verbose-mode diagnostics.
|
|
68
|
+
export declare function classifyProbeResult(result: ProbeResult): ProbeStatus;
|
|
69
|
+
// Convenience: probe a single candidate and return its classified status,
|
|
70
|
+
// with optional verbose logging. Pure orchestration around `probe` +
|
|
71
|
+
// `classifyProbeResult`; isolated so the test suite can exercise the
|
|
72
|
+
// logging contract independently of the runner implementation.
|
|
73
|
+
export declare function probeCandidate(repoName: string, probe: RepoProbe, verbose?: boolean): Promise<ProbeStatus>;
|
|
34
74
|
//# sourceMappingURL=bazel-repo-discovery.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bazel-repo-discovery.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/bazel-repo-discovery.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bazel-repo-discovery.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/bazel-repo-discovery.mts"],"names":[],"mappings":"AAgBA,0EAA0E;AAC1E,uEAAqE;AACrE,8EAA4E;AAC5E,yDAAyD;AACzD,eAAO,MAAM,oBAAoB,WAAW,CAAA;AAE5C,2EAA2E;AAC3E,+EAA6E;AAC7E,kCAAkC;AAClC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAA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S,EAChB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,WAAW,CAAC,CAuBtB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type FindWorkspaceRootsOptions = {
|
|
2
|
+
cwd: string;
|
|
3
|
+
// Directory basenames to skip outright (exact match). Pass the union of
|
|
4
|
+
// the codebase-wide ignore set (`IGNORED_DIRS` in `src/utils/glob.mts`)
|
|
5
|
+
// and any caller-specific additions (e.g. `.socket-auto-manifest`).
|
|
6
|
+
ignoreDirNames?: ReadonlySet<string>;
|
|
7
|
+
// Directory basename prefixes to skip. Bazel callers pass `['bazel-']` so
|
|
8
|
+
// the walk never descends into Bazel's output_base symlinks.
|
|
9
|
+
ignoreDirPrefixes?: readonly string[];
|
|
10
|
+
// Visited-directory budget override (testing); defaults to MAX_WALK_DIRS.
|
|
11
|
+
maxWalkDirs?: number;
|
|
12
|
+
verbose?: boolean;
|
|
13
|
+
};
|
|
14
|
+
// Walks the tree rooted at `opts.cwd` and returns absolute paths to every
|
|
15
|
+
// directory that contains at least one workspace marker file. Output is
|
|
16
|
+
// sorted for determinism and capped at MAX_WORKSPACE_ROOTS.
|
|
17
|
+
export declare function findWorkspaceRoots(opts: FindWorkspaceRootsOptions): string[];
|
|
18
|
+
//# sourceMappingURL=bazel-workspace-walk.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bazel-workspace-walk.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/bazel-workspace-walk.mts"],"names":[],"mappings":"AA+CA,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,wEAAwE;IACxE,wEAAwE;IACxE,oEAAoE;IACpE,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACpC,0EAA0E;IAC1E,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAKD,0EAA0E;AAC1E,wEAAwE;AACxE,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,yBAAyB,GAAG,MAAM,EAAE,CAyF5E"}
|
|
@@ -1,9 +1,35 @@
|
|
|
1
|
+
import type { ExtractBazelStatus } from './extract_bazel_to_maven.mts';
|
|
1
2
|
import type { CliCommandContext } from '../../../utils/meow-with-subcommands.mts';
|
|
2
3
|
export declare const cmdManifestBazel: {
|
|
3
4
|
description: string;
|
|
4
5
|
hidden: boolean;
|
|
5
6
|
run: typeof run;
|
|
6
7
|
};
|
|
8
|
+
export type EcosystemOutcome = {
|
|
9
|
+
ecosystem: 'maven' | 'pypi';
|
|
10
|
+
status: ExtractBazelStatus;
|
|
11
|
+
manifestPaths: string[];
|
|
12
|
+
// Machine-readable completeness signal. True only when the ecosystem's
|
|
13
|
+
// extraction was complete; a `partial` upload sets this false so the CLI
|
|
14
|
+
// surfaces it honestly (exit 0 + prominent warning) rather than as plain
|
|
15
|
+
// success.
|
|
16
|
+
complete: boolean;
|
|
17
|
+
};
|
|
18
|
+
// Pure outcome-matrix evaluator. Exported so dispatcher behavior can be
|
|
19
|
+
// unit-tested without spawning the CLI binary. Throws InputError on
|
|
20
|
+
// failures that must propagate to a non-zero CLI exit; returns void on
|
|
21
|
+
// success.
|
|
22
|
+
//
|
|
23
|
+
// - `complete`/`partial` both count as produced output (>=1 manifest).
|
|
24
|
+
// `partial` additionally warns — a known-incomplete SBOM is still emitted,
|
|
25
|
+
// not a hard error.
|
|
26
|
+
// - `hardFailure`: the ecosystem was detected (or the runner crashed) but
|
|
27
|
+
// wrote zero manifests. Always a non-zero exit, even when another
|
|
28
|
+
// ecosystem succeeded.
|
|
29
|
+
// - `noEcosystem`: genuinely absent ecosystem. Auto-detect mode tolerates it
|
|
30
|
+
// when at least one other ecosystem produced output; explicit mode treats
|
|
31
|
+
// it as an error (the user requested an ecosystem that isn't there).
|
|
32
|
+
export declare function evaluateEcosystemOutcomes(outcomes: readonly EcosystemOutcome[], isExplicit: boolean): void;
|
|
7
33
|
declare function run(argv: string[] | readonly string[], importMeta: ImportMeta, { parentName }: CliCommandContext): Promise<void>;
|
|
8
34
|
export {};
|
|
9
35
|
//# sourceMappingURL=cmd-manifest-bazel.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd-manifest-bazel.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/cmd-manifest-bazel.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cmd-manifest-bazel.d.mts","sourceRoot":"","sources":["../../../../../src/commands/manifest/bazel/cmd-manifest-bazel.mts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,0CAA0C,CAAA;AA6FjD,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,GAAG,MAAM,CAAA;IAC3B,MAAM,EAAE,kBAAkB,CAAA;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,uEAAuE;IACvE,yEAAyE;IACzE,yEAAyE;IACzE,WAAW;IACX,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,wEAAwE;AACxE,oEAAoE;AACpE,uEAAuE;AACvE,WAAW;AACX,EAAE;AACF,uEAAuE;AACvE,+EAA6E;AAC7E,sBAAsB;AACtB,0EAA0E;AAC1E,oEAAoE;AACpE,yBAAyB;AACzB,6EAA6E;AAC7E,4EAA4E;AAC5E,uEAAuE;AACvE,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,UAAU,EAAE,OAAO,GAClB,IAAI,CAwDN;AA2BD,iBAAe,GAAG,CAChB,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAClC,UAAU,EAAE,UAAU,EACtB,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAChC,OAAO,CAAC,IAAI,CAAC,CA4Lf"}
|