@bettercms-ai/convert 0.9.0 → 0.11.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/CHANGELOG.md +34 -0
- package/README.md +23 -0
- package/dist/cli.js +312 -25
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +81 -5
- package/dist/index.js +264 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @bettercms-ai/convert
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- `--componentize` extracts FLAT field families (`wrap-h2-latest`, whose key is `h2_latest`), which were
|
|
8
|
+
refused as `PROP_MAP_INCONSISTENT`. The section reads its copy through the new helper `bcmsSectionPaths`
|
|
9
|
+
and addresses instance copy by the override key the plan names (`overrideKey`, including repeater rows).
|
|
10
|
+
- An Astro section carries the page's scoped plain-CSS `<style>` blocks, so it renders styled on its own —
|
|
11
|
+
for every newly extracted section, dotted families included (Astro scopes styles per file, so page CSS
|
|
12
|
+
never reached a moved section). `is:global`, `define:vars`, `lang="…"` and `@import`/`@use` blocks stay on
|
|
13
|
+
the page.
|
|
14
|
+
- The componentize receipt lists `componentFiles` (`{ slug, path, export }`): submit it with the MCP tool
|
|
15
|
+
`submit_componentize_receipt` so every extracted section is recorded as its component's source and the
|
|
16
|
+
dashboard's Output can build, validate and render it.
|
|
17
|
+
- Helper v7. A v6 helper is recognised and upgraded in place.
|
|
18
|
+
|
|
19
|
+
## 0.10.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- ac3a9ff: Declare the shapes the derive lane mints for every visible body tag: a heading whose styled run is
|
|
24
|
+
part of its value (`richtext inline`, bound whole rather than wrapped around its text node), a
|
|
25
|
+
standalone `span`/`time`/`small`/`label`/`option` leaf, a `<pre>` code block (the `<pre>` is the
|
|
26
|
+
field, not the `<code>` inside it), and a group row whose optional leaf is empty (covered by its
|
|
27
|
+
own route's templated declaration instead of reported `NO_ORIGINAL`). A heading split by a `<br />`
|
|
28
|
+
is found again: its value carries no space, because no text node holds one.
|
|
29
|
+
|
|
30
|
+
An inline heading the lane cannot own whole — its element holds a component, a `<slot>` or an
|
|
31
|
+
expression, which no stored string can re-emit — is refused by name (`SUBTREE_NOT_HTML`) instead of
|
|
32
|
+
being bound over the top of it.
|
|
33
|
+
|
|
34
|
+
New `--xray <dist-dir>` mode: how much of each built page's visible copy no binding owns, and the
|
|
35
|
+
biggest buckets of it, so the loop is build -> measure -> fix -> build with no deploy in it.
|
|
36
|
+
|
|
3
37
|
## 0.9.0
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -38,6 +38,27 @@ Exit codes: `0` done — the pending list is printed, not hidden; `1` something
|
|
|
38
38
|
| `--strict` | exit 2 when any path is pending. |
|
|
39
39
|
| `--overwrite-helper` | replace a `bcms-content` helper whose bytes this tool did not write — including one of ours that has since been edited. |
|
|
40
40
|
| `--verbose` | stack traces, and every file considered. |
|
|
41
|
+
| `--xray <dist-dir>` | a mode of its own: measure a LOCAL build instead of converting one. |
|
|
42
|
+
|
|
43
|
+
### `--xray` — what is not editable
|
|
44
|
+
|
|
45
|
+
A receipt says what the codemod bound. It cannot say what it was never asked to bind, so a site can
|
|
46
|
+
report full coverage while a quarter of its visible text is unreachable from the editor. `--xray`
|
|
47
|
+
walks a build and counts that, per page, with no deploy in the loop:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run build && npx @bettercms-ai/convert --xray dist
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
docs/index.html visible=3512 unaddressable=701 (20.0%)
|
|
55
|
+
379ch 4n code @ main e.g. "const site = { direction: 'rtl', language: 'ar'," | "npm install"
|
|
56
|
+
188ch 12n span @ main>ul e.g. "Performance" | "100"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Glyphs, ordinals, the platform badge and skip links are excluded from BOTH halves of the ratio —
|
|
60
|
+
counting them would put a floor under every route that no amount of binding could lift. `--strict`
|
|
61
|
+
exits 2 while any page is above 2 %. It takes no `--brief`: it measures, it does not convert.
|
|
41
62
|
|
|
42
63
|
## What it actually does
|
|
43
64
|
|
|
@@ -152,6 +173,8 @@ rendering that binding — `<img>`, `<source>`, `<video poster>`, or `<Image>`/`
|
|
|
152
173
|
different paths share a sentence and position cannot separate them (both are skipped; the rest of
|
|
153
174
|
the file still converts), `SUBSTRING_ONLY`, `IN_SCRIPT_OR_COMMENT`, `KIND_MISMATCH`,
|
|
154
175
|
`REPEATER_AMBIGUOUS` (one array declaration, two loops over it — the row has two homes),
|
|
176
|
+
`SUBTREE_NOT_HTML` (an INLINE richtext heading whose element holds a component, a `<slot>` or an
|
|
177
|
+
expression: its whole subtree is the value and no stored string can re-emit that),
|
|
155
178
|
`IMAGE_ASSET_UNRESOLVED`, `PARSE_ERROR`. `NOT_IN_SOURCE` is reserved for what it says: a path
|
|
156
179
|
`locate` found in a file is `IN_EXPRESSION` when it sits in the module region or an expression
|
|
157
180
|
node, and where `NOT_IN_SOURCE` is still the answer the row names the file it was found in. And
|