@getvitops/cli 2.1.0 → 4.0.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 +205 -0
- package/README.md +1 -1
- package/dist/cli.mjs +358 -40
- package/dist/cli.mjs.map +1 -1
- package/package.json +3 -3
- package/skill/SKILL.md +105 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,210 @@
|
|
|
1
1
|
# @getvitops/cli
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- f7bc0a0: Add `vitops search setup` — onboard domains into Google Search Console as domain properties.
|
|
8
|
+
|
|
9
|
+
**Breaking:** the `vitops indexing` command has been renamed to **`vitops search notify`**. There is
|
|
10
|
+
no alias — update any scripts or CI that call `vitops indexing` to `vitops search notify` (same flags,
|
|
11
|
+
same behaviour).
|
|
12
|
+
|
|
13
|
+
**New: `vitops search setup`.** For each domain in a site config's new `site.searchConsole` block
|
|
14
|
+
(a record keyed by bare hostname), it:
|
|
15
|
+
- ensures the apex verification TXT record in Cloudflare,
|
|
16
|
+
- verifies ownership via the Site Verification API (DNS_TXT), retried with exponential backoff while
|
|
17
|
+
DNS propagates — a still-unverified domain is reported **PENDING**, not failed,
|
|
18
|
+
- adds the `sc-domain:` property via the Search Console API,
|
|
19
|
+
- adds any `delegatedOwners` to the verified Site Verification web resource.
|
|
20
|
+
|
|
21
|
+
It is idempotent (a re-run of an onboarded domain is a no-op), supports `--check` (report drift, exit
|
|
22
|
+
non-zero, mutate nothing) and `--dry` (print the plan, change nothing), and `--domain <name>` to
|
|
23
|
+
scope to one entry. DNS records are only ever created, never edited or deleted.
|
|
24
|
+
|
|
25
|
+
Credentials come from the environment, never the config: `CLOUDFLARE_API_TOKEN` (a `Zone:DNS:Edit`
|
|
26
|
+
token) and a Google **user OAuth refresh token** as `VITOPS_GOOGLE_CLIENT_ID` /
|
|
27
|
+
`VITOPS_GOOGLE_CLIENT_SECRET` / `VITOPS_GOOGLE_REFRESH_TOKEN` (scoped to `siteverification` +
|
|
28
|
+
`webmasters`). Granting a Google Group **Full-User** access has no Search Console API and is surfaced
|
|
29
|
+
as a reminder in the summary rather than automated.
|
|
30
|
+
|
|
31
|
+
- ceed51f: `vitops search notify` now accepts either Google credential, so most sites need only one.
|
|
32
|
+
|
|
33
|
+
The two halves of `vitops search` each demanded a different, unrelated Google setup — five environment variables between them. `search setup` requires a user OAuth credential (verifying a site makes the caller an **owner** of the property, and that should be a person, not a project robot), while `search notify` accepted only a service account. Search Console does not care which identity calls it, so a consumer who had already run `search setup` was being made to create a second credential for the other half of the same command.
|
|
34
|
+
|
|
35
|
+
`search notify` now takes whichever you have, preferring the service account when both are set — it runs on every deploy, in CI, and a service account does not expire, whereas a refresh token can be revoked and expires after 7 days for an OAuth client still in _Testing_ publishing status. `search setup` is unchanged and still requires user OAuth.
|
|
36
|
+
|
|
37
|
+
**Breaking — two renamed exports.** Both did the same job under the same name from different subpaths, which forced an alias at every call site:
|
|
38
|
+
- `@getvitops/utils/indexing`: `getAccessToken` → **`serviceAccountToken`**
|
|
39
|
+
- `@getvitops/utils/onboarding`: `getAccessToken` → **`refreshTokenGrant`**
|
|
40
|
+
|
|
41
|
+
New: `googleAccessToken(credential)` from `@getvitops/utils/indexing` takes a `GoogleCredential` union and is what both wrappers now call. If you were importing either `getAccessToken`, switch to the specific name, or to `googleAccessToken` if you want to accept either identity.
|
|
42
|
+
|
|
43
|
+
Internally the exchange is now one function. The two grants send different form bodies; everything after that — endpoint, content-type, error handling, `access_token` extraction — was duplicated verbatim in two modules. The service-account JWT signing had no test at all, because it was only reachable over the network; it now does, including the literal-`\n`-in-a-PEM case that secret stores produce.
|
|
44
|
+
|
|
45
|
+
### Minor Changes
|
|
46
|
+
|
|
47
|
+
- 14813fa: Document which tier provides each pattern — `vitops docs components`.
|
|
48
|
+
|
|
49
|
+
The toolkit ships four tiers that compose: CSS framework classes, `<wc-*>` web components, Astro
|
|
50
|
+
components, Bricks elements. Nothing said so. The class reference listed pattern names, the
|
|
51
|
+
elements reference listed Bricks controls, and the fact that `tree` is _also_ a web component
|
|
52
|
+
_and_ an Astro component existed only in the source layout. The cost is silent: you hand-write
|
|
53
|
+
the markup a component already emits, or you wrap a component that already emits its own tag.
|
|
54
|
+
|
|
55
|
+
`TIERS` in `@getvitops/generator` is the new manifest — per pattern, its CSS partial and
|
|
56
|
+
representative classes, its `wc-*` tag and which bundle that ships in, its Astro component(s),
|
|
57
|
+
its Bricks element, and one line saying what to actually write. `tierPatterns(tier)` projects one
|
|
58
|
+
tier. `vitops docs components` renders all four in one document, and the reference sections it
|
|
59
|
+
feeds render the same data per tier.
|
|
60
|
+
|
|
61
|
+
It is **authored rather than derived, and drift-guarded** instead. Naming convention carries most
|
|
62
|
+
of it and breaks exactly where it matters — `splitter.css` hosts two components, `tag.css` serves
|
|
63
|
+
three config patterns, `anchor-link.css` provides `.link`, `layout.css` provides `.split` and
|
|
64
|
+
`.centered` — so a derivation would need an exceptions table longer than the rule, and a rename
|
|
65
|
+
would silently drop a link. Instead, tests fail the build when a hand-written CSS partial, a
|
|
66
|
+
`customElements.define`, an exported Astro component or a Bricks element isn't accounted for.
|
|
67
|
+
|
|
68
|
+
Four things the manifest records that cannot be inferred, each a real failure mode:
|
|
69
|
+
- **Whether an Astro component wraps a web component.** `Tree` and `CookieConsent` emit the
|
|
70
|
+
`<wc-*>` tag with the fallback inside; `Details`, `Drawer`, `Popover`, `NavShell` and `Subgrid`
|
|
71
|
+
emit tier-1 markup with no web component at all. Reading the first group as the second gives
|
|
72
|
+
`<wc-tree><Tree /></wc-tree>` — two elements on one tree, which renders and misbehaves.
|
|
73
|
+
- **Where each element ships.** `elements.js` for the registered set, its own bundle for
|
|
74
|
+
`<wc-consent>` and `<wc-theme-editor>`, and **no bundle at all** for the four editor-v2 tags —
|
|
75
|
+
which are registered, importable-looking and inert in a consumer project. The guard checks this
|
|
76
|
+
against what `js/elements.ts` imports, so it can't claim an element ships when it doesn't.
|
|
77
|
+
- **Whether a pattern is config-authored.** `patterns.items` patterns get the token cascade,
|
|
78
|
+
states, role variants and override hooks; a structural partial gets none of them. The docs also
|
|
79
|
+
now say when a config-authored pattern is **absent from your config**, because naming its
|
|
80
|
+
classes while your build emits none of them is worse than omitting it.
|
|
81
|
+
- **The import specifier, verbatim.** These are published as the line to copy, so they are checked
|
|
82
|
+
against `@getvitops/astro`'s `exports`. That guard immediately caught
|
|
83
|
+
`@getvitops/astro/components/../CookieConsent.astro` — plausible-looking, right basename, not an
|
|
84
|
+
importable path (`CookieConsent.astro` ships from the package root).
|
|
85
|
+
|
|
86
|
+
- 14813fa: Document the consent, conversion-tracking, search and legal subsystems for agents.
|
|
87
|
+
|
|
88
|
+
`vitops docs` gains four topics — `consent`, `tracking`, `search`, `legal` — and the docs
|
|
89
|
+
bundle gains the matching concept docs under `concepts/`. Until now these subsystems were
|
|
90
|
+
described only by their generated config-schema field descriptions, so an agent working in a
|
|
91
|
+
consumer project had no account of the rules that make them work, and every one of those rules
|
|
92
|
+
fails **silently** when broken:
|
|
93
|
+
- a gated tag given a live `src` instead of `type="text/plain"` fetches the third party anyway,
|
|
94
|
+
so the gate becomes decorative;
|
|
95
|
+
- a caller using `granted()` instead of `require()` never raises the banner, so on a site where
|
|
96
|
+
nothing else demands that category the permission is never offered, never granted, and the
|
|
97
|
+
write never happens;
|
|
98
|
+
- an absent `window.vitopsConsent` read as "denied" rather than "this site has no gate";
|
|
99
|
+
- a consent patch widened to every category records consent nobody gave;
|
|
100
|
+
- a sitemap with no `<lastmod>` makes edited pages undetectable, so `search notify` looks
|
|
101
|
+
healthy while never resubmitting anything;
|
|
102
|
+
- a stale IndexNow key file returns `202` and is then discarded;
|
|
103
|
+
- Google's Indexing API accepts ordinary URLs, discards them, and violates its own terms.
|
|
104
|
+
|
|
105
|
+
The packaged agent skill now covers consent and conversion tracking, and its description names
|
|
106
|
+
these subsystems so it is actually surfaced when they are the task.
|
|
107
|
+
|
|
108
|
+
Also fixed: the icons concept doc still called the Astro integration `getvitops()`, renamed to
|
|
109
|
+
`vitops()` in 3.0.
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies [14813fa]
|
|
114
|
+
- Updated dependencies [c6b99e7]
|
|
115
|
+
- Updated dependencies [c6b99e7]
|
|
116
|
+
- Updated dependencies [f7bc0a0]
|
|
117
|
+
- Updated dependencies [ceed51f]
|
|
118
|
+
- Updated dependencies [14813fa]
|
|
119
|
+
- Updated dependencies [14813fa]
|
|
120
|
+
- @getvitops/generator@4.0.0
|
|
121
|
+
- @getvitops/utils@4.0.0
|
|
122
|
+
|
|
123
|
+
## 3.0.0
|
|
124
|
+
|
|
125
|
+
### Major Changes
|
|
126
|
+
|
|
127
|
+
- 6e68ace: **Breaking:** the site config is now a three-section `Config` — `designSystem`,
|
|
128
|
+
`organization`, `site`.
|
|
129
|
+
|
|
130
|
+
The flat `SiteConfig` held the company (`organization`, `contact`, `locations`) and the
|
|
131
|
+
deployment (`analytics`, `environments`, `seo`, `legal`) as peers, so no single noun
|
|
132
|
+
described it, and a second site sharing the same company had no way to say so. The three
|
|
133
|
+
sections split those apart: several sites can now carry one `organization` and differ only
|
|
134
|
+
in `site`.
|
|
135
|
+
|
|
136
|
+
**Migrating.** `designSystem` stays at the root, and the fields already under
|
|
137
|
+
`organization` stay where they are. Everything else moves into one of two sections:
|
|
138
|
+
- → `site`: `defaultLocale`, `locales`, `domains`, `dns`, `cloudflare`, `environments`,
|
|
139
|
+
`abTesting`, `fonts`, `tags`, `postTypes`, `galleries`, `testimonials`, `templates`,
|
|
140
|
+
`navigation`, `seo`, `analytics`, `notifications`, `tracking`, `security`, `legal`,
|
|
141
|
+
`icons`, `favicon`, `deployment`
|
|
142
|
+
- → `organization`: `contact`, `primaryLocation`, `locations`, `services`, `links`
|
|
143
|
+
|
|
144
|
+
You do not have to work this out from the list: `vitops validate` detects a pre-3.0 flat
|
|
145
|
+
config and prints every move by name, rather than reporting a dozen unknown keys.
|
|
146
|
+
|
|
147
|
+
```jsonc
|
|
148
|
+
{
|
|
149
|
+
"designSystem": {
|
|
150
|
+
"themes": {
|
|
151
|
+
"default": {
|
|
152
|
+
/* … */
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
"organization": {
|
|
157
|
+
"name": "Acme",
|
|
158
|
+
"contact": "hq",
|
|
159
|
+
"locations": {
|
|
160
|
+
"hq": {
|
|
161
|
+
/* … */
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
"site": {
|
|
166
|
+
"defaultLocale": "en",
|
|
167
|
+
"domains": {
|
|
168
|
+
/* … */
|
|
169
|
+
},
|
|
170
|
+
"analytics": {
|
|
171
|
+
/* … */
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Renamed exports** (`@getvitops/generator`): `SiteConfigSchema` → `ConfigSchema`,
|
|
178
|
+
`SiteConfig` → `Config`, `validateSite` → `validateConfig`, `resolveSiteConfig` →
|
|
179
|
+
`resolveConfig`, `isSiteConfig` → `isConfig`, `siteJsonSchema` → `configJsonSchema`,
|
|
180
|
+
`SITE_SCHEMA_URL` → `CONFIG_SCHEMA_URL`, `SiteValidationResult` →
|
|
181
|
+
`ConfigValidationResult`. `ResolvedInput.site` is now `ResolvedInput.config`. New:
|
|
182
|
+
`OrganizationConfig` and `SiteSection` for the two sections.
|
|
183
|
+
|
|
184
|
+
**Renamed schema file:** `@getvitops/generator/site.schema.json` →
|
|
185
|
+
`@getvitops/generator/config.schema.json`. Update the `$schema` key in your config.
|
|
186
|
+
|
|
187
|
+
Option names are unchanged — `vitops({ site: { input } })`, the Vite plugin's `site`,
|
|
188
|
+
and `generate({ site })` still point at the config file.
|
|
189
|
+
|
|
190
|
+
**The Astro integration is now `vitops()`, not `getvitops()`.** It is a default export,
|
|
191
|
+
so the name is yours and nothing breaks on upgrade, but every example now reads
|
|
192
|
+
`import vitops from '@getvitops/astro'` — matching the Vite plugin, which has always been
|
|
193
|
+
`vitops`. The `@getvitops/*` package scope and the internal `virtual:getvitops/*` module
|
|
194
|
+
ids are unchanged; neither is an import name.
|
|
195
|
+
|
|
196
|
+
**Added:** a generated config authoring reference — `vitops docs config`, `docs/config.md`
|
|
197
|
+
in the OKF bundle, and _Config reference_ on the docs site. It is walked from the published
|
|
198
|
+
JSON Schema by the same helper that renders the `design-system.json` reference, so it
|
|
199
|
+
cannot describe a field validation does not accept.
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- Updated dependencies [6e68ace]
|
|
204
|
+
- Updated dependencies [b115993]
|
|
205
|
+
- @getvitops/generator@3.0.0
|
|
206
|
+
- @getvitops/utils@3.0.0
|
|
207
|
+
|
|
3
208
|
## 2.1.0
|
|
4
209
|
|
|
5
210
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ npx vitops generate --format bricks,css --out dist
|
|
|
25
25
|
| `vitops favicon -i <svg\|png> -o <dir>` | generate a favicon set from a source image |
|
|
26
26
|
| `vitops agents [-o AGENTS.md] [--docs-dir <dir>]` | link the agent skill + AGENTS.md pointer |
|
|
27
27
|
| `vitops docs [topic] [--all]` | print live reference docs to stdout |
|
|
28
|
-
| `vitops
|
|
28
|
+
| `vitops search notify [--dry] [--check]` | tell search engines about a deploy |
|
|
29
29
|
| `vitops media [--raw <dir>] [-o <dir>]` | encode raw video to WebM + MP4 + poster |
|
|
30
30
|
|
|
31
31
|
Every `--input` takes a `design-system.json` **or** the larger site config that embeds one
|