@verentis/cli 0.2.26 → 0.2.28
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 +50 -0
- package/dist/index.js +571 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -415,6 +415,52 @@ The hero does not count toward that gallery limit, but it does count toward the
|
|
|
415
415
|
unique presentation images. README and changelog Markdown files are each limited to 1 MiB.
|
|
416
416
|
`verentis validate` checks these paths, formats and limits before publishing.
|
|
417
417
|
|
|
418
|
+
### Manifest icons
|
|
419
|
+
|
|
420
|
+
Icon fields (`metadata.icon`, `spec.entry-points[].icon`, `spec.entry-points[].mime-types[].icon`,
|
|
421
|
+
`spec.mime-types[].icon`, `spec.file-types[].icon`) accept:
|
|
422
|
+
|
|
423
|
+
- a relative SVG file path, resolved against the manifest directory (it must end in `.svg` and may not
|
|
424
|
+
escape the package directory): `icon: ./icons/app.svg`
|
|
425
|
+
- a reference into an optional top-level `icons:` map: `icon: "#doc"`
|
|
426
|
+
- inline SVG markup: `icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">…</svg>'`
|
|
427
|
+
|
|
428
|
+
```yaml
|
|
429
|
+
icons:
|
|
430
|
+
doc: ./icons/document.svg # file path or inline <svg> markup
|
|
431
|
+
spec:
|
|
432
|
+
file-types:
|
|
433
|
+
- pattern: "*.docx"
|
|
434
|
+
icon: "#doc"
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
SVGs must be UTF-8 with an `<svg>` root (an `<?xml ?>` declaration and comments may precede it), end
|
|
438
|
+
with `</svg>`, stay within 32 KiB each and 256 KiB of distinct markup per manifest, and must not contain
|
|
439
|
+
numeric character references (`&#`), `<!DOCTYPE>`/`<!ENTITY>`, `script`/`foreignObject`/`iframe`/
|
|
440
|
+
`object`/`embed`/`audio`/`video` elements, `on*=` handlers, `javascript:`/`vbscript:`/`data:text/html`
|
|
441
|
+
URLs, or external `href`/`xlink:href`/`url(...)` references. Declare a `viewBox` and prefer
|
|
442
|
+
`currentColor` without fixed width/height — icons render at 16–40px. When `metadata.icon` is absent
|
|
443
|
+
and `marketplace.logo` is a valid SVG, the logo is used as the app icon.
|
|
444
|
+
|
|
445
|
+
`verentis validate` and `verentis pack` report problems with the field path, for example
|
|
446
|
+
`spec.file-types[2].icon: ./icons/x.svg not found`. Iconify identifiers (`lucide:file-text`, `shapes`)
|
|
447
|
+
are legacy and only produce a warning; convert them with:
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
verentis icons migrate [dir] # *.app.yaml, *.engine.yaml and manifest.yaml in dir
|
|
451
|
+
verentis icons migrate --file my.app.yaml --dry-run
|
|
452
|
+
verentis icons migrate --iconify-api https://icons.internal.example # self-hosted Iconify API
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
`icons migrate` resolves each id (bare names map to `lucide:<name>`) from a locally installed
|
|
456
|
+
`@iconify-json/<prefix>` package when present, otherwise from the Iconify API
|
|
457
|
+
(`https://api.iconify.design`, override with `--iconify-api <url>` or `VERENTIS_ICONIFY_API`), and writes
|
|
458
|
+
it as a standalone SVG to `icons/<prefix>-<name>.svg` next to the manifest and rewrites the field to that path, preserving
|
|
459
|
+
the rest of the YAML. Ids that do not exist (e.g. `lucide:checklist`) are reported as errors, left
|
|
460
|
+
unchanged and make the command exit non-zero — replace them with your own SVG. Network failures
|
|
461
|
+
are reported per field in the same way. `verentis init` scaffolds `icons/app.svg` and references it
|
|
462
|
+
from `metadata.icon`.
|
|
463
|
+
|
|
418
464
|
## The `.vpkg` format
|
|
419
465
|
|
|
420
466
|
A gzip tarball: `manifest.yaml` + `files/**` payload + optional plaintext `catalog/**` presentation
|
|
@@ -452,6 +498,10 @@ Packing behaviour:
|
|
|
452
498
|
overrides the packed manifest version, and `--bump-version` increments the authored patch version.
|
|
453
499
|
`publish` without a file selects the highest-version `.vpkg` in the current directory. `validate`
|
|
454
500
|
accepts the same overlay selectors.
|
|
501
|
+
- Icons are inlined into the packed `manifest.yaml`: the top-level `icons:` map holds the validated SVG
|
|
502
|
+
markup keyed by the first 12 hex characters of its sha256, and every icon field becomes `"#<key>"`.
|
|
503
|
+
Legacy Iconify ids are left as-is. Source files are not modified; digests and signatures cover the
|
|
504
|
+
rewritten manifest.
|
|
455
505
|
- Marketplace files are selected independently of `packaging.files` and written to deterministic,
|
|
456
506
|
content-addressed `catalog/assets/**` and `catalog/docs/**` entries described by
|
|
457
507
|
`catalog/index.json` (schema version 1).
|