@santi020k/lumen 0.2.0 → 0.4.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/README.md +36 -0
- package/dist/cli.js +52 -0
- package/dist/consumer-rollout.d.ts +52 -0
- package/dist/consumer-rollout.d.ts.map +1 -0
- package/dist/consumer-rollout.js +397 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/registry-data.d.ts +46 -0
- package/dist/registry-data.d.ts.map +1 -1
- package/dist/registry-data.js +105 -0
- package/package.json +4 -2
- package/styles.css +659 -24
package/README.md
CHANGED
|
@@ -15,6 +15,18 @@ umbrella package only when you want the framework-neutral CLI or registry APIs:
|
|
|
15
15
|
pnpm add @santi020k/lumen
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
## Typography
|
|
19
|
+
|
|
20
|
+
Lumen defaults `--ui-font` to the canonical Santi020k Montserrat family stack:
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
--ui-font: "Montserrat", "Avenir Next", "Segoe UI", sans-serif;
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The package declares the family but does not bundle or load font files. Applications should load
|
|
27
|
+
Montserrat once through their preferred delivery path, or override `--ui-font` when using another
|
|
28
|
+
typeface.
|
|
29
|
+
|
|
18
30
|
The umbrella package also exposes typed registry metadata and the `lumen` CLI:
|
|
19
31
|
|
|
20
32
|
```bash
|
|
@@ -36,3 +48,27 @@ and Elements targets.
|
|
|
36
48
|
Run `lumen audit-tokens [path]` before incremental adoption when an existing stylesheet may already
|
|
37
49
|
declare names such as `--surface`, `--ink`, or `--line`. The audit reports complete CSS colors that
|
|
38
50
|
are incompatible with Lumen's HSL-channel token format and exits non-zero when it finds conflicts.
|
|
51
|
+
|
|
52
|
+
## Coordinated consumer rollout
|
|
53
|
+
|
|
54
|
+
Inventory one or more pnpm consumers before a release:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
lumen rollout 0.2.0 ../site ../dashboard --exclude ../legacy
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The report separates manifest, workspace-catalog, and lockfile references; identifies each
|
|
61
|
+
framework; checks the declared pnpm and Node contracts; and reports the complete resolved Lumen
|
|
62
|
+
package graph. Add `--report ./lumen-rollout.json` for a durable JSON record.
|
|
63
|
+
|
|
64
|
+
After committing an intentional baseline in each consumer, apply the upgrade serially:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
lumen rollout 0.2.0 ../site ../dashboard --apply --report ./lumen-rollout.json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The command preserves `catalog:` indirection and pinned/caret range style, temporarily admits the
|
|
71
|
+
new release through `minimumReleaseAgeExclude`, runs installs through Corepack from each consumer
|
|
72
|
+
root, removes obsolete Lumen release-age exceptions, verifies the unified resolved version, and
|
|
73
|
+
runs available framework checks, builds, and browser scripts. It refuses dirty repositories,
|
|
74
|
+
missing exact pnpm declarations, and unsupported Node runtimes unless `--allow-dirty` is explicit.
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readdir, readFile, stat } from 'node:fs/promises';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
|
+
import { consumerRolloutSucceeded, formatConsumerRollout, runConsumerRollout } from './consumer-rollout.js';
|
|
3
4
|
import { addLumenRegistryItem, getLumenRegistryEntries, getLumenRegistryItem, loadLumenRegistry, lumenRegistry } from './registry.js';
|
|
4
5
|
import { auditLumenTokenCss } from './token-audit.js';
|
|
5
6
|
const args = process.argv.slice(2);
|
|
@@ -17,7 +18,36 @@ const registryToken = registryTokenIndex >= 0 ? args[registryTokenIndex + 1] : p
|
|
|
17
18
|
const targetIndex = args.indexOf('--target');
|
|
18
19
|
const targetProvided = targetIndex >= 0;
|
|
19
20
|
const targetValue = targetIndex >= 0 ? args[targetIndex + 1] : undefined;
|
|
21
|
+
const applyRollout = args.includes('--apply');
|
|
22
|
+
const allowDirty = args.includes('--allow-dirty');
|
|
23
|
+
const noVerify = args.includes('--no-verify');
|
|
24
|
+
const reportIndex = args.indexOf('--report');
|
|
25
|
+
const reportPath = reportIndex >= 0 ? args[reportIndex + 1] : undefined;
|
|
26
|
+
const excludeValues = args.flatMap((value, index) => {
|
|
27
|
+
const nextValue = args[index + 1];
|
|
28
|
+
return value === '--exclude' && nextValue ? [nextValue] : [];
|
|
29
|
+
});
|
|
20
30
|
let conflict = 'skip';
|
|
31
|
+
const getRolloutArguments = () => {
|
|
32
|
+
const values = [];
|
|
33
|
+
const optionsWithValues = new Set(['--exclude', '--report']);
|
|
34
|
+
for (let index = 1; index < args.length; index += 1) {
|
|
35
|
+
const value = args[index];
|
|
36
|
+
if (!value)
|
|
37
|
+
continue;
|
|
38
|
+
if (optionsWithValues.has(value)) {
|
|
39
|
+
index += 1;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (!value.startsWith('--'))
|
|
43
|
+
values.push(value);
|
|
44
|
+
}
|
|
45
|
+
const [targetVersion, ...repositories] = values;
|
|
46
|
+
return {
|
|
47
|
+
repositories: repositories.length ? repositories : [process.cwd()],
|
|
48
|
+
...(targetVersion ? { targetVersion } : {})
|
|
49
|
+
};
|
|
50
|
+
};
|
|
21
51
|
const getAddTarget = (value, provided = false) => {
|
|
22
52
|
if (provided && !value) {
|
|
23
53
|
throw new Error('Missing Lumen add target. Use astro, react, or elements.');
|
|
@@ -123,6 +153,7 @@ const help = [
|
|
|
123
153
|
' lumen add <name> Install a recipe or component into the current project',
|
|
124
154
|
' lumen install Print install commands',
|
|
125
155
|
' lumen audit-tokens Report incompatible semantic color custom properties',
|
|
156
|
+
' lumen rollout [version] [repositories...] Inventory or upgrade pnpm consumers',
|
|
126
157
|
'',
|
|
127
158
|
'Options:',
|
|
128
159
|
' --cwd <path> Target directory for lumen add',
|
|
@@ -133,6 +164,11 @@ const help = [
|
|
|
133
164
|
' --registry <source> Load list/show data from a local or remote registry JSON file',
|
|
134
165
|
' --registry-token <key> Use a bearer token for private remote registries',
|
|
135
166
|
' --target <framework> Generate wrappers or recipe starters for astro, react, or elements',
|
|
167
|
+
' --apply Apply a rollout (requires a target version)',
|
|
168
|
+
' --allow-dirty Allow rollout after recording an uncommitted baseline',
|
|
169
|
+
' --exclude <path> Exclude a repository (repeatable)',
|
|
170
|
+
' --no-verify Skip downstream check, typecheck, build, and browser scripts',
|
|
171
|
+
' --report <path> Write the machine-readable rollout report as JSON',
|
|
136
172
|
''
|
|
137
173
|
].join('\n');
|
|
138
174
|
// eslint-disable-next-line complexity -- Command dispatch keeps CLI exit behavior and output in one place.
|
|
@@ -159,6 +195,22 @@ const run = async () => {
|
|
|
159
195
|
output = formatList(registry);
|
|
160
196
|
break;
|
|
161
197
|
}
|
|
198
|
+
case 'rollout': {
|
|
199
|
+
const rollout = getRolloutArguments();
|
|
200
|
+
const report = await runConsumerRollout({
|
|
201
|
+
allowDirty,
|
|
202
|
+
apply: applyRollout,
|
|
203
|
+
exclude: excludeValues,
|
|
204
|
+
...(reportPath ? { report: reportPath } : {}),
|
|
205
|
+
repositories: rollout.repositories,
|
|
206
|
+
...(rollout.targetVersion ? { targetVersion: rollout.targetVersion } : {}),
|
|
207
|
+
verify: !noVerify
|
|
208
|
+
});
|
|
209
|
+
output = formatConsumerRollout(report);
|
|
210
|
+
if (!consumerRolloutSucceeded(report))
|
|
211
|
+
process.exitCode = 1;
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
162
214
|
case 'show': {
|
|
163
215
|
if (name)
|
|
164
216
|
output = formatItem(name, registry);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type LumenFramework = 'astro' | 'elements' | 'react';
|
|
2
|
+
export interface ConsumerReference {
|
|
3
|
+
file: string;
|
|
4
|
+
packageName: string;
|
|
5
|
+
source: 'catalog' | 'manifest' | 'lockfile';
|
|
6
|
+
version: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ConsumerInventory {
|
|
9
|
+
branch: string | undefined;
|
|
10
|
+
currentCommit: string | undefined;
|
|
11
|
+
dirty: boolean;
|
|
12
|
+
frameworks: LumenFramework[];
|
|
13
|
+
nodeEngine: string | undefined;
|
|
14
|
+
nodeEngineSatisfied: boolean | undefined;
|
|
15
|
+
packageManager: string | undefined;
|
|
16
|
+
references: ConsumerReference[];
|
|
17
|
+
repository: string;
|
|
18
|
+
resolvedVersions: Record<string, string[]>;
|
|
19
|
+
targetVersion?: string;
|
|
20
|
+
valid: boolean;
|
|
21
|
+
warnings: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface ConsumerRolloutOptions {
|
|
24
|
+
allowDirty?: boolean;
|
|
25
|
+
apply?: boolean;
|
|
26
|
+
exclude?: string[];
|
|
27
|
+
report?: string;
|
|
28
|
+
repositories: string[];
|
|
29
|
+
targetVersion?: string;
|
|
30
|
+
verify?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface ConsumerRolloutReport {
|
|
33
|
+
generatedAt: string;
|
|
34
|
+
mode: 'apply' | 'inventory';
|
|
35
|
+
repositories: (ConsumerInventory & {
|
|
36
|
+
commands: {
|
|
37
|
+
command: string;
|
|
38
|
+
ok: boolean;
|
|
39
|
+
output: string;
|
|
40
|
+
}[];
|
|
41
|
+
})[];
|
|
42
|
+
targetVersion?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const consumerRolloutSucceeded: (report: ConsumerRolloutReport) => boolean;
|
|
45
|
+
export declare const satisfiesNodeEngine: (engine: string | undefined, currentVersion?: string) => boolean | undefined;
|
|
46
|
+
export declare const inspectLumenConsumer: (repository: string, targetVersion?: string) => Promise<ConsumerInventory>;
|
|
47
|
+
export declare const updateLumenManifestSource: (source: string, targetVersion: string) => string;
|
|
48
|
+
export declare const updateLumenWorkspaceSource: (source: string, targetVersion: string) => string;
|
|
49
|
+
export declare const addReleaseAgeTarget: (source: string, packages: string[], version: string) => string;
|
|
50
|
+
export declare const runConsumerRollout: (options: ConsumerRolloutOptions) => Promise<ConsumerRolloutReport>;
|
|
51
|
+
export declare const formatConsumerRollout: (report: ConsumerRolloutReport) => string;
|
|
52
|
+
//# sourceMappingURL=consumer-rollout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumer-rollout.d.ts","sourceRoot":"","sources":["../src/consumer-rollout.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAA;AAE3D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IAC3C,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,mBAAmB,EAAE,OAAO,GAAG,SAAS,CAAA;IACxC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,UAAU,EAAE,iBAAiB,EAAE,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,aAAa,CA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ative, resolve } from 'node:path';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
5
|
+
import { satisfies } from 'semver';
|
|
6
|
+
/* eslint-disable complexity -- Consumer inventory, semver checks, mutation, and verification intentionally evaluate full repository contracts. */
|
|
7
|
+
const execFileAsync = promisify(execFile);
|
|
8
|
+
const lumenPackagePattern = /^@santi020k\/lumen(?:-(?:astro|core|elements|mcp|react))?$/;
|
|
9
|
+
const dependencyFields = [
|
|
10
|
+
'dependencies',
|
|
11
|
+
'devDependencies',
|
|
12
|
+
'optionalDependencies',
|
|
13
|
+
'peerDependencies'
|
|
14
|
+
];
|
|
15
|
+
export const consumerRolloutSucceeded = (report) => report.repositories.every(repository => repository.valid && repository.commands.every(command => command.ok));
|
|
16
|
+
const isLumenPackage = (name) => lumenPackagePattern.test(name);
|
|
17
|
+
const pathExists = async (path) => {
|
|
18
|
+
try {
|
|
19
|
+
await stat(path);
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const findPackageManifests = async (root) => {
|
|
27
|
+
const results = [];
|
|
28
|
+
const visit = async (directory) => {
|
|
29
|
+
const entries = await readdir(directory, { withFileTypes: true });
|
|
30
|
+
for (const entry of entries) {
|
|
31
|
+
if (entry.name === 'node_modules' || entry.name === '.git' || entry.name.startsWith('.turbo'))
|
|
32
|
+
continue;
|
|
33
|
+
const path = join(directory, entry.name);
|
|
34
|
+
if (entry.isDirectory()) {
|
|
35
|
+
await visit(path);
|
|
36
|
+
}
|
|
37
|
+
else if (entry.name === 'package.json') {
|
|
38
|
+
results.push(path);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
await visit(root);
|
|
43
|
+
return results;
|
|
44
|
+
};
|
|
45
|
+
const readManifest = async (path) => JSON.parse(await readFile(path, 'utf8'));
|
|
46
|
+
const readGitValue = async (root, args) => {
|
|
47
|
+
try {
|
|
48
|
+
const { stdout } = await execFileAsync('git', ['-C', root, ...args]);
|
|
49
|
+
return stdout.trim() || undefined;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export const satisfiesNodeEngine = (engine, currentVersion = process.versions.node) => {
|
|
56
|
+
if (!engine)
|
|
57
|
+
return undefined;
|
|
58
|
+
return satisfies(currentVersion, engine);
|
|
59
|
+
};
|
|
60
|
+
const collectManifestReferences = (manifest, file, root) => dependencyFields.flatMap(field => Object.entries(manifest[field] ?? {})
|
|
61
|
+
.filter(([packageName]) => isLumenPackage(packageName))
|
|
62
|
+
.map(([packageName, version]) => ({
|
|
63
|
+
file: relative(root, file),
|
|
64
|
+
packageName,
|
|
65
|
+
source: 'manifest',
|
|
66
|
+
version
|
|
67
|
+
})));
|
|
68
|
+
const collectYamlReferences = (source, file) => {
|
|
69
|
+
const references = [];
|
|
70
|
+
for (const line of source.split(/\r?\n/)) {
|
|
71
|
+
const match = /^\s*['"]?(@santi020k\/lumen(?:-(?:astro|core|elements|mcp|react))?)['"]?\s*:\s*['"]?([^'"\s#]+)['"]?/.exec(line);
|
|
72
|
+
if (match?.[1] && match[2]) {
|
|
73
|
+
references.push({ file, packageName: match[1], source: 'catalog', version: match[2] });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return references;
|
|
77
|
+
};
|
|
78
|
+
const collectLockReferences = (source) => {
|
|
79
|
+
const references = [];
|
|
80
|
+
const pattern = /@santi020k\/(lumen(?:-(?:astro|core|elements|mcp|react))?)@(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)/g;
|
|
81
|
+
for (const match of source.matchAll(pattern)) {
|
|
82
|
+
if (match[1] && match[2]) {
|
|
83
|
+
references.push({
|
|
84
|
+
file: 'pnpm-lock.yaml',
|
|
85
|
+
packageName: `@santi020k/${match[1]}`,
|
|
86
|
+
source: 'lockfile',
|
|
87
|
+
version: match[2]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return references;
|
|
92
|
+
};
|
|
93
|
+
const getResolvedVersions = (references) => {
|
|
94
|
+
const graph = {};
|
|
95
|
+
for (const reference of references.filter(item => item.source === 'lockfile')) {
|
|
96
|
+
graph[reference.packageName] ??= new Set();
|
|
97
|
+
graph[reference.packageName]?.add(reference.version);
|
|
98
|
+
}
|
|
99
|
+
return Object.fromEntries(Object.entries(graph).map(([name, versions]) => [name, [...versions].sort()]));
|
|
100
|
+
};
|
|
101
|
+
export const inspectLumenConsumer = async (repository, targetVersion) => {
|
|
102
|
+
const root = resolve(repository);
|
|
103
|
+
const rootManifestPath = join(root, 'package.json');
|
|
104
|
+
if (!await pathExists(rootManifestPath)) {
|
|
105
|
+
throw new Error(`No package.json found at consumer root: ${root}`);
|
|
106
|
+
}
|
|
107
|
+
const manifestPaths = await findPackageManifests(root);
|
|
108
|
+
const manifests = await Promise.all(manifestPaths.map(async (file) => ({
|
|
109
|
+
file,
|
|
110
|
+
manifest: await readManifest(file)
|
|
111
|
+
})));
|
|
112
|
+
const rootManifest = await readManifest(rootManifestPath);
|
|
113
|
+
const references = manifests.flatMap(({ file, manifest }) => collectManifestReferences(manifest, file, root));
|
|
114
|
+
const workspacePath = join(root, 'pnpm-workspace.yaml');
|
|
115
|
+
const lockPath = join(root, 'pnpm-lock.yaml');
|
|
116
|
+
if (await pathExists(workspacePath)) {
|
|
117
|
+
references.push(...collectYamlReferences(await readFile(workspacePath, 'utf8'), 'pnpm-workspace.yaml'));
|
|
118
|
+
}
|
|
119
|
+
if (await pathExists(lockPath)) {
|
|
120
|
+
references.push(...collectLockReferences(await readFile(lockPath, 'utf8')));
|
|
121
|
+
}
|
|
122
|
+
const resolvedVersions = getResolvedVersions(references);
|
|
123
|
+
const frameworks = ([
|
|
124
|
+
references.some(item => item.packageName === '@santi020k/lumen-astro') && 'astro',
|
|
125
|
+
references.some(item => item.packageName === '@santi020k/lumen-elements') && 'elements',
|
|
126
|
+
references.some(item => item.packageName === '@santi020k/lumen-react') && 'react'
|
|
127
|
+
].filter(Boolean));
|
|
128
|
+
const warnings = [];
|
|
129
|
+
const nodeEngineSatisfied = satisfiesNodeEngine(rootManifest.engines?.node);
|
|
130
|
+
const status = await readGitValue(root, ['status', '--porcelain']);
|
|
131
|
+
const dirty = Boolean(status);
|
|
132
|
+
if (!/^pnpm@\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(rootManifest.packageManager ?? '')) {
|
|
133
|
+
warnings.push('Missing an exact pnpm packageManager declaration.');
|
|
134
|
+
}
|
|
135
|
+
if (nodeEngineSatisfied === false) {
|
|
136
|
+
warnings.push(`Current Node ${process.versions.node} does not satisfy ${rootManifest.engines?.node ?? 'the declared engine'}.`);
|
|
137
|
+
}
|
|
138
|
+
if (dirty) {
|
|
139
|
+
warnings.push('Repository has uncommitted changes; create an intentional baseline or use --allow-dirty.');
|
|
140
|
+
}
|
|
141
|
+
if (targetVersion) {
|
|
142
|
+
for (const reference of references.filter(item => item.source !== 'lockfile')) {
|
|
143
|
+
const declaredVersion = reference.version.replace(/^[~^]/, '');
|
|
144
|
+
if (reference.version !== 'catalog:' &&
|
|
145
|
+
!reference.version.startsWith('workspace:') &&
|
|
146
|
+
declaredVersion !== targetVersion) {
|
|
147
|
+
warnings.push(`${reference.packageName} declares ${reference.version} in ${reference.file} instead of ${targetVersion}.`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
for (const [packageName, versions] of Object.entries(resolvedVersions)) {
|
|
151
|
+
if (versions.some(version => version !== targetVersion)) {
|
|
152
|
+
warnings.push(`${packageName} resolves ${versions.join(', ')} instead of only ${targetVersion}.`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
branch: await readGitValue(root, ['branch', '--show-current']),
|
|
158
|
+
currentCommit: await readGitValue(root, ['rev-parse', 'HEAD']),
|
|
159
|
+
dirty,
|
|
160
|
+
frameworks,
|
|
161
|
+
nodeEngine: rootManifest.engines?.node,
|
|
162
|
+
nodeEngineSatisfied,
|
|
163
|
+
packageManager: rootManifest.packageManager,
|
|
164
|
+
references,
|
|
165
|
+
repository: root,
|
|
166
|
+
resolvedVersions,
|
|
167
|
+
...(targetVersion ? { targetVersion } : {}),
|
|
168
|
+
valid: warnings.length === 0,
|
|
169
|
+
warnings
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
const replaceRange = (range, targetVersion) => {
|
|
173
|
+
if (range === 'catalog:' || range.startsWith('workspace:') || range.startsWith('file:'))
|
|
174
|
+
return range;
|
|
175
|
+
const prefix = range.startsWith('^') || range.startsWith('~') ? (range.at(0) ?? '') : '';
|
|
176
|
+
return `${prefix}${targetVersion}`;
|
|
177
|
+
};
|
|
178
|
+
export const updateLumenManifestSource = (source, targetVersion) => {
|
|
179
|
+
const manifest = JSON.parse(source);
|
|
180
|
+
for (const field of dependencyFields) {
|
|
181
|
+
const dependencies = manifest[field];
|
|
182
|
+
for (const [name, range] of Object.entries(dependencies ?? {})) {
|
|
183
|
+
if (isLumenPackage(name) && dependencies)
|
|
184
|
+
dependencies[name] = replaceRange(range, targetVersion);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return `${JSON.stringify(manifest, undefined, 2)}\n`;
|
|
188
|
+
};
|
|
189
|
+
export const updateLumenWorkspaceSource = (source, targetVersion) => source.replaceAll(/^(\s*['"]?@santi020k\/lumen(?:-(?:astro|core|elements|mcp|react))?['"]?\s*:\s*['"]?)([~^]?)(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)(['"]?\s*(?:#.*)?)$/gm, (_match, before, prefix, _version, after) => `${before}${prefix}${targetVersion}${after}`);
|
|
190
|
+
const getVerificationScripts = (manifest, frameworks) => {
|
|
191
|
+
const scripts = manifest.scripts ?? {};
|
|
192
|
+
const preferred = [
|
|
193
|
+
frameworks.includes('astro') && 'check',
|
|
194
|
+
(frameworks.includes('react') || frameworks.includes('elements')) && 'typecheck',
|
|
195
|
+
'build',
|
|
196
|
+
scripts['test:browser'] && 'test:browser',
|
|
197
|
+
scripts['test:e2e'] && 'test:e2e'
|
|
198
|
+
].filter((script) => Boolean(script && scripts[script]));
|
|
199
|
+
return [...new Set(preferred)];
|
|
200
|
+
};
|
|
201
|
+
const runCommand = async (root, executable, args) => {
|
|
202
|
+
const command = [executable, ...args].join(' ');
|
|
203
|
+
try {
|
|
204
|
+
const { stderr, stdout } = await execFileAsync(executable, args, {
|
|
205
|
+
cwd: root,
|
|
206
|
+
maxBuffer: 10 * 1024 * 1024
|
|
207
|
+
});
|
|
208
|
+
return { command, ok: true, output: `${stdout}${stderr}`.trim() };
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
const detail = error;
|
|
212
|
+
return {
|
|
213
|
+
command,
|
|
214
|
+
ok: false,
|
|
215
|
+
output: `${detail.stdout ?? ''}${detail.stderr ?? ''}`.trim() || detail.message || 'Command failed.'
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
const parseFlowSequence = (source) => {
|
|
220
|
+
const match = /^\[([\s\S]*)\]\s*(?:#.*)?$/.exec(source.trim());
|
|
221
|
+
if (!match)
|
|
222
|
+
return undefined;
|
|
223
|
+
const values = [];
|
|
224
|
+
let current = '';
|
|
225
|
+
let quote;
|
|
226
|
+
for (const character of match[1] ?? '') {
|
|
227
|
+
if (quote) {
|
|
228
|
+
current += character;
|
|
229
|
+
if (character === quote)
|
|
230
|
+
quote = undefined;
|
|
231
|
+
}
|
|
232
|
+
else if (character === '"' || character === "'") {
|
|
233
|
+
current += character;
|
|
234
|
+
quote = character;
|
|
235
|
+
}
|
|
236
|
+
else if (character === ',') {
|
|
237
|
+
values.push(current);
|
|
238
|
+
current = '';
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
current += character;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (current.trim())
|
|
245
|
+
values.push(current);
|
|
246
|
+
return values.map(value => {
|
|
247
|
+
const trimmed = value.trim();
|
|
248
|
+
if ((trimmed.startsWith('"') && trimmed.endsWith('"')) ||
|
|
249
|
+
(trimmed.startsWith("'") && trimmed.endsWith("'"))) {
|
|
250
|
+
return trimmed.slice(1, -1);
|
|
251
|
+
}
|
|
252
|
+
return trimmed;
|
|
253
|
+
}).filter(Boolean);
|
|
254
|
+
};
|
|
255
|
+
export const addReleaseAgeTarget = (source, packages, version) => {
|
|
256
|
+
if (!/^\s*minimumReleaseAgeExclude\s*:/m.test(source))
|
|
257
|
+
return source;
|
|
258
|
+
const lines = source.split(/\r?\n/);
|
|
259
|
+
const index = lines.findIndex(line => /^\s*minimumReleaseAgeExclude\s*:/.test(line));
|
|
260
|
+
const declaration = lines[index] ?? '';
|
|
261
|
+
const rootIndent = /^\s*/.exec(declaration)?.[0] ?? '';
|
|
262
|
+
const indent = `${rootIndent} `;
|
|
263
|
+
const declarationValue = declaration.slice(declaration.indexOf(':') + 1);
|
|
264
|
+
const inlineValues = parseFlowSequence(declarationValue);
|
|
265
|
+
if (declarationValue.trim() && !inlineValues)
|
|
266
|
+
return source;
|
|
267
|
+
const existing = new Set([
|
|
268
|
+
...(inlineValues ?? []),
|
|
269
|
+
...lines.flatMap(line => {
|
|
270
|
+
const value = /^\s*-\s*['"]?([^'"]+)['"]?\s*$/.exec(line)?.[1];
|
|
271
|
+
return value ? [value] : [];
|
|
272
|
+
})
|
|
273
|
+
]);
|
|
274
|
+
const additions = packages
|
|
275
|
+
.map(packageName => `${packageName}@${version}`)
|
|
276
|
+
.filter(value => !existing.has(value))
|
|
277
|
+
.map(value => `${indent}- "${value}"`);
|
|
278
|
+
if (declaration.slice(declaration.indexOf(':') + 1).trim()) {
|
|
279
|
+
lines[index] = `${rootIndent}minimumReleaseAgeExclude:`;
|
|
280
|
+
additions.unshift(...(inlineValues ?? []).map(value => `${indent}- "${value}"`));
|
|
281
|
+
}
|
|
282
|
+
lines.splice(index + 1, 0, ...additions);
|
|
283
|
+
return lines.join('\n');
|
|
284
|
+
};
|
|
285
|
+
const removeObsoleteReleaseAgeEntries = (source, targetVersion) => source.split(/\r?\n/)
|
|
286
|
+
.filter(line => {
|
|
287
|
+
const match = /^\s*-\s*['"]?(@santi020k\/lumen(?:-(?:astro|core|elements|mcp|react))?)@([^'"]+)['"]?\s*$/.exec(line);
|
|
288
|
+
return !match || match[2] === targetVersion;
|
|
289
|
+
})
|
|
290
|
+
.join('\n');
|
|
291
|
+
const upgradeConsumer = async (inventory, targetVersion, allowDirty, verify) => {
|
|
292
|
+
if (inventory.dirty && !allowDirty) {
|
|
293
|
+
throw new Error(`${inventory.repository} is dirty. Commit a baseline or pass --allow-dirty.`);
|
|
294
|
+
}
|
|
295
|
+
if (!/^pnpm@\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(inventory.packageManager ?? '')) {
|
|
296
|
+
throw new Error(`${inventory.repository} must declare an exact pnpm packageManager version.`);
|
|
297
|
+
}
|
|
298
|
+
if (inventory.nodeEngineSatisfied === false) {
|
|
299
|
+
throw new Error(`${inventory.repository} must be upgraded under Node ${inventory.nodeEngine ?? 'matching its engine declaration'}.`);
|
|
300
|
+
}
|
|
301
|
+
const manifestPaths = await findPackageManifests(inventory.repository);
|
|
302
|
+
const desiredManifests = new Map();
|
|
303
|
+
for (const path of manifestPaths) {
|
|
304
|
+
const source = await readFile(path, 'utf8');
|
|
305
|
+
const updated = updateLumenManifestSource(source, targetVersion);
|
|
306
|
+
desiredManifests.set(path, updated);
|
|
307
|
+
if (updated !== source)
|
|
308
|
+
await writeFile(path, updated);
|
|
309
|
+
}
|
|
310
|
+
const workspacePath = join(inventory.repository, 'pnpm-workspace.yaml');
|
|
311
|
+
if (await pathExists(workspacePath)) {
|
|
312
|
+
const source = await readFile(workspacePath, 'utf8');
|
|
313
|
+
const packages = [...new Set(inventory.references.map(item => item.packageName))];
|
|
314
|
+
const updated = addReleaseAgeTarget(updateLumenWorkspaceSource(source, targetVersion), packages, targetVersion);
|
|
315
|
+
if (updated !== source)
|
|
316
|
+
await writeFile(workspacePath, updated);
|
|
317
|
+
}
|
|
318
|
+
const packageNames = [...new Set(inventory.references.map(item => item.packageName))];
|
|
319
|
+
const commands = [await runCommand(inventory.repository, 'corepack', [
|
|
320
|
+
'pnpm',
|
|
321
|
+
'update',
|
|
322
|
+
'--recursive',
|
|
323
|
+
...packageNames.map(packageName => `${packageName}@${targetVersion}`)
|
|
324
|
+
])];
|
|
325
|
+
if (!commands[0]?.ok)
|
|
326
|
+
return commands;
|
|
327
|
+
for (const [path, source] of desiredManifests) {
|
|
328
|
+
await writeFile(path, source);
|
|
329
|
+
}
|
|
330
|
+
commands.push(await runCommand(inventory.repository, 'corepack', ['pnpm', 'install']));
|
|
331
|
+
if (!commands.at(-1)?.ok)
|
|
332
|
+
return commands;
|
|
333
|
+
if (await pathExists(workspacePath)) {
|
|
334
|
+
const source = await readFile(workspacePath, 'utf8');
|
|
335
|
+
const updated = removeObsoleteReleaseAgeEntries(source, targetVersion);
|
|
336
|
+
if (updated !== source) {
|
|
337
|
+
await writeFile(workspacePath, updated);
|
|
338
|
+
commands.push(await runCommand(inventory.repository, 'corepack', ['pnpm', 'install']));
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
if (verify && commands.every(command => command.ok)) {
|
|
342
|
+
const manifest = await readManifest(join(inventory.repository, 'package.json'));
|
|
343
|
+
for (const script of getVerificationScripts(manifest, inventory.frameworks)) {
|
|
344
|
+
const result = await runCommand(inventory.repository, 'corepack', ['pnpm', 'run', script]);
|
|
345
|
+
commands.push(result);
|
|
346
|
+
if (!result.ok)
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return commands;
|
|
351
|
+
};
|
|
352
|
+
export const runConsumerRollout = async (options) => {
|
|
353
|
+
if (options.apply && !options.targetVersion) {
|
|
354
|
+
throw new Error('A target version is required when applying a consumer rollout.');
|
|
355
|
+
}
|
|
356
|
+
const excluded = new Set((options.exclude ?? []).map(path => resolve(path)));
|
|
357
|
+
const repositories = options.repositories.map(path => resolve(path))
|
|
358
|
+
.filter(path => !excluded.has(path));
|
|
359
|
+
const report = {
|
|
360
|
+
generatedAt: new Date().toISOString(),
|
|
361
|
+
mode: options.apply ? 'apply' : 'inventory',
|
|
362
|
+
repositories: [],
|
|
363
|
+
...(options.targetVersion ? { targetVersion: options.targetVersion } : {})
|
|
364
|
+
};
|
|
365
|
+
for (const repository of repositories) {
|
|
366
|
+
const before = await inspectLumenConsumer(repository, options.targetVersion);
|
|
367
|
+
const commands = options.apply
|
|
368
|
+
? await upgradeConsumer(before, options.targetVersion ?? '', options.allowDirty ?? false, options.verify ?? true)
|
|
369
|
+
: [];
|
|
370
|
+
const after = options.apply
|
|
371
|
+
? await inspectLumenConsumer(repository, options.targetVersion)
|
|
372
|
+
: before;
|
|
373
|
+
if (options.apply) {
|
|
374
|
+
after.warnings = after.warnings.filter(warning => !warning.startsWith('Repository has uncommitted changes'));
|
|
375
|
+
after.valid = after.warnings.length === 0;
|
|
376
|
+
}
|
|
377
|
+
report.repositories.push({ ...after, commands });
|
|
378
|
+
if (commands.some(command => !command.ok))
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
if (options.report) {
|
|
382
|
+
await writeFile(resolve(options.report), `${JSON.stringify(report, undefined, 2)}\n`);
|
|
383
|
+
}
|
|
384
|
+
return report;
|
|
385
|
+
};
|
|
386
|
+
export const formatConsumerRollout = (report) => {
|
|
387
|
+
const lines = [
|
|
388
|
+
`Lumen consumer ${report.mode} (${report.repositories.length} repositories)`,
|
|
389
|
+
...(report.targetVersion ? [`Target: ${report.targetVersion}`] : [])
|
|
390
|
+
];
|
|
391
|
+
for (const repository of report.repositories) {
|
|
392
|
+
lines.push('', repository.repository, ` package manager: ${repository.packageManager ?? 'missing'}`, ` node engine: ${repository.nodeEngine ?? 'unspecified'}`, ` frameworks: ${repository.frameworks.join(', ') || 'none'}`, ` resolved graph: ${JSON.stringify(repository.resolvedVersions)}`, ` status: ${repository.valid && repository.commands.every(command => command.ok) ? 'ok' : 'attention required'}`);
|
|
393
|
+
lines.push(...repository.warnings.map(warning => ` warning: ${warning}`));
|
|
394
|
+
lines.push(...repository.commands.map(command => ` ${command.ok ? 'pass' : 'fail'}: ${command.command}`));
|
|
395
|
+
}
|
|
396
|
+
return lines.join('\n');
|
|
397
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export { type ConsumerInventory, type ConsumerReference, type ConsumerRolloutOptions, type ConsumerRolloutReport, formatConsumerRollout, inspectLumenConsumer, type LumenFramework, runConsumerRollout, updateLumenManifestSource, updateLumenWorkspaceSource } from './consumer-rollout.js';
|
|
1
2
|
export { addLumenRegistryItem, getLumenRegistryEntries, getLumenRegistryItem, loadLumenRegistry, type LumenAddOptions, type LumenAddResult, type LumenAddTarget, type LumenMergeConflict, type LumenRegistry, lumenRegistry, type LumenRegistryComponent, type LumenRegistryEntry, type LumenRegistryFile, type LumenRegistryItem, type LumenRegistryLoadOptions } from './registry.js';
|
|
2
|
-
export { applyDataViewState, canPlaceScheduleEvent, coerceThemeBuilderExportFormat, coerceThemeBuilderMode, coerceThemeBuilderScheme, composeClassName, createDataViewRequestUrl, createDataViewSearchParams, createDataViewServerRequest, createDataViewState, createDataViewStorageKey, createScheduleSlots, createScheduleStorageKey, createThemeBuilderTokens, createThemePalette, expandRecurringScheduleEvent, exportThemeBuilderCss, exportThemeBuilderValue, exportThemeCss, filterDataRecords, getContrastRatio, getScheduleConflicts, getVirtualRange, loadDataViewState, loadScheduleEvents, type LumenCodeToken, lumenCodeTokenClassNames, type LumenCodeTokenKind, lumenColors, type LumenColorTokenName, lumenColorTokenNames, type LumenComponentName, lumenComponentNames, type LumenContrastScore, lumenDarkTheme, type LumenDataRecord, type LumenDataViewServerRequest, type LumenDataViewState, lumenGlass, type LumenGlassColorTokenName, lumenGlassColorTokenNames, type LumenGlassEffectTokenName, lumenGlassEffectTokenNames, type LumenGlassTokenName, lumenGlassTokenNames, type LumenKeyValueReader, type LumenKeyValueStorage, type LumenKeyValueWriter, lumenLightTheme, lumenPackages, type LumenPackageTarget, type LumenScheduleConflict, type LumenScheduleEvent, type LumenScheduleKeyValueReader, type LumenScheduleKeyValueStorage, type LumenScheduleKeyValueWriter, type LumenScheduleResizeEdge, type LumenScheduleResizeOptions, type LumenScheduleResource, type LumenScheduleSlot, type LumenSemanticColorTokenName, lumenSemanticColorTokenNames, type LumenSortDirection, lumenThemeAttribute, type LumenThemeBuilderExportFormat, type LumenThemeBuilderMode, type LumenThemeBuilderOptions, type LumenThemeBuilderResult, type LumenThemeBuilderScheme, type LumenThemeContrastSuggestion, type LumenThemeTokens, lumenTokenNames, mergeThemeTokens, moveScheduleEvent, normalizeLumenCode, normalizeThemeBuilderHex, normalizeThemeBuilderHue, paginateDataRecords, parseDataViewState, parseScheduleEvents, parseThemeCss, pinDataViewColumn, renderLumenCodeHtml, resizeScheduleEvent, resizeScheduleEvents, saveDataViewState, saveScheduleEvents, scheduleEventsOverlap, scoreThemeContrast, serializeDataViewState, serializeScheduleEvents, sortDataRecords, suggestReadableInk, themeBuilderHexToHsl, toggleDataViewSelection, tokenizeLumenCode, tuneThemeContrast, unpinDataViewColumn } from '@santi020k/lumen-core';
|
|
3
|
+
export { alignLumenChartSeries, applyDataViewState, canPlaceScheduleEvent, coerceThemeBuilderExportFormat, coerceThemeBuilderMode, coerceThemeBuilderScheme, composeClassName, createDataViewRequestUrl, createDataViewSearchParams, createDataViewServerRequest, createDataViewState, createDataViewStorageKey, createLumenBarGeometry, createLumenLineGeometry, createLumenPieGeometry, createScheduleSlots, createScheduleStorageKey, createThemeBuilderTokens, createThemePalette, expandRecurringScheduleEvent, exportThemeBuilderCss, exportThemeBuilderValue, exportThemeCss, filterDataRecords, getContrastRatio, getLumenChartCategories, getLumenChartDomain, getLumenChartTicks, getLumenChartValueRatio, getScheduleConflicts, getVirtualRange, hasLumenPieData, loadDataViewState, loadScheduleEvents, type LumenBarChartLayout, type LumenBarGeometry, type LumenBarGeometryCategory, type LumenBarGeometryMark, type LumenBarGeometryOptions, lumenChart, type LumenChartDatum, type LumenChartDomain, type LumenChartGeometryPoint, type LumenChartOrientation, type LumenChartSeries, type LumenChartTone, lumenChartTones, type LumenCodeToken, lumenCodeTokenClassNames, type LumenCodeTokenKind, lumenColors, type LumenColorTokenName, lumenColorTokenNames, type LumenComponentName, lumenComponentNames, type LumenContrastScore, lumenDarkTheme, type LumenDataRecord, type LumenDataViewServerRequest, type LumenDataViewState, lumenGlass, type LumenGlassColorTokenName, lumenGlassColorTokenNames, type LumenGlassEffectTokenName, lumenGlassEffectTokenNames, type LumenGlassTokenName, lumenGlassTokenNames, type LumenKeyValueReader, type LumenKeyValueStorage, type LumenKeyValueWriter, lumenLightTheme, type LumenLineGeometry, type LumenLineGeometryOptions, lumenPackages, type LumenPackageTarget, type LumenPieChartVariant, type LumenPieGeometry, type LumenPieGeometryOptions, type LumenPieGeometrySlice, type LumenScheduleConflict, type LumenScheduleEvent, type LumenScheduleKeyValueReader, type LumenScheduleKeyValueStorage, type LumenScheduleKeyValueWriter, type LumenScheduleResizeEdge, type LumenScheduleResizeOptions, type LumenScheduleResource, type LumenScheduleSlot, type LumenSemanticColorTokenName, lumenSemanticColorTokenNames, type LumenSortDirection, lumenThemeAttribute, type LumenThemeBuilderExportFormat, type LumenThemeBuilderMode, type LumenThemeBuilderOptions, type LumenThemeBuilderResult, type LumenThemeBuilderScheme, type LumenThemeContrastSuggestion, type LumenThemeTokens, lumenTokenNames, mergeThemeTokens, moveScheduleEvent, normalizeLumenCode, normalizeThemeBuilderHex, normalizeThemeBuilderHue, paginateDataRecords, parseDataViewState, parseScheduleEvents, parseThemeCss, pinDataViewColumn, renderLumenCodeHtml, resizeScheduleEvent, resizeScheduleEvents, resolveLumenChartTone, saveDataViewState, saveScheduleEvents, scaleLumenChartValue, scheduleEventsOverlap, scoreThemeContrast, serializeDataViewState, serializeScheduleEvents, sortDataRecords, suggestReadableInk, themeBuilderHexToHsl, toggleDataViewSelection, tokenizeLumenCode, tuneThemeContrast, unpinDataViewColumn } from '@santi020k/lumen-core';
|
|
3
4
|
export declare const lumen: {
|
|
4
5
|
readonly name: "Lumen";
|
|
5
6
|
readonly packageName: "@santi020k/lumen";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC9B,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,8BAA8B,EAC9B,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,4BAA4B,EAC5B,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,cAAc,EACnB,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,UAAU,EACV,KAAK,wBAAwB,EAC7B,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,0BAA0B,EAC1B,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,eAAe,EACf,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,4BAA4B,EAC5B,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,gBAAgB,EACrB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAE9B,eAAO,MAAM,KAAK;;;;CAIR,CAAA;AAEV,OAAO,EACL,kBAAkB,EAClB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,iBAA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kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAE9B,eAAO,MAAM,KAAK;;;;CAIR,CAAA;AAEV,OAAO,EACL,kBAAkB,EAClB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export { formatConsumerRollout, inspectLumenConsumer, runConsumerRollout, updateLumenManifestSource, updateLumenWorkspaceSource } from './consumer-rollout.js';
|
|
1
2
|
export { addLumenRegistryItem, getLumenRegistryEntries, getLumenRegistryItem, loadLumenRegistry, lumenRegistry } from './registry.js';
|
|
2
|
-
export { applyDataViewState, canPlaceScheduleEvent, coerceThemeBuilderExportFormat, coerceThemeBuilderMode, coerceThemeBuilderScheme, composeClassName, createDataViewRequestUrl, createDataViewSearchParams, createDataViewServerRequest, createDataViewState, createDataViewStorageKey, createScheduleSlots, createScheduleStorageKey, createThemeBuilderTokens, createThemePalette, expandRecurringScheduleEvent, exportThemeBuilderCss, exportThemeBuilderValue, exportThemeCss, filterDataRecords, getContrastRatio, getScheduleConflicts, getVirtualRange, loadDataViewState, loadScheduleEvents, lumenCodeTokenClassNames, lumenColors, lumenColorTokenNames, lumenComponentNames, lumenDarkTheme, lumenGlass, lumenGlassColorTokenNames, lumenGlassEffectTokenNames, lumenGlassTokenNames, lumenLightTheme, lumenPackages, lumenSemanticColorTokenNames, lumenThemeAttribute, lumenTokenNames, mergeThemeTokens, moveScheduleEvent, normalizeLumenCode, normalizeThemeBuilderHex, normalizeThemeBuilderHue, paginateDataRecords, parseDataViewState, parseScheduleEvents, parseThemeCss, pinDataViewColumn, renderLumenCodeHtml, resizeScheduleEvent, resizeScheduleEvents, saveDataViewState, saveScheduleEvents, scheduleEventsOverlap, scoreThemeContrast, serializeDataViewState, serializeScheduleEvents, sortDataRecords, suggestReadableInk, themeBuilderHexToHsl, toggleDataViewSelection, tokenizeLumenCode, tuneThemeContrast, unpinDataViewColumn } from '@santi020k/lumen-core';
|
|
3
|
+
export { alignLumenChartSeries, applyDataViewState, canPlaceScheduleEvent, coerceThemeBuilderExportFormat, coerceThemeBuilderMode, coerceThemeBuilderScheme, composeClassName, createDataViewRequestUrl, createDataViewSearchParams, createDataViewServerRequest, createDataViewState, createDataViewStorageKey, createLumenBarGeometry, createLumenLineGeometry, createLumenPieGeometry, createScheduleSlots, createScheduleStorageKey, createThemeBuilderTokens, createThemePalette, expandRecurringScheduleEvent, exportThemeBuilderCss, exportThemeBuilderValue, exportThemeCss, filterDataRecords, getContrastRatio, getLumenChartCategories, getLumenChartDomain, getLumenChartTicks, getLumenChartValueRatio, getScheduleConflicts, getVirtualRange, hasLumenPieData, loadDataViewState, loadScheduleEvents, lumenChart, lumenChartTones, lumenCodeTokenClassNames, lumenColors, lumenColorTokenNames, lumenComponentNames, lumenDarkTheme, lumenGlass, lumenGlassColorTokenNames, lumenGlassEffectTokenNames, lumenGlassTokenNames, lumenLightTheme, lumenPackages, lumenSemanticColorTokenNames, lumenThemeAttribute, lumenTokenNames, mergeThemeTokens, moveScheduleEvent, normalizeLumenCode, normalizeThemeBuilderHex, normalizeThemeBuilderHue, paginateDataRecords, parseDataViewState, parseScheduleEvents, parseThemeCss, pinDataViewColumn, renderLumenCodeHtml, resizeScheduleEvent, resizeScheduleEvents, resolveLumenChartTone, saveDataViewState, saveScheduleEvents, scaleLumenChartValue, scheduleEventsOverlap, scoreThemeContrast, serializeDataViewState, serializeScheduleEvents, sortDataRecords, suggestReadableInk, themeBuilderHexToHsl, toggleDataViewSelection, tokenizeLumenCode, tuneThemeContrast, unpinDataViewColumn } from '@santi020k/lumen-core';
|
|
3
4
|
export const lumen = {
|
|
4
5
|
name: 'Lumen',
|
|
5
6
|
packageName: '@santi020k/lumen',
|