@produtype/core 0.78.0 → 0.79.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.
- package/README.md +5 -1
- package/dist/analyzer/catalogue.js +8 -0
- package/dist/analyzer/detectFrontend.js +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ _Generated from the analyzer itself — run `npm run docs:stacks` after changing
|
|
|
176
176
|
|
|
177
177
|
- **Backend:** Express, Next.js, NestJS, Fastify, Hono, Elysia, Koa, AdonisJS, SvelteKit, Remix, Nuxt, Nitro, Astro, Django, Flask, FastAPI, aiohttp, Litestar, Sanic, Tornado, Starlette, Streamlit, Gradio, Dash, Chainlit, Gin, Echo, Fiber, chi, Gorilla, Beego, Go, Axum, Actix Web, Rocket, Warp, Tide, Poem, Salvo, Tower HTTP, Hyper, Spring Boot, Quarkus, Micronaut, Ktor, Javalin, Vert.x, Dropwizard, Helidon, Rails, Sinatra, Hanami, Roda, Grape, Ruby, Laravel, Symfony, Slim, CodeIgniter, CakePHP, Yii, PHP, ASP.NET Core, .NET
|
|
178
178
|
- **Frontend:** React, Vite, Vue, Nuxt, Svelte, Angular, Astro, Solid, Qwik, Preact, Remix, htmx, Tailwind CSS, Electron
|
|
179
|
-
- **Mobile:** Flutter, React Native, iOS (native), Android (native)
|
|
179
|
+
- **Mobile:** Flutter, React Native, iOS (native), Android (native), SwiftUI, UIKit, Jetpack Compose, Android views
|
|
180
180
|
- **Databases:** Postgres, MySQL, SQLite, SQL Server, MongoDB, Redis, Firestore, DynamoDB, Convex
|
|
181
181
|
- **Hosted data platforms:** Supabase, Firebase, PlanetScale, Neon, Vercel Postgres, Turso, Upstash, DynamoDB, Convex
|
|
182
182
|
- **ORMs:** Prisma, Drizzle, TypeORM, Sequelize, Knex, MikroORM, Kysely, SQLAlchemy, Tortoise, Peewee
|
|
@@ -198,6 +198,10 @@ How some of these are decided:
|
|
|
198
198
|
- **React Native** — the react-native or expo dependency
|
|
199
199
|
- **iOS (native)** — Info.plist, Package.swift, a Podfile or an .xcodeproj in the tree
|
|
200
200
|
- **Android (native)** — AndroidManifest.xml, or build.gradle in either dialect
|
|
201
|
+
- **SwiftUI** — import SwiftUI
|
|
202
|
+
- **UIKit** — import UIKit
|
|
203
|
+
- **Jetpack Compose** — import androidx.compose
|
|
204
|
+
- **Android views** — import androidx.appcompat, or android.app.Activity
|
|
201
205
|
- **Supabase** — recorded alongside the engine it is — Postgres
|
|
202
206
|
- **Firebase** — Firestore
|
|
203
207
|
- **PlanetScale** — MySQL
|
|
@@ -247,6 +247,10 @@ const LABELS = {
|
|
|
247
247
|
'react-native': 'React Native',
|
|
248
248
|
ios: 'iOS (native)',
|
|
249
249
|
android: 'Android (native)',
|
|
250
|
+
swiftui: 'SwiftUI',
|
|
251
|
+
uikit: 'UIKit',
|
|
252
|
+
'jetpack compose': 'Jetpack Compose',
|
|
253
|
+
'android views': 'Android views',
|
|
250
254
|
express: 'Express',
|
|
251
255
|
flask: 'Flask',
|
|
252
256
|
fastapi: 'FastAPI',
|
|
@@ -370,6 +374,10 @@ function supportedStacks() {
|
|
|
370
374
|
label: 'Android (native)',
|
|
371
375
|
detectedFrom: 'AndroidManifest.xml, or build.gradle in either dialect',
|
|
372
376
|
},
|
|
377
|
+
{ id: 'swiftui', label: 'SwiftUI', detectedFrom: 'import SwiftUI' },
|
|
378
|
+
{ id: 'uikit', label: 'UIKit', detectedFrom: 'import UIKit' },
|
|
379
|
+
{ id: 'jetpack compose', label: 'Jetpack Compose', detectedFrom: 'import androidx.compose' },
|
|
380
|
+
{ id: 'android views', label: 'Android views', detectedFrom: 'import androidx.appcompat, or android.app.Activity' },
|
|
373
381
|
],
|
|
374
382
|
databases: entries(['postgres', 'mysql', 'sqlite', 'sqlserver', 'mongodb', 'redis', 'firestore', 'dynamodb', 'convex']),
|
|
375
383
|
dataPlatforms: [
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.detectFrontend = detectFrontend;
|
|
4
4
|
const detectContext_1 = require("./detectContext");
|
|
5
5
|
const catalogue_1 = require("./catalogue");
|
|
6
|
+
const textSearch_1 = require("../utils/textSearch");
|
|
6
7
|
async function detectFrontend(ctx) {
|
|
7
8
|
const frameworks = [];
|
|
8
9
|
const evidence = [];
|
|
@@ -34,6 +35,34 @@ async function detectFrontend(ctx) {
|
|
|
34
35
|
frameworks.push('flutter');
|
|
35
36
|
evidence.push({ type: 'dependency', value: 'flutter' });
|
|
36
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* The user interface a native application actually has.
|
|
40
|
+
*
|
|
41
|
+
* Nothing here could name one, so the question fell through to the fallback below
|
|
42
|
+
* and DuckDuckGo iOS — 1194 Swift files — was reported as "frontend: html", from the
|
|
43
|
+
* error pages and onboarding documents it ships inside the app. A reader sees that
|
|
44
|
+
* line and thinks web application.
|
|
45
|
+
*
|
|
46
|
+
* `import SwiftUI` and `import androidx.compose.runtime` are module imports the
|
|
47
|
+
* platform defines; an author who wants the toolkit has no other way to write it.
|
|
48
|
+
* The frameworks are mutually compatible in practice — an application migrating to
|
|
49
|
+
* SwiftUI still imports UIKit — so all of them that appear are recorded.
|
|
50
|
+
*/
|
|
51
|
+
const NATIVE_TOOLKITS = [
|
|
52
|
+
['swiftui', /^\s*import\s+SwiftUI\b/m],
|
|
53
|
+
['uikit', /^\s*import\s+UIKit\b/m],
|
|
54
|
+
['jetpack compose', /^\s*import\s+androidx\.compose\b/m],
|
|
55
|
+
['android views', /^\s*import\s+androidx\.appcompat\b|^\s*import\s+android\.app\.Activity\b/m],
|
|
56
|
+
];
|
|
57
|
+
for (const [toolkit, pattern] of NATIVE_TOOLKITS) {
|
|
58
|
+
const hits = await (0, textSearch_1.searchInFiles)(ctx.root, ctx.files.source, [pattern], 2);
|
|
59
|
+
if (hits.length === 0)
|
|
60
|
+
continue;
|
|
61
|
+
frameworks.push(toolkit);
|
|
62
|
+
for (const hit of hits.slice(0, 1)) {
|
|
63
|
+
evidence.push({ type: 'snippet', value: hit.snippet, file: hit.file, line: hit.line });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
37
66
|
/**
|
|
38
67
|
* A page is a front end, whether or not a framework built it.
|
|
39
68
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.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": {
|