putitoutthere 0.3.25 → 0.3.27
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/dist/action.d.ts +2 -6
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +17 -23
- package/dist/action.js.map +1 -1
- package/dist/advance-floating-major.d.ts +3 -15
- package/dist/advance-floating-major.d.ts.map +1 -1
- package/dist/advance-floating-major.js +3 -15
- package/dist/advance-floating-major.js.map +1 -1
- package/dist/advance-v0.d.ts +3 -11
- package/dist/advance-v0.d.ts.map +1 -1
- package/dist/advance-v0.js +3 -11
- package/dist/advance-v0.js.map +1 -1
- package/dist/build-requires-declares.d.ts.map +1 -1
- package/dist/build-requires-declares.js +3 -16
- package/dist/build-requires-declares.js.map +1 -1
- package/dist/cargo-dep-entries.d.ts +4 -12
- package/dist/cargo-dep-entries.d.ts.map +1 -1
- package/dist/cargo-dep-entries.js +4 -12
- package/dist/cargo-dep-entries.js.map +1 -1
- package/dist/cascade.d.ts +4 -22
- package/dist/cascade.d.ts.map +1 -1
- package/dist/cascade.js +4 -22
- package/dist/cascade.js.map +1 -1
- package/dist/check-crate-size.d.ts +4 -14
- package/dist/check-crate-size.d.ts.map +1 -1
- package/dist/check-crate-size.js +4 -14
- package/dist/check-crate-size.js.map +1 -1
- package/dist/check.d.ts +4 -23
- package/dist/check.d.ts.map +1 -1
- package/dist/check.js +4 -23
- package/dist/check.js.map +1 -1
- package/dist/cli.d.ts +3 -41
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -41
- package/dist/cli.js.map +1 -1
- package/dist/completeness.d.ts +4 -13
- package/dist/completeness.d.ts.map +1 -1
- package/dist/completeness.js +4 -13
- package/dist/completeness.js.map +1 -1
- package/dist/config.d.ts +4 -12
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -12
- package/dist/config.js.map +1 -1
- package/dist/emit-plan-outputs.d.ts +4 -18
- package/dist/emit-plan-outputs.d.ts.map +1 -1
- package/dist/emit-plan-outputs.js +4 -18
- package/dist/emit-plan-outputs.js.map +1 -1
- package/dist/emit-release-outputs.d.ts +4 -17
- package/dist/emit-release-outputs.d.ts.map +1 -1
- package/dist/emit-release-outputs.js +4 -17
- package/dist/emit-release-outputs.js.map +1 -1
- package/dist/ensure-tag.d.ts +4 -10
- package/dist/ensure-tag.d.ts.map +1 -1
- package/dist/ensure-tag.js +4 -10
- package/dist/ensure-tag.js.map +1 -1
- package/dist/env.d.ts +8 -23
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +11 -40
- package/dist/env.js.map +1 -1
- package/dist/error-codes.d.ts +8 -27
- package/dist/error-codes.d.ts.map +1 -1
- package/dist/error-codes.js +8 -27
- package/dist/error-codes.js.map +1 -1
- package/dist/fold-action-bundle.d.ts +4 -20
- package/dist/fold-action-bundle.d.ts.map +1 -1
- package/dist/fold-action-bundle.js +4 -20
- package/dist/fold-action-bundle.js.map +1 -1
- package/dist/force-move-tag.d.ts +4 -13
- package/dist/force-move-tag.d.ts.map +1 -1
- package/dist/force-move-tag.js +4 -13
- package/dist/force-move-tag.js.map +1 -1
- package/dist/git.d.ts +7 -16
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +7 -16
- package/dist/git.js.map +1 -1
- package/dist/glob.d.ts +3 -10
- package/dist/glob.d.ts.map +1 -1
- package/dist/glob.js +3 -10
- package/dist/glob.js.map +1 -1
- package/dist/handlers/classify-npm-view-failure.d.ts +4 -30
- package/dist/handlers/classify-npm-view-failure.d.ts.map +1 -1
- package/dist/handlers/classify-npm-view-failure.js +7 -38
- package/dist/handlers/classify-npm-view-failure.js.map +1 -1
- package/dist/handlers/crates.d.ts +4 -35
- package/dist/handlers/crates.d.ts.map +1 -1
- package/dist/handlers/crates.js +8 -47
- package/dist/handlers/crates.js.map +1 -1
- package/dist/handlers/first-file-under.d.ts +3 -11
- package/dist/handlers/first-file-under.d.ts.map +1 -1
- package/dist/handlers/first-file-under.js +3 -11
- package/dist/handlers/first-file-under.js.map +1 -1
- package/dist/handlers/match-first-publish-tp-rejection.d.ts +4 -16
- package/dist/handlers/match-first-publish-tp-rejection.d.ts.map +1 -1
- package/dist/handlers/match-first-publish-tp-rejection.js +4 -16
- package/dist/handlers/match-first-publish-tp-rejection.js.map +1 -1
- package/dist/handlers/match-npm-name-too-similar.d.ts +4 -25
- package/dist/handlers/match-npm-name-too-similar.d.ts.map +1 -1
- package/dist/handlers/match-npm-name-too-similar.js +4 -25
- package/dist/handlers/match-npm-name-too-similar.js.map +1 -1
- package/dist/handlers/match-tlog-duplicate.d.ts +4 -13
- package/dist/handlers/match-tlog-duplicate.d.ts.map +1 -1
- package/dist/handlers/match-tlog-duplicate.js +4 -13
- package/dist/handlers/match-tlog-duplicate.js.map +1 -1
- package/dist/handlers/npm-platform.d.ts +11 -46
- package/dist/handlers/npm-platform.d.ts.map +1 -1
- package/dist/handlers/npm-platform.js +11 -46
- package/dist/handlers/npm-platform.js.map +1 -1
- package/dist/handlers/npm.d.ts +3 -7
- package/dist/handlers/npm.d.ts.map +1 -1
- package/dist/handlers/npm.js +11 -45
- package/dist/handlers/npm.js.map +1 -1
- package/dist/handlers/pypi.d.ts +5 -37
- package/dist/handlers/pypi.d.ts.map +1 -1
- package/dist/handlers/pypi.js +5 -37
- package/dist/handlers/pypi.js.map +1 -1
- package/dist/handlers/scan-dirty-outside-manifest.d.ts +4 -11
- package/dist/handlers/scan-dirty-outside-manifest.d.ts.map +1 -1
- package/dist/handlers/scan-dirty-outside-manifest.js +4 -11
- package/dist/handlers/scan-dirty-outside-manifest.js.map +1 -1
- package/dist/is-within-dir.d.ts +3 -5
- package/dist/is-within-dir.d.ts.map +1 -1
- package/dist/is-within-dir.js +3 -5
- package/dist/is-within-dir.js.map +1 -1
- package/dist/log.d.ts +6 -33
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +10 -57
- package/dist/log.js.map +1 -1
- package/dist/manylinux-for-triple.d.ts +4 -6
- package/dist/manylinux-for-triple.d.ts.map +1 -1
- package/dist/manylinux-for-triple.js +4 -6
- package/dist/manylinux-for-triple.js.map +1 -1
- package/dist/must-get.d.ts +3 -14
- package/dist/must-get.d.ts.map +1 -1
- package/dist/must-get.js +3 -14
- package/dist/must-get.js.map +1 -1
- package/dist/normalize-artifacts.d.ts +4 -19
- package/dist/normalize-artifacts.d.ts.map +1 -1
- package/dist/normalize-artifacts.js +4 -19
- package/dist/normalize-artifacts.js.map +1 -1
- package/dist/normalize-dist-name.d.ts +4 -13
- package/dist/normalize-dist-name.d.ts.map +1 -1
- package/dist/normalize-dist-name.js +4 -13
- package/dist/normalize-dist-name.js.map +1 -1
- package/dist/packages-by-name.d.ts +4 -12
- package/dist/packages-by-name.d.ts.map +1 -1
- package/dist/packages-by-name.js +4 -12
- package/dist/packages-by-name.js.map +1 -1
- package/dist/parse-reconcile-expect.d.ts +2 -5
- package/dist/parse-reconcile-expect.d.ts.map +1 -1
- package/dist/parse-reconcile-expect.js +2 -5
- package/dist/parse-reconcile-expect.js.map +1 -1
- package/dist/plan-skew.d.ts +4 -8
- package/dist/plan-skew.d.ts.map +1 -1
- package/dist/plan-skew.js +4 -8
- package/dist/plan-skew.js.map +1 -1
- package/dist/plan-status-types.d.ts +3 -6
- package/dist/plan-status-types.d.ts.map +1 -1
- package/dist/plan-status-types.js +3 -6
- package/dist/plan-status-types.js.map +1 -1
- package/dist/plan-status.d.ts +5 -18
- package/dist/plan-status.d.ts.map +1 -1
- package/dist/plan-status.js +5 -18
- package/dist/plan-status.js.map +1 -1
- package/dist/plan.d.ts +4 -8
- package/dist/plan.d.ts.map +1 -1
- package/dist/plan.js +8 -22
- package/dist/plan.js.map +1 -1
- package/dist/preflight.d.ts +16 -62
- package/dist/preflight.d.ts.map +1 -1
- package/dist/preflight.js +16 -62
- package/dist/preflight.js.map +1 -1
- package/dist/publish-progress.d.ts +4 -17
- package/dist/publish-progress.d.ts.map +1 -1
- package/dist/publish-progress.js +4 -17
- package/dist/publish-progress.js.map +1 -1
- package/dist/publish.d.ts +4 -18
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +4 -18
- package/dist/publish.js.map +1 -1
- package/dist/pypi-version-source.d.ts +3 -31
- package/dist/pypi-version-source.d.ts.map +1 -1
- package/dist/pypi-version-source.js +3 -31
- package/dist/pypi-version-source.js.map +1 -1
- package/dist/python-versions.d.ts +4 -13
- package/dist/python-versions.d.ts.map +1 -1
- package/dist/python-versions.js +4 -13
- package/dist/python-versions.js.map +1 -1
- package/dist/reconcile-expect.d.ts +4 -20
- package/dist/reconcile-expect.d.ts.map +1 -1
- package/dist/reconcile-expect.js +4 -20
- package/dist/reconcile-expect.js.map +1 -1
- package/dist/reconcile-skip-warnings.d.ts +21 -0
- package/dist/reconcile-skip-warnings.d.ts.map +1 -0
- package/dist/reconcile-skip-warnings.js +24 -0
- package/dist/reconcile-skip-warnings.js.map +1 -0
- package/dist/reconcile-types.d.ts +30 -3
- package/dist/reconcile-types.d.ts.map +1 -1
- package/dist/reconcile-types.js +3 -3
- package/dist/reconcile.d.ts +11 -2
- package/dist/reconcile.d.ts.map +1 -1
- package/dist/reconcile.js +31 -8
- package/dist/reconcile.js.map +1 -1
- package/dist/release-github/gh-release-create.d.ts +4 -7
- package/dist/release-github/gh-release-create.d.ts.map +1 -1
- package/dist/release-github/gh-release-create.js +4 -7
- package/dist/release-github/gh-release-create.js.map +1 -1
- package/dist/release-github/gh-release-exists.d.ts +4 -8
- package/dist/release-github/gh-release-exists.d.ts.map +1 -1
- package/dist/release-github/gh-release-exists.js +4 -8
- package/dist/release-github/gh-release-exists.js.map +1 -1
- package/dist/release-github/index.d.ts +4 -29
- package/dist/release-github/index.d.ts.map +1 -1
- package/dist/release-github/index.js +4 -29
- package/dist/release-github/index.js.map +1 -1
- package/dist/release-packages.d.ts +4 -16
- package/dist/release-packages.d.ts.map +1 -1
- package/dist/release-packages.js +4 -16
- package/dist/release-packages.js.map +1 -1
- package/dist/replace-cargo-version.d.ts +3 -30
- package/dist/replace-cargo-version.d.ts.map +1 -1
- package/dist/replace-cargo-version.js +3 -30
- package/dist/replace-cargo-version.js.map +1 -1
- package/dist/replace-dep-version-req.d.ts +8 -32
- package/dist/replace-dep-version-req.d.ts.map +1 -1
- package/dist/replace-dep-version-req.js +8 -32
- package/dist/replace-dep-version-req.js.map +1 -1
- package/dist/repo-relative-paths.d.ts +3 -14
- package/dist/repo-relative-paths.d.ts.map +1 -1
- package/dist/repo-relative-paths.js +3 -14
- package/dist/repo-relative-paths.js.map +1 -1
- package/dist/resolve/run-resolve.d.ts +4 -9
- package/dist/resolve/run-resolve.d.ts.map +1 -1
- package/dist/resolve/run-resolve.js +4 -9
- package/dist/resolve/run-resolve.js.map +1 -1
- package/dist/resolve-dep-dirs.d.ts +4 -14
- package/dist/resolve-dep-dirs.d.ts.map +1 -1
- package/dist/resolve-dep-dirs.js +4 -14
- package/dist/resolve-dep-dirs.js.map +1 -1
- package/dist/resolve-tag-commit.d.ts +4 -12
- package/dist/resolve-tag-commit.d.ts.map +1 -1
- package/dist/resolve-tag-commit.js +4 -12
- package/dist/resolve-tag-commit.js.map +1 -1
- package/dist/retry.d.ts +4 -16
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +4 -16
- package/dist/retry.js.map +1 -1
- package/dist/status-classify.d.ts +3 -6
- package/dist/status-classify.d.ts.map +1 -1
- package/dist/status-classify.js +3 -6
- package/dist/status-classify.js.map +1 -1
- package/dist/status.d.ts +4 -18
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +4 -18
- package/dist/status.js.map +1 -1
- package/dist/tag-template.d.ts +4 -14
- package/dist/tag-template.d.ts.map +1 -1
- package/dist/tag-template.js +4 -14
- package/dist/tag-template.js.map +1 -1
- package/dist/to-error.d.ts +4 -13
- package/dist/to-error.d.ts.map +1 -1
- package/dist/to-error.js +4 -13
- package/dist/to-error.js.map +1 -1
- package/dist/trailer.d.ts +4 -17
- package/dist/trailer.d.ts.map +1 -1
- package/dist/trailer.js +4 -17
- package/dist/trailer.js.map +1 -1
- package/dist/types.d.ts +11 -32
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -6
- package/dist/types.js.map +1 -1
- package/dist/unpublished-kinds.d.ts +4 -15
- package/dist/unpublished-kinds.d.ts.map +1 -1
- package/dist/unpublished-kinds.js +4 -15
- package/dist/unpublished-kinds.js.map +1 -1
- package/dist/utils/bound-capture.d.ts +4 -8
- package/dist/utils/bound-capture.d.ts.map +1 -1
- package/dist/utils/bound-capture.js +4 -8
- package/dist/utils/bound-capture.js.map +1 -1
- package/dist/utils/elide-middle.d.ts +4 -19
- package/dist/utils/elide-middle.d.ts.map +1 -1
- package/dist/utils/elide-middle.js +4 -19
- package/dist/utils/elide-middle.js.map +1 -1
- package/dist/utils/find-exec-error.d.ts.map +1 -1
- package/dist/utils/find-exec-error.js +4 -12
- package/dist/utils/find-exec-error.js.map +1 -1
- package/dist/utils/flush-stdio.d.ts +4 -11
- package/dist/utils/flush-stdio.d.ts.map +1 -1
- package/dist/utils/flush-stdio.js +4 -11
- package/dist/utils/flush-stdio.js.map +1 -1
- package/dist/utils/list-files-recursive.d.ts +3 -7
- package/dist/utils/list-files-recursive.d.ts.map +1 -1
- package/dist/utils/list-files-recursive.js +3 -7
- package/dist/utils/list-files-recursive.js.map +1 -1
- package/dist/utils/to-posix-path.d.ts +4 -7
- package/dist/utils/to-posix-path.d.ts.map +1 -1
- package/dist/utils/to-posix-path.js +4 -7
- package/dist/utils/to-posix-path.js.map +1 -1
- package/dist/verbose.d.ts +4 -10
- package/dist/verbose.d.ts.map +1 -1
- package/dist/verbose.js +4 -10
- package/dist/verbose.js.map +1 -1
- package/dist/verify/bundle-cli/compute-stage-suffix.d.ts +4 -11
- package/dist/verify/bundle-cli/compute-stage-suffix.d.ts.map +1 -1
- package/dist/verify/bundle-cli/compute-stage-suffix.js +4 -11
- package/dist/verify/bundle-cli/compute-stage-suffix.js.map +1 -1
- package/dist/verify/bundle-cli/index.d.ts +4 -20
- package/dist/verify/bundle-cli/index.d.ts.map +1 -1
- package/dist/verify/bundle-cli/index.js +4 -20
- package/dist/verify/bundle-cli/index.js.map +1 -1
- package/dist/verify/bundle-cli/read-python-source.d.ts +4 -12
- package/dist/verify/bundle-cli/read-python-source.d.ts.map +1 -1
- package/dist/verify/bundle-cli/read-python-source.js +4 -12
- package/dist/verify/bundle-cli/read-python-source.js.map +1 -1
- package/dist/verify/crate/find-crate-file.d.ts +2 -6
- package/dist/verify/crate/find-crate-file.d.ts.map +1 -1
- package/dist/verify/crate/find-crate-file.js +2 -6
- package/dist/verify/crate/find-crate-file.js.map +1 -1
- package/dist/verify/crate/has-crate-source.d.ts +3 -5
- package/dist/verify/crate/has-crate-source.d.ts.map +1 -1
- package/dist/verify/crate/has-crate-source.js +3 -5
- package/dist/verify/crate/has-crate-source.js.map +1 -1
- package/dist/verify/crate/index.d.ts +4 -16
- package/dist/verify/crate/index.d.ts.map +1 -1
- package/dist/verify/crate/index.js +4 -16
- package/dist/verify/crate/index.js.map +1 -1
- package/dist/verify/npm-tarball/download.d.ts +3 -9
- package/dist/verify/npm-tarball/download.d.ts.map +1 -1
- package/dist/verify/npm-tarball/download.js +3 -9
- package/dist/verify/npm-tarball/download.js.map +1 -1
- package/dist/verify/npm-tarball/index.d.ts +4 -13
- package/dist/verify/npm-tarball/index.d.ts.map +1 -1
- package/dist/verify/npm-tarball/index.js +4 -13
- package/dist/verify/npm-tarball/index.js.map +1 -1
- package/dist/verify/npm-tarball/local-dir-state.d.ts +4 -8
- package/dist/verify/npm-tarball/local-dir-state.d.ts.map +1 -1
- package/dist/verify/npm-tarball/local-dir-state.js +4 -8
- package/dist/verify/npm-tarball/local-dir-state.js.map +1 -1
- package/dist/verify/npm-tarball/main.d.ts +4 -14
- package/dist/verify/npm-tarball/main.d.ts.map +1 -1
- package/dist/verify/npm-tarball/main.js +4 -14
- package/dist/verify/npm-tarball/main.js.map +1 -1
- package/dist/verify/npm-tarball/resolve-url.d.ts +4 -11
- package/dist/verify/npm-tarball/resolve-url.d.ts.map +1 -1
- package/dist/verify/npm-tarball/resolve-url.js +4 -11
- package/dist/verify/npm-tarball/resolve-url.js.map +1 -1
- package/dist/verify/npm-tarball/triple.d.ts +4 -26
- package/dist/verify/npm-tarball/triple.d.ts.map +1 -1
- package/dist/verify/npm-tarball/triple.js +4 -26
- package/dist/verify/npm-tarball/triple.js.map +1 -1
- package/dist/verify/posture.d.ts +4 -13
- package/dist/verify/posture.d.ts.map +1 -1
- package/dist/verify/posture.js +4 -13
- package/dist/verify/posture.js.map +1 -1
- package/dist/verify/wheel/index.d.ts +4 -17
- package/dist/verify/wheel/index.d.ts.map +1 -1
- package/dist/verify/wheel/index.js +4 -17
- package/dist/verify/wheel/index.js.map +1 -1
- package/dist/verify/wheel/manylinux-tag-patterns.d.ts +4 -6
- package/dist/verify/wheel/manylinux-tag-patterns.d.ts.map +1 -1
- package/dist/verify/wheel/manylinux-tag-patterns.js +4 -6
- package/dist/verify/wheel/manylinux-tag-patterns.js.map +1 -1
- package/dist/verify/wheel/read-wheel-version.d.ts +4 -8
- package/dist/verify/wheel/read-wheel-version.d.ts.map +1 -1
- package/dist/verify/wheel/read-wheel-version.js +4 -8
- package/dist/verify/wheel/read-wheel-version.js.map +1 -1
- package/dist/verify/wheel/read-zip-entry.d.ts +3 -8
- package/dist/verify/wheel/read-zip-entry.d.ts.map +1 -1
- package/dist/verify/wheel/read-zip-entry.js +3 -8
- package/dist/verify/wheel/read-zip-entry.js.map +1 -1
- package/dist/version.d.ts +4 -12
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +4 -12
- package/dist/version.js.map +1 -1
- package/dist/wheel-abi.d.ts +5 -28
- package/dist/wheel-abi.d.ts.map +1 -1
- package/dist/wheel-abi.js +5 -28
- package/dist/wheel-abi.js.map +1 -1
- package/dist/write-crate-version.d.ts +4 -17
- package/dist/write-crate-version.d.ts.map +1 -1
- package/dist/write-crate-version.js +4 -17
- package/dist/write-crate-version.js.map +1 -1
- package/dist/write-dependent-version-reqs.d.ts +8 -43
- package/dist/write-dependent-version-reqs.d.ts.map +1 -1
- package/dist/write-dependent-version-reqs.js +8 -43
- package/dist/write-dependent-version-reqs.js.map +1 -1
- package/dist/write-embedded-crate-versions.d.ts +9 -40
- package/dist/write-embedded-crate-versions.d.ts.map +1 -1
- package/dist/write-embedded-crate-versions.js +9 -40
- package/dist/write-embedded-crate-versions.js.map +1 -1
- package/dist/write-launcher.d.ts +7 -23
- package/dist/write-launcher.d.ts.map +1 -1
- package/dist/write-launcher.js +11 -37
- package/dist/write-launcher.js.map +1 -1
- package/dist/write-resolved-cargo-version.d.ts +4 -12
- package/dist/write-resolved-cargo-version.d.ts.map +1 -1
- package/dist/write-resolved-cargo-version.js +4 -12
- package/dist/write-resolved-cargo-version.js.map +1 -1
- package/dist/write-version.d.ts +8 -29
- package/dist/write-version.d.ts.map +1 -1
- package/dist/write-version.js +8 -29
- package/dist/write-version.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify-npm-view-failure.d.ts","sourceRoot":"","sources":["../../src/handlers/classify-npm-view-failure.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"classify-npm-view-failure.d.ts","sourceRoot":"","sources":["../../src/handlers/classify-npm-view-failure.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,CAAC;AAEpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAiCrE"}
|
|
@@ -1,48 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What a failed `npm view` probe actually means (#650).
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
* non-zero exit used to mean the same thing — "not published" — which is
|
|
7
|
-
* true for the answer the probe was written for (`E404`) and false for
|
|
8
|
-
* every way the question can fail to be asked at all. A hermetic
|
|
9
|
-
* (`--network none`) `plan` run reported `verdict: publish` for packages it
|
|
10
|
-
* had never reached the registry to ask about.
|
|
11
|
-
*
|
|
12
|
-
* Three outcomes, keyed off npm's own machine-readable `npm error code`
|
|
13
|
-
* line:
|
|
14
|
-
*
|
|
15
|
-
* - `absent` — the registry answered and the version is not there
|
|
16
|
-
* (`E404`), plus anything unrecognised. The historical behaviour, and
|
|
17
|
-
* the conservative default: an unfamiliar code keeps the pre-#650
|
|
18
|
-
* reading rather than inventing a new failure mode for it.
|
|
19
|
-
* - `unreachable` — the registry hostname does not resolve
|
|
20
|
-
* (`ENOTFOUND` / `EAI_AGAIN`). Deterministic within a run: no retry can
|
|
21
|
-
* turn a name that does not resolve into one that does, and no answer
|
|
22
|
-
* is coming, so the caller reports "unknown", not "not published".
|
|
23
|
-
* - `transient` — the registry was reached and faltered (timeouts, reset
|
|
24
|
-
* connections, 429, 5xx). These are the cases the retry policy was
|
|
25
|
-
* written for, so the caller raises a `TransientError` and lets
|
|
26
|
-
* `withRetry` do its job.
|
|
27
|
-
*
|
|
28
|
-
* Matching npm's `code` line rather than its prose keeps this stable
|
|
29
|
-
* across npm's message rewrites; both the modern `npm error` prefix (npm
|
|
30
|
-
* 11) and the legacy `npm ERR!` one (npm ≤ 10, still on plenty of
|
|
31
|
-
* consumer runners) are accepted.
|
|
2
|
+
* What a failed `npm view` probe actually means (#650). Keyed off npm's own
|
|
3
|
+
* machine-readable `code` line rather than its prose: `absent` for `E404` plus
|
|
4
|
+
* anything unrecognised (the conservative default), `unreachable` for
|
|
5
|
+
* `ENOTFOUND` / `EAI_AGAIN`, `transient` for timeouts / resets / 429 / 5xx.
|
|
32
6
|
*/
|
|
33
7
|
export function classifyNpmViewFailure(stderr) {
|
|
34
8
|
// Function-scoped, not module-scoped: mutants in module-level initializers
|
|
35
|
-
// run once at import,
|
|
36
|
-
// reach them, so they were reported surviving despite the colocated tests
|
|
37
|
-
// killing every one when applied by hand.
|
|
9
|
+
// run once at import, out of reach of the gate's per-test switching.
|
|
38
10
|
/**
|
|
39
11
|
* npm's machine-readable failure code, in either prefix spelling:
|
|
40
12
|
* `npm error code ENOTFOUND` (npm 11) / `npm ERR! code ENOTFOUND` (npm <= 10).
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* *is* the code. A capture group would be typed `string | undefined` under
|
|
44
|
-
* `noUncheckedIndexedAccess`, forcing a `?? ''` fallback for a group that
|
|
45
|
-
* cannot fail to participate — an unreachable default no test can pin.
|
|
13
|
+
* The prefix sits in a lookbehind, not a capture group, so the match *is* the
|
|
14
|
+
* code — a group would be `string | undefined` under `noUncheckedIndexedAccess`.
|
|
46
15
|
*/
|
|
47
16
|
const codeLine = /(?<=^npm (?:error|ERR!) code )\S+$/m;
|
|
48
17
|
/** DNS resolution failed — there is no registry to talk to. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify-npm-view-failure.js","sourceRoot":"","sources":["../../src/handlers/classify-npm-view-failure.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"classify-npm-view-failure.js","sourceRoot":"","sources":["../../src/handlers/classify-npm-view-failure.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,UAAU,sBAAsB,CAAC,MAAc;IACnD,2EAA2E;IAC3E,qEAAqE;IACrE;;;;;OAKG;IACH,MAAM,QAAQ,GAAG,qCAAqC,CAAC;IACvD,+DAA+D;IAC/D,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAClF,yDAAyD;IACzD,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;QAClD,WAAW;QACX,YAAY;QACZ,oBAAoB;QACpB,MAAM;KACP,CAAC,CAAC;IACH,8EAA8E;IAC9E,MAAM,eAAe,GAAG,gBAAgB,CAAC;IAEzC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,uEAAuE;QACvE,sEAAsE;QACtE,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAAA,OAAO,aAAa,CAAC;IAAA,CAAC;IACvD,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAAA,OAAO,WAAW,CAAC;IAAA,CAAC;IACnD,IAAI,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAAA,OAAO,WAAW,CAAC;IAAA,CAAC;IACrD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,39 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* crates.io handler.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* - isPublished: GET /api/v1/crates/{name}/{version}; 200 → true, 404 →
|
|
7
|
-
* false, 5xx → TransientError (retry-wrapped at call site).
|
|
8
|
-
* - writeVersion: delegates to `writeResolvedCargoVersion`, which
|
|
9
|
-
* rewrites a literal `[package].version` in place or, for a crate
|
|
10
|
-
* that inherits (`version.workspace = true`), the workspace root's
|
|
11
|
-
* `[workspace.package].version` instead (#428, #639). Regex-based to
|
|
12
|
-
* preserve comments and whitespace; the alternative (TOML
|
|
13
|
-
* round-trip) loses formatting.
|
|
14
|
-
* - publish: `cargo publish --allow-dirty --verbose` with stderr
|
|
15
|
-
* captured for the failure dump. Short-circuits on
|
|
16
|
-
* already-published (idempotent).
|
|
17
|
-
*
|
|
18
|
-
* A failure message carries cargo's stderr through `elideMiddle`
|
|
19
|
-
* (#651). `--verbose` plus `CARGO_TERM_VERBOSE=true` makes a cold
|
|
20
|
-
* verify build run to hundreds of KB, and the whole message lands on
|
|
21
|
-
* one log line, which GitHub cuts at 64KB from the *front* — so the
|
|
22
|
-
* unelided version threw away cargo's error and kept the successful
|
|
23
|
-
* build chatter. Only the rendered message is bounded: `stderr` itself
|
|
24
|
-
* stays whole for the predicates below (`isRateLimited`,
|
|
25
|
-
* `matchFirstPublishTpRejection`) and for the job-summary dump, which
|
|
26
|
-
* reads it off the ExecError and writes to a file with no line cut.
|
|
27
|
-
*
|
|
28
|
-
* --allow-dirty is required for our writeVersion-then-publish model
|
|
29
|
-
* (#135), so `scanDirtyOutsideManifest` restores a narrowed version of
|
|
30
|
-
* cargo's own dirty-check before we invoke it. A null scan (e.g. no git
|
|
31
|
-
* repo) means we can't verify, and we fall back to cargo's --allow-dirty.
|
|
32
|
-
*
|
|
33
|
-
* OIDC: the crates-io-auth-action GHA step exchanges the OIDC JWT for
|
|
34
|
-
* a short-lived CARGO_REGISTRY_TOKEN in the env. The handler doesn't
|
|
35
|
-
* drive the exchange -- it just reads the env var the workflow wired
|
|
36
|
-
* up (same for classic token fallback).
|
|
2
|
+
* crates.io handler (#16; plan §7.4, §13.1, §14.5, §16.1). `--allow-dirty`
|
|
3
|
+
* is required by the writeVersion-then-publish model (#135), so
|
|
4
|
+
* `scanDirtyOutsideManifest` reinstates a narrowed dirty-check. stderr is
|
|
5
|
+
* elided mid-message (#651): GitHub cuts a log line at 64KB from the *front*.
|
|
37
6
|
*/
|
|
38
7
|
import type { Handler } from '../types.js';
|
|
39
8
|
export declare function relativeOrSelf(base: string, target: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crates.d.ts","sourceRoot":"","sources":["../../src/handlers/crates.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"crates.d.ts","sourceRoot":"","sources":["../../src/handlers/crates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAO,OAAO,EAA+B,MAAM,aAAa,CAAC;AAkQ7E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOnE;AA6CD,eAAO,MAAM,MAAM,EAAE,OAOpB,CAAC"}
|
package/dist/handlers/crates.js
CHANGED
|
@@ -1,39 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* crates.io handler.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* - isPublished: GET /api/v1/crates/{name}/{version}; 200 → true, 404 →
|
|
7
|
-
* false, 5xx → TransientError (retry-wrapped at call site).
|
|
8
|
-
* - writeVersion: delegates to `writeResolvedCargoVersion`, which
|
|
9
|
-
* rewrites a literal `[package].version` in place or, for a crate
|
|
10
|
-
* that inherits (`version.workspace = true`), the workspace root's
|
|
11
|
-
* `[workspace.package].version` instead (#428, #639). Regex-based to
|
|
12
|
-
* preserve comments and whitespace; the alternative (TOML
|
|
13
|
-
* round-trip) loses formatting.
|
|
14
|
-
* - publish: `cargo publish --allow-dirty --verbose` with stderr
|
|
15
|
-
* captured for the failure dump. Short-circuits on
|
|
16
|
-
* already-published (idempotent).
|
|
17
|
-
*
|
|
18
|
-
* A failure message carries cargo's stderr through `elideMiddle`
|
|
19
|
-
* (#651). `--verbose` plus `CARGO_TERM_VERBOSE=true` makes a cold
|
|
20
|
-
* verify build run to hundreds of KB, and the whole message lands on
|
|
21
|
-
* one log line, which GitHub cuts at 64KB from the *front* — so the
|
|
22
|
-
* unelided version threw away cargo's error and kept the successful
|
|
23
|
-
* build chatter. Only the rendered message is bounded: `stderr` itself
|
|
24
|
-
* stays whole for the predicates below (`isRateLimited`,
|
|
25
|
-
* `matchFirstPublishTpRejection`) and for the job-summary dump, which
|
|
26
|
-
* reads it off the ExecError and writes to a file with no line cut.
|
|
27
|
-
*
|
|
28
|
-
* --allow-dirty is required for our writeVersion-then-publish model
|
|
29
|
-
* (#135), so `scanDirtyOutsideManifest` restores a narrowed version of
|
|
30
|
-
* cargo's own dirty-check before we invoke it. A null scan (e.g. no git
|
|
31
|
-
* repo) means we can't verify, and we fall back to cargo's --allow-dirty.
|
|
32
|
-
*
|
|
33
|
-
* OIDC: the crates-io-auth-action GHA step exchanges the OIDC JWT for
|
|
34
|
-
* a short-lived CARGO_REGISTRY_TOKEN in the env. The handler doesn't
|
|
35
|
-
* drive the exchange -- it just reads the env var the workflow wired
|
|
36
|
-
* up (same for classic token fallback).
|
|
2
|
+
* crates.io handler (#16; plan §7.4, §13.1, §14.5, §16.1). `--allow-dirty`
|
|
3
|
+
* is required by the writeVersion-then-publish model (#135), so
|
|
4
|
+
* `scanDirtyOutsideManifest` reinstates a narrowed dirty-check. stderr is
|
|
5
|
+
* elided mid-message (#651): GitHub cuts a log line at 64KB from the *front*.
|
|
37
6
|
*/
|
|
38
7
|
import { readFile } from 'node:fs/promises';
|
|
39
8
|
import { join, relative } from 'node:path';
|
|
@@ -117,18 +86,10 @@ async function publishImpl(pkg, version, ctx) {
|
|
|
117
86
|
if (await isPublishedImpl(pkg, version, ctx)) {
|
|
118
87
|
return { status: 'already-published' };
|
|
119
88
|
}
|
|
120
|
-
// #135: --allow-dirty disarms cargo's own
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
// Sibling package paths are whitelisted: a polyglot consumer with
|
|
126
|
-
// rust + js packages will have install state (node_modules/, dist/,
|
|
127
|
-
// package-lock.json) inside the js package's path during publish
|
|
128
|
-
// (the reusable workflow's `Build npm packages` step runs
|
|
129
|
-
// `npm install + npm run build` per npm package before the engine
|
|
130
|
-
// publishes). cargo only packs files inside its own package dir, so
|
|
131
|
-
// sibling-package state can't end up in the crate tarball anyway.
|
|
89
|
+
// #135: --allow-dirty disarms cargo's own clean-tree guard, so reinstate a
|
|
90
|
+
// narrower one — only the Cargo.toml we just wrote may be dirty. Sibling
|
|
91
|
+
// package paths are whitelisted: a polyglot consumer's js package carries
|
|
92
|
+
// install state during publish, and cargo only packs its own package dir.
|
|
132
93
|
const unexpected = await scanDirtyOutsideManifest(ctx.cwd, pkg.path, ctx.artifactsRoot, ctx.siblingPackagePaths, ctx.managedManifestPaths);
|
|
133
94
|
if (unexpected !== null && unexpected.length > 0) {
|
|
134
95
|
throw new Error([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crates.js","sourceRoot":"","sources":["../../src/handlers/crates.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"crates.js","sourceRoot":"","sources":["../../src/handlers/crates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAErF,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AAErC,KAAK,UAAU,eAAe,CAC5B,GAAqC,EACrC,OAAe,EACf,IAAS;IAET,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,GAAG,GAAG,GAAG,QAAQ,kBAAkB,kBAAkB,CAAC,SAAS,CAAC,IAAI,kBAAkB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O,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IACxD,CAAC;IACD,MAAM,IAAI,cAAc,CAAC,iBAAiB,GAAG,aAAa,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAY;IAC7B,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,YAAY,EAAE,gBAAgB;IAC9B,YAAY,EAAE,gBAAgB;IAC9B,OAAO,EAAE,WAAW;CACrB,CAAC"}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Depth-first search for the first of `candidates` under `dir` that is an
|
|
3
|
-
* actual file,
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Exists because a build step may stage a payload either flat
|
|
7
|
-
* (`<artifact>/<bin>`) or nested (`<artifact>/bin/<bin>`), and callers that
|
|
8
|
-
* name that payload in a package manifest — or chmod it — need a file, not
|
|
9
|
-
* whichever directory `readdir` happened to list first (#626).
|
|
10
|
-
*
|
|
11
|
-
* Posix separators on purpose: the result lands in `package.json#main`,
|
|
12
|
-
* which npm reads on every platform, so a back-slashed `join` would ship a
|
|
13
|
-
* manifest that only resolves on Windows.
|
|
3
|
+
* actual file, as a **posix** path relative to `dir` (#626) — a build step may
|
|
4
|
+
* stage a payload flat or nested, and the result lands in `package.json#main`,
|
|
5
|
+
* so a back-slashed `join` would ship a manifest that only resolves on Windows.
|
|
14
6
|
*/
|
|
15
7
|
export declare function firstFileUnder(dir: string, candidates: readonly string[]): Promise<string | undefined>;
|
|
16
8
|
//# sourceMappingURL=first-file-under.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first-file-under.d.ts","sourceRoot":"","sources":["../../src/handlers/first-file-under.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"first-file-under.d.ts","sourceRoot":"","sources":["../../src/handlers/first-file-under.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,wBAAsB,cAAc,CAClC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc7B"}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Depth-first search for the first of `candidates` under `dir` that is an
|
|
3
|
-
* actual file,
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Exists because a build step may stage a payload either flat
|
|
7
|
-
* (`<artifact>/<bin>`) or nested (`<artifact>/bin/<bin>`), and callers that
|
|
8
|
-
* name that payload in a package manifest — or chmod it — need a file, not
|
|
9
|
-
* whichever directory `readdir` happened to list first (#626).
|
|
10
|
-
*
|
|
11
|
-
* Posix separators on purpose: the result lands in `package.json#main`,
|
|
12
|
-
* which npm reads on every platform, so a back-slashed `join` would ship a
|
|
13
|
-
* manifest that only resolves on Windows.
|
|
3
|
+
* actual file, as a **posix** path relative to `dir` (#626) — a build step may
|
|
4
|
+
* stage a payload flat or nested, and the result lands in `package.json#main`,
|
|
5
|
+
* so a back-slashed `join` would ship a manifest that only resolves on Windows.
|
|
14
6
|
*/
|
|
15
7
|
import { readdir, stat } from 'node:fs/promises';
|
|
16
8
|
import { join } from 'node:path';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first-file-under.js","sourceRoot":"","sources":["../../src/handlers/first-file-under.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"first-file-under.js","sourceRoot":"","sources":["../../src/handlers/first-file-under.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,GAAW,EACX,UAA6B;IAE7B,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC7B,uEAAuE;QACvE,iEAAiE;QACjE,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/D,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Match cargo's stderr
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* is the source of truth for the contract.
|
|
7
|
-
*
|
|
8
|
-
* Two anchors keep false positives out: a 404-status line and either the
|
|
9
|
-
* registry's "crate `<name>` does not exist" prose or the "trusted publish"
|
|
10
|
-
* mention. An unrelated 404 in some other cargo subcommand (e.g. a missing
|
|
11
|
-
* index file) won't carry the prose; an unrelated `does not exist` (e.g. a
|
|
12
|
-
* missing dependency) won't carry the 404 status.
|
|
13
|
-
*
|
|
14
|
-
* Returns the matched `stderr` verbatim (always non-empty, since the pattern
|
|
15
|
-
* cannot match an empty string) so callers can hoist it into the surfaced
|
|
16
|
-
* error without a dead empty-string fallback; returns `null` when the shape
|
|
17
|
-
* does not match or `stderr` is absent.
|
|
2
|
+
* Match cargo's stderr when crates.io rejects the TP exchange because the crate
|
|
3
|
+
* has never been published; returns the matched `stderr` verbatim, else `null`.
|
|
4
|
+
* Two anchors keep false positives out: a 404-status line *plus* either
|
|
5
|
+
* "crate `<name>` does not exist" or "trusted publish" (notes/upstream-behaviors.md).
|
|
18
6
|
*/
|
|
19
7
|
export declare function matchFirstPublishTpRejection(stderr: string | undefined): string | null;
|
|
20
8
|
//# sourceMappingURL=match-first-publish-tp-rejection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-first-publish-tp-rejection.d.ts","sourceRoot":"","sources":["../../src/handlers/match-first-publish-tp-rejection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"match-first-publish-tp-rejection.d.ts","sourceRoot":"","sources":["../../src/handlers/match-first-publish-tp-rejection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAMtF"}
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Match cargo's stderr
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* is the source of truth for the contract.
|
|
7
|
-
*
|
|
8
|
-
* Two anchors keep false positives out: a 404-status line and either the
|
|
9
|
-
* registry's "crate `<name>` does not exist" prose or the "trusted publish"
|
|
10
|
-
* mention. An unrelated 404 in some other cargo subcommand (e.g. a missing
|
|
11
|
-
* index file) won't carry the prose; an unrelated `does not exist` (e.g. a
|
|
12
|
-
* missing dependency) won't carry the 404 status.
|
|
13
|
-
*
|
|
14
|
-
* Returns the matched `stderr` verbatim (always non-empty, since the pattern
|
|
15
|
-
* cannot match an empty string) so callers can hoist it into the surfaced
|
|
16
|
-
* error without a dead empty-string fallback; returns `null` when the shape
|
|
17
|
-
* does not match or `stderr` is absent.
|
|
2
|
+
* Match cargo's stderr when crates.io rejects the TP exchange because the crate
|
|
3
|
+
* has never been published; returns the matched `stderr` verbatim, else `null`.
|
|
4
|
+
* Two anchors keep false positives out: a 404-status line *plus* either
|
|
5
|
+
* "crate `<name>` does not exist" or "trusted publish" (notes/upstream-behaviors.md).
|
|
18
6
|
*/
|
|
19
7
|
export function matchFirstPublishTpRejection(stderr) {
|
|
20
8
|
return stderr?.match(/status\s+404\b/i) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-first-publish-tp-rejection.js","sourceRoot":"","sources":["../../src/handlers/match-first-publish-tp-rejection.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"match-first-publish-tp-rejection.js","sourceRoot":"","sources":["../../src/handlers/match-first-publish-tp-rejection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAAC,MAA0B;IACrE,OAAO,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC;QACrC,CAAC,MAAM,CAAC,KAAK,CAAC,uCAAuC,CAAC;YACpD,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACrC,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Match npm's stderr
|
|
3
|
-
*
|
|
4
|
-
* `
|
|
5
|
-
*
|
|
6
|
-
* is the source of truth for the contract.
|
|
7
|
-
*
|
|
8
|
-
* One anchor, not two. The crates-side `matchFirstPublishTpRejection` needs a
|
|
9
|
-
* pair because each of its anchors ("status 404", "does not exist") is generic
|
|
10
|
-
* enough to appear in unrelated cargo output; npm's "Package name too similar
|
|
11
|
-
* to existing package…" prose is already unique to this refusal, and pairing
|
|
12
|
-
* it with the `E403` code would only make the matcher miss the day npm
|
|
13
|
-
* renumbers the response. Both known wordings — the one that names the
|
|
14
|
-
* blocking package and the plural "existing packages" variant — differ only
|
|
15
|
-
* after this prefix.
|
|
16
|
-
*
|
|
17
|
-
* Matching on the prose is the whole point: the refusal arrives auth-shaped
|
|
18
|
-
* (E403 / "Forbidden"), so status-code matching cannot tell it apart from an
|
|
19
|
-
* ordinary permission failure. That confusion is #617 — the engine read one
|
|
20
|
-
* as the other and told an operator to bootstrap with a token, for a name no
|
|
21
|
-
* token can create.
|
|
22
|
-
*
|
|
23
|
-
* Returns the matched `stderr` verbatim (always non-empty, since the pattern
|
|
24
|
-
* cannot match an empty string) so callers can hoist it into the surfaced
|
|
25
|
-
* error without a dead empty-string fallback; returns `null` when the shape
|
|
26
|
-
* does not match or `stderr` is absent.
|
|
2
|
+
* Match npm's stderr when the registry refuses to *create* a name under its
|
|
3
|
+
* moniker rule ("Package name too similar to existing package…"), returning
|
|
4
|
+
* the matched `stderr` verbatim, else `null`. Prose, not status code: the
|
|
5
|
+
* refusal arrives auth-shaped (E403 / "Forbidden"), so #617 misread it.
|
|
27
6
|
*/
|
|
28
7
|
export declare function matchNpmNameTooSimilar(stderr: string | undefined): string | null;
|
|
29
8
|
//# sourceMappingURL=match-npm-name-too-similar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-npm-name-too-similar.d.ts","sourceRoot":"","sources":["../../src/handlers/match-npm-name-too-similar.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"match-npm-name-too-similar.d.ts","sourceRoot":"","sources":["../../src/handlers/match-npm-name-too-similar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAIhF"}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Match npm's stderr
|
|
3
|
-
*
|
|
4
|
-
* `
|
|
5
|
-
*
|
|
6
|
-
* is the source of truth for the contract.
|
|
7
|
-
*
|
|
8
|
-
* One anchor, not two. The crates-side `matchFirstPublishTpRejection` needs a
|
|
9
|
-
* pair because each of its anchors ("status 404", "does not exist") is generic
|
|
10
|
-
* enough to appear in unrelated cargo output; npm's "Package name too similar
|
|
11
|
-
* to existing package…" prose is already unique to this refusal, and pairing
|
|
12
|
-
* it with the `E403` code would only make the matcher miss the day npm
|
|
13
|
-
* renumbers the response. Both known wordings — the one that names the
|
|
14
|
-
* blocking package and the plural "existing packages" variant — differ only
|
|
15
|
-
* after this prefix.
|
|
16
|
-
*
|
|
17
|
-
* Matching on the prose is the whole point: the refusal arrives auth-shaped
|
|
18
|
-
* (E403 / "Forbidden"), so status-code matching cannot tell it apart from an
|
|
19
|
-
* ordinary permission failure. That confusion is #617 — the engine read one
|
|
20
|
-
* as the other and told an operator to bootstrap with a token, for a name no
|
|
21
|
-
* token can create.
|
|
22
|
-
*
|
|
23
|
-
* Returns the matched `stderr` verbatim (always non-empty, since the pattern
|
|
24
|
-
* cannot match an empty string) so callers can hoist it into the surfaced
|
|
25
|
-
* error without a dead empty-string fallback; returns `null` when the shape
|
|
26
|
-
* does not match or `stderr` is absent.
|
|
2
|
+
* Match npm's stderr when the registry refuses to *create* a name under its
|
|
3
|
+
* moniker rule ("Package name too similar to existing package…"), returning
|
|
4
|
+
* the matched `stderr` verbatim, else `null`. Prose, not status code: the
|
|
5
|
+
* refusal arrives auth-shaped (E403 / "Forbidden"), so #617 misread it.
|
|
27
6
|
*/
|
|
28
7
|
export function matchNpmNameTooSimilar(stderr) {
|
|
29
8
|
return stderr?.match(/package\s+name\s+too\s+similar\s+to\s+existing\s+packages?/i)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-npm-name-too-similar.js","sourceRoot":"","sources":["../../src/handlers/match-npm-name-too-similar.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"match-npm-name-too-similar.js","sourceRoot":"","sources":["../../src/handlers/match-npm-name-too-similar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAA0B;IAC/D,OAAO,MAAM,EAAE,KAAK,CAAC,6DAA6D,CAAC;QACjF,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Match npm's Sigstore/Rekor
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* equivalent entry already exists in the transparency log". Unlike the
|
|
7
|
-
* publish-over race, a 409 here does NOT by itself prove the package landed
|
|
8
|
-
* (the first submit may have written the Rekor entry but failed the registry
|
|
9
|
-
* PUT), so callers must re-probe `npm view` to disambiguate.
|
|
10
|
-
*
|
|
11
|
-
* Returns the matched `stderr` verbatim (always non-empty, since the pattern
|
|
12
|
-
* cannot match an empty string) so callers can hoist it into the surfaced
|
|
13
|
-
* error without a dead empty-string fallback; returns `null` when the shape
|
|
14
|
-
* does not match or `stderr` is absent.
|
|
2
|
+
* Match npm's Sigstore/Rekor dedupe error (`TLOG_CREATE_ENTRY_ERROR` / "an
|
|
3
|
+
* equivalent entry already exists in the transparency log"); returns the
|
|
4
|
+
* matched `stderr`, else `null`. Does NOT prove the package landed — a Rekor
|
|
5
|
+
* entry can outlive a failed registry PUT — so callers must re-probe `npm view`.
|
|
15
6
|
*/
|
|
16
7
|
export declare function matchTlogDuplicate(stderr: string | undefined): string | null;
|
|
17
8
|
//# sourceMappingURL=match-tlog-duplicate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-tlog-duplicate.d.ts","sourceRoot":"","sources":["../../src/handlers/match-tlog-duplicate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"match-tlog-duplicate.d.ts","sourceRoot":"","sources":["../../src/handlers/match-tlog-duplicate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAM5E"}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Match npm's Sigstore/Rekor
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* equivalent entry already exists in the transparency log". Unlike the
|
|
7
|
-
* publish-over race, a 409 here does NOT by itself prove the package landed
|
|
8
|
-
* (the first submit may have written the Rekor entry but failed the registry
|
|
9
|
-
* PUT), so callers must re-probe `npm view` to disambiguate.
|
|
10
|
-
*
|
|
11
|
-
* Returns the matched `stderr` verbatim (always non-empty, since the pattern
|
|
12
|
-
* cannot match an empty string) so callers can hoist it into the surfaced
|
|
13
|
-
* error without a dead empty-string fallback; returns `null` when the shape
|
|
14
|
-
* does not match or `stderr` is absent.
|
|
2
|
+
* Match npm's Sigstore/Rekor dedupe error (`TLOG_CREATE_ENTRY_ERROR` / "an
|
|
3
|
+
* equivalent entry already exists in the transparency log"); returns the
|
|
4
|
+
* matched `stderr`, else `null`. Does NOT prove the package landed — a Rekor
|
|
5
|
+
* entry can outlive a failed registry PUT — so callers must re-probe `npm view`.
|
|
15
6
|
*/
|
|
16
7
|
export function matchTlogDuplicate(stderr) {
|
|
17
8
|
return stderr?.match(/TLOG_CREATE_ENTRY_ERROR|equivalent entry already exists in the transparency log/i)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-tlog-duplicate.js","sourceRoot":"","sources":["../../src/handlers/match-tlog-duplicate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"match-tlog-duplicate.js","sourceRoot":"","sources":["../../src/handlers/match-tlog-duplicate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAA0B;IAC3D,OAAO,MAAM,EAAE,KAAK,CAClB,kFAAkF,CACnF;QACC,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* npm platform-package orchestration for `build = "napi"` and
|
|
3
|
-
* `build = "bundled-cli"
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* 1. For each (build entry, target), synthesize a per-platform package
|
|
7
|
-
* with narrowed os/cpu fields and the platform binary.
|
|
8
|
-
* 2. Publish each per-platform package (skip already-published).
|
|
9
|
-
* 3. Rewrite the main package's `package.json` to add
|
|
10
|
-
* `optionalDependencies` pointing at the just-published versions
|
|
11
|
-
* across every build entry's family.
|
|
12
|
-
* 4. Caller (npm.ts:publishImpl) publishes the main package last.
|
|
13
|
-
*
|
|
14
|
-
* Ordering is enforced: a failed platform publish short-circuits
|
|
15
|
-
* before step 3, so the main package isn't published in an
|
|
16
|
-
* inconsistent state.
|
|
17
|
-
*
|
|
18
|
-
* Multi-mode (#dirsql): when `build` is an array with more than one
|
|
19
|
-
* entry, each entry contributes its own platform-package family. The
|
|
20
|
-
* artifact directory for each (mode, triple) carries a mode infix to
|
|
21
|
-
* keep `napi` and `bundled-cli` artifacts distinct on the build side.
|
|
22
|
-
*
|
|
23
|
-
* Issue #19. Plan: §13.7, §12.2.
|
|
3
|
+
* `build = "bundled-cli"` (#19; plan §13.7, §12.2). Ordering is enforced: a
|
|
4
|
+
* failed platform publish short-circuits before the main `package.json` gains
|
|
5
|
+
* its `optionalDependencies`, so the main package never ships inconsistent.
|
|
24
6
|
*/
|
|
25
7
|
import type { Ctx } from '../types.js';
|
|
26
8
|
export type NpmBuildMode = 'napi' | 'bundled-cli';
|
|
@@ -126,34 +108,17 @@ export declare function targetToOsCpu(target: string): OsCpu;
|
|
|
126
108
|
*/
|
|
127
109
|
export declare function assertTripleSupported(triple: string, packageName: string): void;
|
|
128
110
|
/**
|
|
129
|
-
* Resolve a target triple to its Rust (rustup/cargo) form
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* - a Rust triple → itself (identity), so rust-flavor `targets` pass
|
|
134
|
-
* through untouched.
|
|
135
|
-
* - anything else throws, matching `targetToOsCpu`'s posture: an
|
|
136
|
-
* unmappable triple fails loud at plan time rather than reaching
|
|
137
|
-
* `rustup target add` with a triple it rejects (#387).
|
|
138
|
-
*
|
|
139
|
-
* Lookup is case-insensitive, mirroring `targetToOsCpu`.
|
|
111
|
+
* Resolve a target triple to its Rust (rustup/cargo) form: a napi-rs short
|
|
112
|
+
* form (`linux-x64-gnu`) maps to its Rust triple, a Rust triple is identity,
|
|
113
|
+
* and anything else throws so an unmappable triple fails at plan time rather
|
|
114
|
+
* than reaching `rustup target add` (#387). Case-insensitive.
|
|
140
115
|
*/
|
|
141
116
|
export declare function toRustTriple(target: string): string;
|
|
142
117
|
/**
|
|
143
|
-
* The package-relative path `package.json#main` should name
|
|
144
|
-
*
|
|
145
|
-
* the
|
|
146
|
-
*
|
|
147
|
-
* `bundled-cli` resolves through directories to an actual file: consumers
|
|
148
|
-
* stage the cross-compiled binary either flat (`<artifact>/<bin>`) or
|
|
149
|
-
* nested (`<artifact>/bin/<bin>`), and both layouts clear the completeness
|
|
150
|
-
* check, which lists files recursively. Taking `readdir`'s first
|
|
151
|
-
* non-`package.json` entry as-is named the `bin` **directory** on the
|
|
152
|
-
* nested layout — so the manifest pointed `main` at a directory and the
|
|
153
|
-
* #365 executable-bit restore chmodded that directory instead of the
|
|
154
|
-
* binary, publishing it at 0644 (#626).
|
|
155
|
-
*
|
|
156
|
-
* `napi` is unaffected: it looks up the `.node` payload by extension.
|
|
118
|
+
* The package-relative path `package.json#main` should name for a staged
|
|
119
|
+
* platform artifact. `bundled-cli` resolves through directories to a real
|
|
120
|
+
* file: on the nested `<artifact>/bin/<bin>` layout `readdir`'s first entry is
|
|
121
|
+
* the `bin` **directory**, which #365's chmod then restored at 0644 (#626).
|
|
157
122
|
*/
|
|
158
123
|
export declare function pickMainFile(dir: string, files: readonly string[], mode: NpmBuildMode): Promise<string>;
|
|
159
124
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm-platform.d.ts","sourceRoot":"","sources":["../../src/handlers/npm-platform.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"npm-platform.d.ts","sourceRoot":"","sources":["../../src/handlers/npm-platform.ts"],"names":[],"mappings":"AAAA;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