@produtype/core 0.71.0 → 0.72.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.
@@ -142,7 +142,23 @@ async function detectBackend(ctx) {
142
142
  for (const dep of hits)
143
143
  evidence.push({ type: 'dependency', value: dep });
144
144
  }
145
- if (!namedRubyFramework && ctx.files.all.some((f) => /(^|\/)Gemfile$/.test(f))) {
145
+ /**
146
+ * A Gemfile is not a Ruby backend on its own.
147
+ *
148
+ * WordPress-iOS and BlueWallet both reported `backend: ruby`. Neither ships a Ruby
149
+ * server: both keep a Gemfile for fastlane and CocoaPods, which is how the iOS
150
+ * world runs its build. WordPress-iOS has 23 Ruby files among 2675 — under one per
151
+ * cent — and the backend it did not have then excluded it from the mobile profile,
152
+ * so an iOS application with 2649 Swift files was judged as a B2B SaaS and told it
153
+ * needed a health endpoint.
154
+ *
155
+ * The same share test Go already uses, and the reason Rust's fallback was removed
156
+ * outright a release ago: a language has to be a real part of what is written here
157
+ * before it names the backend.
158
+ */
159
+ if (!namedRubyFramework
160
+ && languageShare(ctx, /\.rb$/) >= MINIMUM_BACKEND_SHARE
161
+ && ctx.files.all.some((f) => /(^|\/)Gemfile$/.test(f))) {
146
162
  frameworks.push('ruby');
147
163
  evidence.push({ type: 'note', value: 'a Gemfile with no web framework in it' });
148
164
  }
@@ -164,7 +164,23 @@ const RULES = [
164
164
  * Half is the line, and it sits in the gap between those two rather than in the
165
165
  * middle of a distribution.
166
166
  */
167
- admissible: (f) => f.mobilePlatforms.length > 0 && f.mobileShare >= 0.5 && !f.tenancy,
167
+ /**
168
+ * A tenant word in a client model is not a tenant boundary.
169
+ *
170
+ * WordPress-iOS carries `organizationID` in `RemoteBlog.swift` and
171
+ * `RemoteReaderSiteInfo.swift` — data classes deserialised from WordPress.com's
172
+ * JSON. The application consumes an organization; it does not host one, and it
173
+ * could not: enforcing a boundary between tenants takes a server, and this is
174
+ * 2649 Swift files with none.
175
+ *
176
+ * It was excluded from the mobile profile on that word and judged as a B2B SaaS,
177
+ * which asked it for a health endpoint, security headers and a GDPR export
178
+ * route. Tenancy still disqualifies a phone application that ships a server
179
+ * alongside it, because then the boundary is the repository's to keep.
180
+ */
181
+ admissible: (f) => f.mobilePlatforms.length > 0
182
+ && f.mobileShare >= 0.5
183
+ && !(f.tenancy && f.productBackend),
168
184
  signals: [
169
185
  { identifies: true, label: 'a mobile project in the repository', weight: 5, holds: (f) => f.mobilePlatforms.length > 0 },
170
186
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@produtype/core",
3
- "version": "0.71.0",
3
+ "version": "0.72.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": {