@utopia-studio-design/design-system-cli 0.8.2 → 0.8.3
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.
|
@@ -20,3 +20,12 @@ allowance was exhausted. No Rams score is claimed.
|
|
|
20
20
|
|
|
21
21
|
Production authentication/backend environment settings are preserved. This
|
|
22
22
|
release does not deploy Convex or include unrelated local room/auth changes.
|
|
23
|
+
|
|
24
|
+
## Concurrent release reconciliation
|
|
25
|
+
|
|
26
|
+
A separate Brandbook task published CLI 0.8.1 during this release without the
|
|
27
|
+
UX APIs. CLI 0.8.2 combines both releases: all UX APIs and source bundles,
|
|
28
|
+
Brandbook validation, and version-pinned generated MCP launch configuration.
|
|
29
|
+
CLI tests passed again; public 0.8.2 tarball verification covers UX discovery,
|
|
30
|
+
Brandbook tool retention and validation, all 59 examples, and nine templates.
|
|
31
|
+
Final versions: design-system 0.11.0, design-system-cli 0.8.2.
|
package/lib/api.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync } from 'node:fs'
|
|
2
|
+
import { execFileSync } from 'node:child_process'
|
|
2
3
|
import { dirname, join, resolve } from 'node:path'
|
|
3
4
|
import { fileURLToPath } from 'node:url'
|
|
4
5
|
import {
|
|
@@ -22,6 +23,34 @@ export const mcpLaunch = {
|
|
|
22
23
|
args: ['-y', '--package', `${packageMetadata.name}@${cliVersion}`, 'utopia-ds', 'mcp'],
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
let registryVersionCache
|
|
27
|
+
|
|
28
|
+
function compareVersions(left, right) {
|
|
29
|
+
const a = String(left).split('.').map(Number)
|
|
30
|
+
const b = String(right).split('.').map(Number)
|
|
31
|
+
for (let index = 0; index < Math.max(a.length, b.length); index += 1) {
|
|
32
|
+
if ((a[index] || 0) !== (b[index] || 0)) return (a[index] || 0) - (b[index] || 0)
|
|
33
|
+
}
|
|
34
|
+
return 0
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function registryVersionStatus() {
|
|
38
|
+
if (registryVersionCache) return registryVersionCache
|
|
39
|
+
try {
|
|
40
|
+
const output = execFileSync('npm', ['view', packageMetadata.name, 'dist-tags.latest', '--json'], {
|
|
41
|
+
encoding: 'utf8',
|
|
42
|
+
timeout: 5000,
|
|
43
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
44
|
+
}).trim()
|
|
45
|
+
const latest = JSON.parse(output)
|
|
46
|
+
const upToDate = compareVersions(cliVersion, latest) >= 0
|
|
47
|
+
registryVersionCache = { current: cliVersion, latest, upToDate, checked: true }
|
|
48
|
+
} catch {
|
|
49
|
+
registryVersionCache = { current: cliVersion, latest: null, upToDate: null, checked: false }
|
|
50
|
+
}
|
|
51
|
+
return registryVersionCache
|
|
52
|
+
}
|
|
53
|
+
|
|
25
54
|
export function paths(root = hasWorkspaceSource ? workspaceRoot : packagedDataRoot) {
|
|
26
55
|
return {
|
|
27
56
|
root,
|
|
@@ -467,6 +496,7 @@ export function capabilityManifest() {
|
|
|
467
496
|
}
|
|
468
497
|
|
|
469
498
|
export function repositoryDoctor() {
|
|
499
|
+
const registry = registryVersionStatus()
|
|
470
500
|
const required = [
|
|
471
501
|
'catalog.json', 'components.json', 'blocks.json', 'composition-registry.json', 'templates.json', 'themes.json', 'motion-profiles.json', 'logo-skills.json', 'ux-patterns.json', 'brandbook-skill.json',
|
|
472
502
|
].map((name) => join(paths().manifests, name))
|
|
@@ -515,7 +545,14 @@ export function repositoryDoctor() {
|
|
|
515
545
|
&& mcpLaunch.command === 'npx'
|
|
516
546
|
&& mcpLaunch.args.includes('utopia-ds')
|
|
517
547
|
&& mcpLaunch.args.at(-1) === 'mcp',
|
|
548
|
+
cliVersion: registry.current,
|
|
549
|
+
registryLatest: registry.latest,
|
|
550
|
+
cliUpToDate: registry.upToDate,
|
|
518
551
|
},
|
|
519
552
|
missing: [...missing, ...contractIssues],
|
|
553
|
+
warnings: [
|
|
554
|
+
...(!registry.checked ? [{ code: 'REGISTRY_CHECK_UNAVAILABLE', message: 'Could not read the npm registry latest tag; verify the pinned MCP package version manually.' }] : []),
|
|
555
|
+
...(registry.checked && !registry.upToDate ? [{ code: 'CLI_OUTDATED', message: `Ceramic CLI ${registry.current} is older than npm latest ${registry.latest}. Update the project MCP package pin and restart the client.` }] : []),
|
|
556
|
+
],
|
|
520
557
|
}
|
|
521
558
|
}
|