@refrakt-md/cli 0.24.5 → 0.25.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.
@@ -0,0 +1,98 @@
1
+ /** `refrakt template install` — add a full-site template as a NEW site in an
2
+ * existing project (SPEC-110 §4 kind:"site"). The greenfield path is
3
+ * `create-refrakt --template`; this is the add-to-existing-project surface.
4
+ *
5
+ * v1 resolves a **local directory** template (the directly-readable, portable
6
+ * case). Tarball/registry templates are scaffold-copied artifacts — fetch them
7
+ * with `create-refrakt` for now. */
8
+ import { existsSync, readFileSync, cpSync } from 'node:fs';
9
+ import { resolve, isAbsolute } from 'node:path';
10
+ import { execSync } from 'node:child_process';
11
+ import { loadRefraktConfigFile, writeRefraktConfigFile, detectPackageManager } from '../config-file.js';
12
+ import { resolveTargetSite, createSite, getProjectRefraktVersion, validateCompat, } from './install.js';
13
+ /** Compose a template into a new site of `raw` and return the dependency names
14
+ * to install. Pure w.r.t. the package manager (caller installs). Copies the
15
+ * template's content/sandboxes into the new site's derived destinations. */
16
+ export function applyTemplateSite(raw, templateDir, siteKey, projectRoot) {
17
+ const manifest = JSON.parse(readFileSync(resolve(templateDir, 'template.json'), 'utf-8'));
18
+ if (manifest.kind && manifest.kind !== 'site') {
19
+ throw new Error(`template has kind "${manifest.kind}" — only "site" templates are supported`);
20
+ }
21
+ const tsite = manifest.site ?? {};
22
+ // Destinations: a new non-default site lives under sites/<key>/.
23
+ const base = siteKey === 'default' ? '.' : `sites/${siteKey}`;
24
+ const contentDir = `${base}/content`;
25
+ cpSync(resolve(templateDir, 'content'), resolve(projectRoot, contentDir), { recursive: true });
26
+ const site = { contentDir, theme: tsite.theme ?? '@refrakt-md/lumina' };
27
+ const siteRec = site;
28
+ const tsiteRec = tsite;
29
+ for (const key of ['plugins', 'routeRules', 'entityRoutes', 'assets', 'backgrounds', 'overrides', 'tints', 'highlight', 'target']) {
30
+ if (tsiteRec[key] !== undefined)
31
+ siteRec[key] = tsiteRec[key];
32
+ }
33
+ if (existsSync(resolve(templateDir, 'sandboxes'))) {
34
+ const sandboxDir = `${base}/sandboxes`;
35
+ cpSync(resolve(templateDir, 'sandboxes'), resolve(projectRoot, sandboxDir), { recursive: true });
36
+ site.sandbox = { dir: sandboxDir };
37
+ }
38
+ createSite(raw, siteKey, site);
39
+ const deps = [...(tsite.plugins ?? [])];
40
+ const themePkg = typeof tsite.theme === 'string' ? tsite.theme : tsite.theme?.package;
41
+ if (themePkg)
42
+ deps.push(themePkg);
43
+ return { deps };
44
+ }
45
+ export async function templateInstallCommand(options) {
46
+ const { source, site: siteFlag } = options;
47
+ const cwd = process.cwd();
48
+ const dir = isAbsolute(source) ? source : resolve(cwd, source);
49
+ if (!existsSync(resolve(dir, 'template.json'))) {
50
+ console.error(`Error: "${source}" is not a template directory (no template.json).`);
51
+ console.error('For a published/bundled template, scaffold with: create-refrakt <name> --template <source>');
52
+ process.exit(1);
53
+ }
54
+ let configData;
55
+ try {
56
+ configData = loadRefraktConfigFile(cwd);
57
+ }
58
+ catch {
59
+ console.error('Error: No refrakt.config.json found in the current directory.');
60
+ process.exit(1);
61
+ }
62
+ // Full-site templates create a NEW site; the key must not collide.
63
+ const selection = resolveTargetSite(configData.raw, siteFlag, 'new');
64
+ if (!selection.key) {
65
+ console.error(`Error: ${selection.error}.`);
66
+ if (selection.candidates?.length)
67
+ console.error(`Existing sites: ${selection.candidates.join(', ')}`);
68
+ process.exit(1);
69
+ }
70
+ // Compat (ADR-023).
71
+ const manifest = JSON.parse(readFileSync(resolve(dir, 'template.json'), 'utf-8'));
72
+ const compat = validateCompat(manifest.refrakt, getProjectRefraktVersion(cwd));
73
+ for (const w of compat.warnings)
74
+ console.log(` ⚠ ${w}`);
75
+ if (compat.errors.length) {
76
+ for (const e of compat.errors)
77
+ console.error(` ✗ ${e}`);
78
+ process.exit(1);
79
+ }
80
+ const { deps } = applyTemplateSite(configData.raw, dir, selection.key, cwd);
81
+ writeRefraktConfigFile(configData.path, configData.raw);
82
+ // Pin + install the derived dependencies (theme + plugins).
83
+ if (deps.length) {
84
+ const pm = detectPackageManager(cwd);
85
+ const cmd = pm.installCmd(deps.join(' '));
86
+ console.log(`Installing template dependencies with ${pm.name}...`);
87
+ try {
88
+ execSync(cmd, { cwd, stdio: 'inherit' });
89
+ }
90
+ catch {
91
+ console.error(`\nWarning: failed to install ${deps.join(', ')} — run "${cmd}" manually.`);
92
+ }
93
+ }
94
+ console.log('');
95
+ console.log(`Template installed as site "${selection.key}".`);
96
+ console.log(` content → ${(configData.raw.sites?.[selection.key]?.contentDir) ?? `sites/${selection.key}/content`}`);
97
+ }
98
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"AAAA;;;;;;qCAMqC;AAErC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAa,MAAM,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACxG,OAAO,EACN,iBAAiB,EACjB,UAAU,EACV,wBAAwB,EACxB,cAAc,GACd,MAAM,cAAc,CAAC;AAatB;;6EAE6E;AAC7E,MAAM,UAAU,iBAAiB,CAChC,GAAkB,EAClB,WAAmB,EACnB,OAAe,EACf,WAAmB;IAEnB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,eAAe,CAAC,EAAE,OAAO,CAAC,CAAyB,CAAC;IAClH,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,CAAC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D,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,MAAM,EAAE,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,yCAAyC,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC;QACnE,IAAI,CAAC;YACJ,QAAQ,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC1C,CAAC;QAAC,MAAM,CAAC;YACR,OAAO,CAAC,KAAK,CAAC,gCAAgC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,CAAC;QAC3F,CAAC;IACF,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,+BAA+B,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,IAAI,SAAS,SAAS,CAAC,GAAG,UAAU,EAAE,CAAC,CAAC;AACvH,CAAC"}
@@ -1,10 +1,20 @@
1
1
  export interface ThemeInstallOptions {
2
2
  source: string;
3
+ /** Target site key for multi-site projects (SPEC-110 §3). */
4
+ site?: string;
5
+ /** Alternate registry passthrough (SPEC-110 §2). */
6
+ registry?: string;
3
7
  }
4
8
  export interface ThemeInfoOptions {
9
+ site?: string;
5
10
  }
6
- /** Install a theme package and update refrakt.config.json */
11
+ export interface ThemeListOptions {
12
+ }
13
+ /** Install a theme package and point a site's `theme` field at it. */
7
14
  export declare function themeInstallCommand(options: ThemeInstallOptions): Promise<void>;
8
- /** Show info about the currently configured theme */
9
- export declare function themeInfoCommand(_options: ThemeInfoOptions): Promise<void>;
15
+ /** Show info about the currently configured theme. */
16
+ export declare function themeInfoCommand(options: ThemeInfoOptions): Promise<void>;
17
+ /** List installed themes (packages exporting `./transform`) + the active one
18
+ * (SPEC-110 §5). */
19
+ export declare function themeListCommand(_options: ThemeListOptions): Promise<void>;
10
20
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/commands/theme.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;CAEhC;AAED,6DAA6D;AAC7D,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuHrF;AAED,qDAAqD;AACrD,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6ChF"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/commands/theme.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;CAEhC;AAkBD,sEAAsE;AACtE,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2ErF;AAED,sDAAsD;AACtD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC/E;AAED;qBACqB;AACrB,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqChF"}
@@ -1,49 +1,42 @@
1
- import { existsSync, readFileSync } from 'node:fs';
2
- import { resolve, isAbsolute } from 'node:path';
1
+ import { existsSync, readFileSync, readdirSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
3
  import { execSync } from 'node:child_process';
4
- import { detectPackageManager, loadRefraktConfigFile, writeRefraktConfigFile, } from '../config-file.js';
5
- /** Install a theme package and update refrakt.config.json */
6
- export async function themeInstallCommand(options) {
7
- const { source } = options;
8
- const cwd = process.cwd();
9
- // 1. Determine source type and package name
10
- const absSource = isAbsolute(source) ? source : resolve(cwd, source);
11
- let pluginName;
12
- let installSource;
13
- if (existsSync(absSource)) {
14
- // Local directory or tarball
15
- const pkgJsonPath = source.endsWith('.tgz')
16
- ? null // Can't easily read from tarball without tar parser
17
- : resolve(absSource, 'package.json');
18
- if (pkgJsonPath && existsSync(pkgJsonPath)) {
19
- const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf-8'));
20
- pluginName = pkg.name;
21
- if (!pluginName) {
22
- console.error('Error: Theme package.json is missing a "name" field');
23
- process.exit(1);
24
- }
25
- installSource = `file:${absSource}`;
26
- }
27
- else if (source.endsWith('.tgz')) {
28
- // For tarballs, install first then read name from node_modules
29
- installSource = absSource;
30
- pluginName = ''; // resolved after install
4
+ import { loadRefraktConfigFile, writeRefraktConfigFile, } from '../config-file.js';
5
+ import { resolveSource, buildInstallCommand, readInstalledManifest, getProjectRefraktVersion, validateCompat, validateThemeExports, detectFrameworkLayers, resolveTargetSite, setSiteTheme, } from './install.js';
6
+ /** Read a theme's declared `refrakt` compatibility range from its installed
7
+ * manifest.json (ThemeManifest) or package.json (ADR-023). */
8
+ function readThemeCompatRange(cwd, pkgName) {
9
+ const manifestPath = resolve(cwd, 'node_modules', pkgName, 'manifest.json');
10
+ if (existsSync(manifestPath)) {
11
+ try {
12
+ const m = JSON.parse(readFileSync(manifestPath, 'utf-8'));
13
+ if (m.refrakt)
14
+ return m.refrakt;
31
15
  }
32
- else {
33
- console.error(`Error: No package.json found in ${absSource}`);
34
- process.exit(1);
16
+ catch {
17
+ // fall through
35
18
  }
36
19
  }
37
- else {
38
- // npm package name
39
- pluginName = source;
40
- installSource = source;
41
- }
42
- // 2. Detect package manager
43
- const pm = detectPackageManager(cwd);
44
- console.log(`Using ${pm.name} to install theme...`);
45
- // 3. Install
46
- const cmd = pm.installCmd(installSource);
20
+ const pkg = readInstalledManifest(cwd, pkgName);
21
+ return pkg?.refrakt;
22
+ }
23
+ /** Install a theme package and point a site's `theme` field at it. */
24
+ export async function themeInstallCommand(options) {
25
+ const { source, site: siteFlag, registry } = options;
26
+ const cwd = process.cwd();
27
+ // 1. Resolve the source to a concrete package name (SPEC-110 §1).
28
+ let resolved;
29
+ try {
30
+ resolved = resolveSource(source, cwd);
31
+ }
32
+ catch (err) {
33
+ console.error(`Error: ${err.message}`);
34
+ process.exit(1);
35
+ }
36
+ const pluginName = resolved.name;
37
+ // 2. Install via the detected package manager (+ optional --registry).
38
+ const { name: pmName, cmd } = buildInstallCommand(resolved.installSource, { registry, cwd });
39
+ console.log(`Using ${pmName} to install theme "${pluginName}"...`);
47
40
  try {
48
41
  execSync(cmd, { cwd, stdio: 'inherit' });
49
42
  }
@@ -51,16 +44,7 @@ export async function themeInstallCommand(options) {
51
44
  console.error(`\nError: Failed to install theme. Command: ${cmd}`);
52
45
  process.exit(1);
53
46
  }
54
- // 4. For tarballs, resolve package name from the install output
55
- if (!pluginName) {
56
- // After npm install of a tarball, the package is in node_modules
57
- // We need to search for it — check recent additions
58
- console.error('Error: Could not determine package name from tarball.');
59
- console.error('Please install from the unzipped directory instead:');
60
- console.error(' refrakt theme install ./path/to/theme-directory');
61
- process.exit(1);
62
- }
63
- // 5. Update refrakt.config.json
47
+ // 3. Load config + choose the target site.
64
48
  let configData;
65
49
  try {
66
50
  configData = loadRefraktConfigFile(cwd);
@@ -70,57 +54,49 @@ export async function themeInstallCommand(options) {
70
54
  console.error('Are you in a refrakt.md project root?');
71
55
  process.exit(1);
72
56
  }
73
- // `theme install` only knows how to update one site's theme. For multi-site
74
- // configs the user has to pick which site explicitly — out of scope for this
75
- // command today.
76
- const rawSites = (configData.raw.sites ?? {});
77
- const siteNames = Object.keys(rawSites);
78
- if (siteNames.length > 1) {
79
- console.error(`Error: refrakt.config.json declares multiple sites (${siteNames.map((n) => `"${n}"`).join(', ')}).`);
80
- console.error('`theme install` cannot pick a target automatically. Update the relevant site\'s "theme" field manually.');
81
- process.exit(1);
82
- }
83
- const previousTheme = writeThemeIntoConfig(configData.raw, pluginName);
84
- writeRefraktConfigFile(configData.path, configData.raw);
85
- // 6. Validate the installed theme
86
- const warnings = [];
87
- try {
88
- const themeDir = resolve(cwd, 'node_modules', pluginName);
89
- if (!existsSync(themeDir)) {
90
- warnings.push('Theme directory not found in node_modules — install may have failed');
91
- }
92
- else {
93
- const themePkg = JSON.parse(readFileSync(resolve(themeDir, 'package.json'), 'utf-8'));
94
- const exports = themePkg.exports ?? {};
95
- if (!exports['./svelte'] && !exports['./svelte/index.js']) {
96
- warnings.push('Theme is missing ./svelte export — runtime rendering may fail');
97
- }
98
- if (!exports['./transform']) {
99
- warnings.push('Theme is missing ./transform export — CSS tree-shaking will be skipped');
100
- }
57
+ const selection = resolveTargetSite(configData.raw, siteFlag, 'existing');
58
+ if (!selection.key) {
59
+ console.error(`Error: ${selection.error}.`);
60
+ if (selection.candidates?.length) {
61
+ console.error(`Sites: ${selection.candidates.map((s) => `"${s}"`).join(', ')}`);
101
62
  }
63
+ process.exit(1);
102
64
  }
103
- catch {
104
- // Validation is best-effort
65
+ // 4. Validate refrakt compatibility (ADR-023) before wiring it in.
66
+ const compat = validateCompat(readThemeCompatRange(cwd, pluginName), getProjectRefraktVersion(cwd));
67
+ if (compat.errors.length > 0) {
68
+ console.error('');
69
+ console.error(`Error: theme "${pluginName}" is not compatible with this project:`);
70
+ for (const e of compat.errors)
71
+ console.error(` ✗ ${e}`);
72
+ console.error('The package was installed but refrakt.config.json was not updated.');
73
+ process.exit(1);
105
74
  }
106
- // 7. Output results
75
+ // 5. Point the site's theme at the package.
76
+ const previousTheme = setSiteTheme(configData.raw, selection.key, pluginName);
77
+ writeRefraktConfigFile(configData.path, configData.raw);
78
+ // 6. Framework-aware export validation (ADR-024).
79
+ const pkg = readInstalledManifest(cwd, pluginName);
80
+ const warnings = [...validateThemeExports(pkg), ...compat.warnings];
81
+ const layers = detectFrameworkLayers(pkg);
82
+ // 7. Report.
107
83
  console.log('');
108
- console.log(`Theme "${pluginName}" installed successfully.`);
84
+ console.log(`Theme "${pluginName}" installed successfully${selection.key !== 'default' ? ` for site "${selection.key}"` : ''}.`);
109
85
  if (previousTheme !== pluginName) {
110
- console.log(` Updated refrakt.config.json: "${previousTheme}" → "${pluginName}"`);
86
+ console.log(` Updated refrakt.config.json: "${previousTheme ?? '(none)'}" → "${pluginName}"`);
111
87
  }
88
+ console.log(` Framework layer: ${layers.length ? layers.join(', ') : 'none (framework-agnostic)'}`);
112
89
  if (warnings.length > 0) {
113
90
  console.log('');
114
91
  console.log('Warnings:');
115
- for (const w of warnings) {
92
+ for (const w of warnings)
116
93
  console.log(` ⚠ ${w}`);
117
- }
118
94
  }
119
95
  console.log('');
120
96
  console.log('Run your dev server to see the new theme in action.');
121
97
  }
122
- /** Show info about the currently configured theme */
123
- export async function themeInfoCommand(_options) {
98
+ /** Show info about the currently configured theme. */
99
+ export async function themeInfoCommand(options) {
124
100
  const cwd = process.cwd();
125
101
  let configData;
126
102
  try {
@@ -130,87 +106,107 @@ export async function themeInfoCommand(_options) {
130
106
  console.error('Error: No refrakt.config.json found in the current directory.');
131
107
  process.exit(1);
132
108
  }
133
- const themeName = readThemeFromConfig(configData.raw);
109
+ const selection = resolveTargetSite(configData.raw, options.site, 'existing');
110
+ const themeName = selection.key ? readThemeForSite(configData.raw, selection.key) : undefined;
134
111
  if (!themeName) {
135
- console.error('Error: refrakt.config.json does not declare a theme. Add one under "site.theme" or pick a site to inspect with --site.');
112
+ console.error('Error: refrakt.config.json does not declare a theme for the selected site.');
136
113
  process.exit(1);
137
114
  }
138
115
  console.log(`Current theme: ${themeName}`);
139
- // Try to resolve and show details
116
+ const pkg = readInstalledManifest(cwd, themeName);
117
+ if (pkg) {
118
+ console.log(` Version: ${pkg.version ?? 'unknown'}`);
119
+ if (pkg.description)
120
+ console.log(` Description: ${pkg.description}`);
121
+ const exportsMap = (pkg.exports ?? {});
122
+ const features = [];
123
+ if (exportsMap['./transform'])
124
+ features.push('transform');
125
+ if (exportsMap['./layouts'])
126
+ features.push('layouts');
127
+ if (exportsMap['./styles/runes/*.css'])
128
+ features.push('rune CSS');
129
+ const layers = detectFrameworkLayers(pkg);
130
+ if (features.length)
131
+ console.log(` Provides: ${features.join(', ')}`);
132
+ console.log(` Framework layer: ${layers.length ? layers.join(', ') : 'none (framework-agnostic)'}`);
133
+ }
134
+ else if (themeName.startsWith('.')) {
135
+ console.log(` Type: Local directory`);
136
+ console.log(` Path: ${resolve(cwd, themeName)}`);
137
+ }
138
+ else {
139
+ console.log(` Status: Not found in node_modules`);
140
+ }
141
+ }
142
+ /** List installed themes (packages exporting `./transform`) + the active one
143
+ * (SPEC-110 §5). */
144
+ export async function themeListCommand(_options) {
145
+ const cwd = process.cwd();
146
+ let configData;
140
147
  try {
141
- const themeDir = resolve(cwd, 'node_modules', themeName);
142
- if (existsSync(themeDir)) {
143
- const pkg = JSON.parse(readFileSync(resolve(themeDir, 'package.json'), 'utf-8'));
144
- console.log(` Version: ${pkg.version ?? 'unknown'}`);
145
- console.log(` Path: ${themeDir}`);
146
- if (pkg.description) {
147
- console.log(` Description: ${pkg.description}`);
148
- }
149
- const exports = pkg.exports ?? {};
150
- const features = [];
151
- if (exports['./svelte'])
152
- features.push('svelte');
153
- if (exports['./transform'])
154
- features.push('transform');
155
- if (exports['./styles/runes/*.css'])
156
- features.push('rune CSS');
157
- if (features.length > 0) {
158
- console.log(` Exports: ${features.join(', ')}`);
159
- }
148
+ configData = loadRefraktConfigFile(cwd);
149
+ }
150
+ catch {
151
+ console.error('Error: No refrakt.config.json found in the current directory.');
152
+ process.exit(1);
153
+ }
154
+ const active = new Set();
155
+ for (const key of (configData.raw.site ? ['default'] : Object.keys(configData.raw.sites ?? {}))) {
156
+ const t = readThemeForSite(configData.raw, key);
157
+ if (t)
158
+ active.add(t);
159
+ }
160
+ const modulesDir = resolve(cwd, 'node_modules');
161
+ const found = [];
162
+ for (const dir of listPackageDirs(modulesDir)) {
163
+ const pkg = readInstalledManifest(cwd, dir);
164
+ const exportsMap = (pkg?.exports ?? {});
165
+ if (pkg && exportsMap['./transform']) {
166
+ found.push({ name: dir, version: String(pkg.version ?? '?'), layers: detectFrameworkLayers(pkg) });
160
167
  }
161
- else if (themeName.startsWith('.')) {
162
- console.log(` Type: Local directory`);
163
- console.log(` Path: ${resolve(cwd, themeName)}`);
168
+ }
169
+ if (found.length === 0) {
170
+ console.log('No themes (packages exporting ./transform) found in node_modules.');
171
+ return;
172
+ }
173
+ console.log('Installed themes:');
174
+ for (const t of found.sort((a, b) => a.name.localeCompare(b.name))) {
175
+ const marker = active.has(t.name) ? '*' : ' ';
176
+ const layer = t.layers.length ? ` [${t.layers.join(', ')}]` : ' [framework-agnostic]';
177
+ console.log(` ${marker} ${t.name}@${t.version}${layer}`);
178
+ }
179
+ if (active.size)
180
+ console.log(`\n * = active`);
181
+ }
182
+ /** Enumerate package directories under node_modules, descending into a single
183
+ * level of scopes (`@scope/name`). */
184
+ function listPackageDirs(modulesDir) {
185
+ if (!existsSync(modulesDir))
186
+ return [];
187
+ const out = [];
188
+ const isDir = (e) => e.isDirectory() || e.isSymbolicLink();
189
+ for (const entry of readdirSync(modulesDir, { withFileTypes: true })) {
190
+ if (!isDir(entry))
191
+ continue;
192
+ if (entry.name.startsWith('@')) {
193
+ for (const sub of readdirSync(resolve(modulesDir, entry.name), { withFileTypes: true })) {
194
+ if (isDir(sub))
195
+ out.push(`${entry.name}/${sub.name}`);
196
+ }
164
197
  }
165
- else {
166
- console.log(` Status: Not found in node_modules`);
198
+ else if (!entry.name.startsWith('.')) {
199
+ out.push(entry.name);
167
200
  }
168
201
  }
169
- catch {
170
- // Best-effort info display
171
- }
202
+ return out;
172
203
  }
173
- /** Read the theme package name from a raw config, preferring the modern
174
- * `site.theme` / `sites[only].theme` over the legacy flat top-level `theme`
175
- * field. Accepts both the string shorthand and the new object form
176
- * (`{ package, presets, ... }`). */
177
- function readThemeFromConfig(raw) {
178
- const value = raw.site?.theme
179
- ?? (raw.sites && Object.entries(raw.sites).length === 1
180
- ? Object.entries(raw.sites)[0][1].theme
181
- : undefined)
182
- ?? raw.theme;
204
+ /** Read the theme package name configured for a given site key. */
205
+ function readThemeForSite(raw, key) {
206
+ const site = key === 'default' && raw.site ? raw.site : raw.sites?.[key];
207
+ const value = site?.theme ?? raw.theme;
183
208
  if (value === undefined)
184
209
  return undefined;
185
210
  return typeof value === 'string' ? value : value.package;
186
211
  }
187
- /** Mutate the raw config to set the theme package on whichever shape it was
188
- * authored in. If the existing theme was the new object form, preserves
189
- * `presets`, `tokens`, `modes`, and `colorScheme` and only swaps `package`.
190
- * Returns the previous package name. */
191
- function writeThemeIntoConfig(raw, pluginName) {
192
- const swap = (current) => {
193
- if (current === undefined || typeof current === 'string') {
194
- return { previous: typeof current === 'string' ? current : undefined, next: pluginName };
195
- }
196
- return { previous: current.package, next: { ...current, package: pluginName } };
197
- };
198
- if (raw.site) {
199
- const { previous, next } = swap(raw.site.theme);
200
- raw.site.theme = next;
201
- return previous;
202
- }
203
- if (raw.sites) {
204
- const entries = Object.entries(raw.sites);
205
- if (entries.length === 1) {
206
- const [, site] = entries[0];
207
- const { previous, next } = swap(site.theme);
208
- site.theme = next;
209
- return previous;
210
- }
211
- }
212
- const { previous, next } = swap(raw.theme);
213
- raw.theme = next;
214
- return previous;
215
- }
216
212
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/commands/theme.ts"],"names":[],"mappings":"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,CAAC,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;gBACzF,IAAI,KAAK,CAAC,GAAG,CAAC;oBAAE,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;YACvD,CAAC;QACF,CAAC;aAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC;AAED,mEAAmE;AACnE,SAAS,gBAAgB,CAAC,GAA8C,EAAE,GAAW;IACpF,MAAM,IAAI,GAAG,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IACzE,MAAM,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC;IACvC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;AAC1D,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@refrakt-md/cli",
3
3
  "description": "CLI tools for refrakt.md",
4
- "version": "0.24.5",
4
+ "version": "0.25.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -36,11 +36,11 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@markdoc/markdoc": "0.4.0",
39
- "@refrakt-md/ai": "0.24.5",
40
- "@refrakt-md/editor": "0.24.5",
41
- "@refrakt-md/html": "0.24.5",
42
- "@refrakt-md/runes": "0.24.5",
43
- "@refrakt-md/transform": "0.24.5",
39
+ "@refrakt-md/ai": "0.25.0",
40
+ "@refrakt-md/editor": "0.25.0",
41
+ "@refrakt-md/html": "0.25.0",
42
+ "@refrakt-md/runes": "0.25.0",
43
+ "@refrakt-md/transform": "0.25.0",
44
44
  "esbuild": "^0.27.5",
45
45
  "postcss": "^8.4.0"
46
46
  }