@produtype/core 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,21 @@ async function detectDeployment(ctx) {
30
30
  || f.startsWith('.github/workflows/')
31
31
  || /(^|\/)(\.gitlab-ci\.yml|\.circleci\/config\.yml|azure-pipelines\.yml|Jenkinsfile|\.woodpecker\.ya?ml)$/i.test(f)
32
32
  || /(^|\/)(k8s|kubernetes|helm|deploy|\.platform)\//i.test(f));
33
- for (const f of presentFiles.slice(0, 20))
33
+ /**
34
+ * The container the editor opens is not a deployment artifact.
35
+ *
36
+ * 1.9.0 taught `docker.presence` that `.devcontainer/` is the Development Containers
37
+ * convention — the environment a *contributor* works in — and left this detector
38
+ * believing it. atuin's deployment evidence opened with `.devcontainer/Dockerfile`,
39
+ * so "how does this ship" was answered with how it is developed, in the same report
40
+ * that the other detector got right.
41
+ *
42
+ * Only where something else is present: a repository whose only container
43
+ * definition is its devcontainer keeps it rather than losing the answer.
44
+ */
45
+ const shipped = presentFiles.filter((f) => !/(^|\/)\.devcontainer\//.test(f));
46
+ const cited = shipped.length > 0 ? shipped : presentFiles;
47
+ for (const f of cited.slice(0, 20))
34
48
  evidence.push({ type: 'file', value: f });
35
49
  const hits = await (0, textSearch_1.searchInFiles)(ctx.root, ctx.files.source, [
36
50
  /SIGTERM/i, /SIGINT/i,
@@ -80,7 +94,7 @@ async function detectDeployment(ctx) {
80
94
  complete: prodAware,
81
95
  evidence: (0, absenceEvidence_1.evidenceOrFileNameSearch)(evidence, 'anything that says how this is deployed', ['Dockerfile', 'docker-compose', '.github/workflows/', 'Procfile', 'fly.toml', 'render.yaml', 'NODE_ENV', 'RAILS_ENV', 'ASPNETCORE_ENVIRONMENT', 'a file naming production']),
82
96
  details: {
83
- dockerArtifacts: presentFiles.some((f) => /Dockerfile|compose/.test(f)),
97
+ dockerArtifacts: cited.some((f) => /Dockerfile|compose/.test(f)),
84
98
  ci: presentFiles.some((f) => f.startsWith('.github/workflows/')),
85
99
  gracefulShutdown: graceful,
86
100
  /** False where the runtime hands each request to a worker that exits on its own. */
@@ -61,6 +61,23 @@ async function detectGdpr(ctx) {
61
61
  */
62
62
  /gdpr[_\- ]?(delete|deletion|eras|removal|forget)/i,
63
63
  /(delete|deletion|eras|removal)[_\- ]?gdpr/i,
64
+ /**
65
+ * A DELETE on the caller's own account, which is what article 17 asks for.
66
+ *
67
+ * The note below records that `deleteUser(id)` was measured and withdrawn —
68
+ * delete is every admin screen ever written. A route is not that call. atuin's
69
+ * server declares `.route("/account", delete(handlers::user::delete))` and was
70
+ * told it has no erasure flow at all; the difference between that and an admin
71
+ * screen is in the path, which says whose account is being removed.
72
+ *
73
+ * `DELETE` is HTTP's word and `/account`, `/users/me` and `/me` are the
74
+ * conventional first-person paths. `/accounts/:id` does not match: the boundary
75
+ * after `account` fails on the plural, which is the admin case this must keep
76
+ * out.
77
+ */
78
+ /\bdelete\s*[(:]\s*["'`]\/?(?:account\b|users?\/me\b|me\b)/i,
79
+ /@Delete\(\s*["'`]\/?(?:account\b|users?\/me\b|me\b)/i,
80
+ /\.route\(\s*["'`]\/?(?:account\b|users?\/me\b|me\b)[^)]*,\s*delete\(/i,
64
81
  ], 20);
65
82
  /**
66
83
  * `deleteUser(id)` is not article 17 — it is every admin screen ever written, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@produtype/core",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
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": {