@produtype/core 0.19.0 → 0.19.1

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.
@@ -745,16 +745,33 @@ exports.rules = [
745
745
  severity: 'low',
746
746
  evaluate: ({ analysis }) => {
747
747
  const dep = analysis.detectors['deployment.readiness'];
748
- const status = statusFromFlags(Boolean(dep?.present), dep?.complete);
748
+ /**
749
+ * Deploying is something you do to a service.
750
+ *
751
+ * A package is published to a registry, a phone application is released to a
752
+ * store, and a page is hosted by whatever serves it — none of which this
753
+ * repository has to contain, and none of which this analyzer reads. Thirty-nine of
754
+ * the seventy-eight repositories in the verification corpus were being told they
755
+ * had "no meaningful deployment artifacts": libraries, browser games, a Flutter
756
+ * app. The same sentence this product already refuses to say about a Dockerfile.
757
+ *
758
+ * Where the repository does carry deployment artifacts the question is live again
759
+ * whatever it is — somebody wrote a compose file for a reason — so this only
760
+ * applies when there are none at all.
761
+ */
762
+ const deployedFromHere = isAServer(analysis) || Boolean(dep?.present);
763
+ const status = deployedFromHere ? statusFromFlags(Boolean(dep?.present), dep?.complete) : 'unknown';
749
764
  return mkFinding({
750
765
  id: 'deployment.readiness',
751
766
  title: 'Deployment readiness baseline',
752
767
  category: 'deployment',
753
768
  status,
754
769
  severity: sevForStatus(status, 'low'),
755
- description: status === 'missing'
756
- ? 'No meaningful deployment artifacts or prod/runtime signals detected.'
757
- : 'Deployment artifacts or runtime production signals detected.',
770
+ description: !deployedFromHere
771
+ ? 'Nothing in this repository is deployed as a running service, so how it reaches people — a registry, a store, a host — is decided outside it.'
772
+ : status === 'missing'
773
+ ? 'No meaningful deployment artifacts or prod/runtime signals detected.'
774
+ : 'Deployment artifacts or runtime production signals detected.',
758
775
  /**
759
776
  * Graceful shutdown is left out where there is no signal to catch: PHP-FPM and
760
777
  * CGI hand each request to a worker that exits when it is done, and telling a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@produtype/core",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Deterministic CLI and library that analyzes a web application repository and reports how far it is from production-ready for the kind of product it is meant to be.",
5
5
  "license": "MIT",
6
6
  "bin": {