@produtype/core 1.2.0 → 1.3.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.
|
@@ -268,10 +268,33 @@ async function detectPackaging(ctx) {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
const tauriConfigs = all.filter((file) => /(^|\/)tauri\.conf\.json$/.test(file));
|
|
271
|
+
/**
|
|
272
|
+
* A browser extension, which ships inside a packaged archive like any other bundle.
|
|
273
|
+
*
|
|
274
|
+
* `manifest_version` is the key the WebExtensions platform requires, and it appears
|
|
275
|
+
* in nothing else. The file it sits in is not always `manifest.json`: Dark Reader
|
|
276
|
+
* keeps one per browser — `manifest-chrome-mv3.json`, `manifest-firefox.json` —
|
|
277
|
+
* and Violentmonkey writes `manifest.yml` and compiles it at build time. The key is
|
|
278
|
+
* the contract; the file name is the project's business.
|
|
279
|
+
*
|
|
280
|
+
* Violentmonkey was asked at `high` how it delivers assets over HTTP. Its assets are
|
|
281
|
+
* inside the `.xpi` the browser installed, which is the Electron case again.
|
|
282
|
+
*/
|
|
283
|
+
const extensionManifests = [];
|
|
284
|
+
for (const file of all.filter((f) => /(^|\/)manifest[\w.-]*\.(json|yml|yaml)$/i.test(f)).slice(0, 8)) {
|
|
285
|
+
const raw = (await (0, readTextFileSafe_1.readTextFileSafe)(ctx.root, file)) ?? '';
|
|
286
|
+
if (/["']?manifest_version["']?\s*[:=]/.test(raw))
|
|
287
|
+
extensionManifests.push(file);
|
|
288
|
+
}
|
|
271
289
|
const desktopBundle = [
|
|
272
290
|
...(0, detectContext_1.hasAnyDep)(ctx, ['electron', 'electron-builder', '@tauri-apps/api', '@tauri-apps/cli'])
|
|
273
291
|
.map((dep) => ({ type: 'dependency', value: dep })),
|
|
274
292
|
...tauriConfigs.slice(0, 2).map((file) => ({ type: 'file', value: file, file })),
|
|
293
|
+
...extensionManifests.slice(0, 2).map((file) => ({
|
|
294
|
+
type: 'file',
|
|
295
|
+
value: `${file} declares manifest_version`,
|
|
296
|
+
file,
|
|
297
|
+
})),
|
|
275
298
|
];
|
|
276
299
|
const entrypointCount = nodeEntrypoints.length
|
|
277
300
|
+ (pythonEntrypoints ? 1 : 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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": {
|