@produtype/core 1.0.0 → 1.1.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.
|
@@ -267,6 +267,12 @@ async function detectPackaging(ctx) {
|
|
|
267
267
|
jvmPublication = true;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
+
const tauriConfigs = all.filter((file) => /(^|\/)tauri\.conf\.json$/.test(file));
|
|
271
|
+
const desktopBundle = [
|
|
272
|
+
...(0, detectContext_1.hasAnyDep)(ctx, ['electron', 'electron-builder', '@tauri-apps/api', '@tauri-apps/cli'])
|
|
273
|
+
.map((dep) => ({ type: 'dependency', value: dep })),
|
|
274
|
+
...tauriConfigs.slice(0, 2).map((file) => ({ type: 'file', value: file, file })),
|
|
275
|
+
];
|
|
270
276
|
const entrypointCount = nodeEntrypoints.length
|
|
271
277
|
+ (pythonEntrypoints ? 1 : 0)
|
|
272
278
|
+ (dotnetPackageId ? 1 : 0)
|
|
@@ -326,6 +332,24 @@ async function detectPackaging(ctx) {
|
|
|
326
332
|
: frontendFiles.slice(0, 5).map((file) => ({ type: 'file', value: file, file })),
|
|
327
333
|
details: { generators: docsGenerators, frontendFiles: frontendFiles.length, allUnderDocs: frontendAllInDocs },
|
|
328
334
|
},
|
|
335
|
+
{
|
|
336
|
+
/**
|
|
337
|
+
* An application that ships as a desktop bundle, not as a page.
|
|
338
|
+
*
|
|
339
|
+
* `electron` in the manifest and a `tauri.conf.json` in the tree are the two
|
|
340
|
+
* ways a project says its product is installed rather than visited. Both are
|
|
341
|
+
* the toolchain's own names: electron-builder reads the first, the Tauri CLI
|
|
342
|
+
* reads the second.
|
|
343
|
+
*
|
|
344
|
+
* Recorded here so the profile can stop asking a desktop application how it
|
|
345
|
+
* caches assets over HTTP — the question a Unity game stopped being asked in
|
|
346
|
+
* 0.84.0, for the same reason. marktext, an Electron editor, was told at `high`
|
|
347
|
+
* that it has no asset-delivery policy.
|
|
348
|
+
*/
|
|
349
|
+
key: 'packaging.desktopBundle',
|
|
350
|
+
present: desktopBundle.length > 0,
|
|
351
|
+
evidence: desktopBundle,
|
|
352
|
+
},
|
|
329
353
|
{
|
|
330
354
|
key: 'docs.readme',
|
|
331
355
|
present: readmeFiles.length > 0,
|
|
@@ -227,6 +227,17 @@ function deriveStatus(analysis, capability) {
|
|
|
227
227
|
case 'app.asset-delivery': {
|
|
228
228
|
if (detector(analysis, 'game.engine')?.details?.nativeEngine === true)
|
|
229
229
|
return 'not_applicable';
|
|
230
|
+
/**
|
|
231
|
+
* And the same for an application that is installed rather than visited.
|
|
232
|
+
*
|
|
233
|
+
* marktext ships as an Electron bundle and yaak as a Tauri one; their assets are
|
|
234
|
+
* inside the download, and `Cache-Control` has nobody to talk to. This is the
|
|
235
|
+
* native-game case again, arrived at from the other direction — the first time
|
|
236
|
+
* from a `ProjectVersion.txt`, this time from `electron` in a manifest and a
|
|
237
|
+
* `tauri.conf.json` in the tree.
|
|
238
|
+
*/
|
|
239
|
+
if (detector(analysis, 'packaging.desktopBundle')?.present === true)
|
|
240
|
+
return 'not_applicable';
|
|
230
241
|
return detector(analysis, 'app.assetDelivery')?.present ? 'present' : 'missing';
|
|
231
242
|
}
|
|
232
243
|
case 'jobs.background': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.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": {
|