zz-meridian 0.6.0 → 0.6.1
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/dist/adopt.js +2 -2
- package/dist/create.js +2 -2
- package/dist/files.js +13 -4
- package/dist/replay.js +3 -3
- package/package.json +1 -1
- package/payload/CHANGELOG.md +8 -0
- package/payload/package.json +1 -1
- package/payload/scripts/gate.ts +2 -1
- /package/payload/{.gitignore → gitignore} +0 -0
package/dist/adopt.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import fs from 'node:fs';
|
|
10
10
|
import path from 'node:path';
|
|
11
|
-
import {
|
|
11
|
+
import { VERSION, brandArgs, effectiveBrand, inside, installSkill, packageManager, payloadBytes, payloadFiles, readJsonc, readPayload, relativeImports, run, runTool, sha256, writeIn, writeManifest, } from './files.js';
|
|
12
12
|
import { BRIEF_TEMPLATE, managedBlock, upsertManagedBlock } from './context.js';
|
|
13
13
|
import { FIXED, adoptSetOf, managedPaths } from './ownership.js';
|
|
14
14
|
/** The template's dependencies a dashboard built from these files needs. */
|
|
@@ -161,7 +161,7 @@ https://github.com/zhixuan312/zz-meridian/blob/master/skills/zz-meridian/referen
|
|
|
161
161
|
owned.push(rel);
|
|
162
162
|
};
|
|
163
163
|
for (const rel of set) {
|
|
164
|
-
const raw =
|
|
164
|
+
const raw = payloadBytes(rel);
|
|
165
165
|
own(rel, TS.test(rel) ? exactImports(rel, raw.toString('utf8'), known) : raw);
|
|
166
166
|
}
|
|
167
167
|
own('src/app.config.ts', exactImports('src/app.config.ts', appConfig(routes(root, dir)), known));
|
package/dist/create.js
CHANGED
|
@@ -7,7 +7,7 @@ import fs from 'node:fs';
|
|
|
7
7
|
import path from 'node:path';
|
|
8
8
|
import { managedPaths } from './ownership.js';
|
|
9
9
|
import { BRIEF_TEMPLATE, managedBlock, upsertManagedBlock } from './context.js';
|
|
10
|
-
import {
|
|
10
|
+
import { VERSION, brandArgs, effectiveBrand, hasCommand, inside, installSkill, payloadBytes, payloadFiles, run, sha256, writeIn, writeManifest } from './files.js';
|
|
11
11
|
export function create(o) {
|
|
12
12
|
const root = path.resolve(o.dir);
|
|
13
13
|
if (fs.existsSync(root) && fs.readdirSync(root).length)
|
|
@@ -22,7 +22,7 @@ export function create(o) {
|
|
|
22
22
|
for (const rel of payloadFiles()) {
|
|
23
23
|
if (rel.startsWith('skills/'))
|
|
24
24
|
continue;
|
|
25
|
-
writeIn(root, rel,
|
|
25
|
+
writeIn(root, rel, payloadBytes(rel));
|
|
26
26
|
}
|
|
27
27
|
const name = brand.name ?? path.basename(root).replace(/[-_]+/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
|
|
28
28
|
brand = effectiveBrand({ ...brand, name });
|
package/dist/files.js
CHANGED
|
@@ -10,7 +10,16 @@ import { fileURLToPath } from 'node:url';
|
|
|
10
10
|
/** The template snapshot this package carries, built from `git ls-files` at the release commit. */
|
|
11
11
|
export const PAYLOAD = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'payload');
|
|
12
12
|
export const VERSION = JSON.parse(fs.readFileSync(path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'package.json'), 'utf8')).version;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* npm renames a `.gitignore` inside an installed package to `.npmignore`, so the payload carries the template's as
|
|
15
|
+
* `gitignore`. `shippedPath` is the name a project path ships under; `projectPath` reads one back, and also reads a
|
|
16
|
+
* `.gitignore` as itself, which is how releases before 0.6.1 carry it.
|
|
17
|
+
*/
|
|
18
|
+
export const shippedPath = (rel) => (rel === '.gitignore' ? 'gitignore' : rel);
|
|
19
|
+
export const projectPath = (rel) => (rel === 'gitignore' ? '.gitignore' : rel);
|
|
20
|
+
/** A payload file's bytes, by its project path. */
|
|
21
|
+
export const payloadBytes = (rel) => fs.readFileSync(path.join(PAYLOAD, shippedPath(rel)));
|
|
22
|
+
/** Every file under a payload folder, as project paths. Symbolic links are never followed. */
|
|
14
23
|
export function payloadFiles(dir = '') {
|
|
15
24
|
const out = [];
|
|
16
25
|
const walk = (rel) => {
|
|
@@ -21,14 +30,14 @@ export function payloadFiles(dir = '') {
|
|
|
21
30
|
if (e.isDirectory())
|
|
22
31
|
walk(p);
|
|
23
32
|
else if (e.isFile())
|
|
24
|
-
out.push(p);
|
|
33
|
+
out.push(projectPath(p));
|
|
25
34
|
}
|
|
26
35
|
};
|
|
27
36
|
if (fs.existsSync(path.join(PAYLOAD, dir)))
|
|
28
37
|
walk(dir);
|
|
29
38
|
return out.sort();
|
|
30
39
|
}
|
|
31
|
-
export const readPayload = (rel) =>
|
|
40
|
+
export const readPayload = (rel) => payloadBytes(rel).toString('utf8');
|
|
32
41
|
/**
|
|
33
42
|
* A path inside `root`; anything that would resolve outside it is refused: `..`, an absolute path, or a symbolic link
|
|
34
43
|
* on the way (a linked folder or file could carry a write somewhere else).
|
|
@@ -132,7 +141,7 @@ export function installSkill(root, record) {
|
|
|
132
141
|
for (const base of ['.agents/skills/zz-meridian', '.claude/skills/zz-meridian']) {
|
|
133
142
|
for (const f of files) {
|
|
134
143
|
const rel = `${base}/${f.slice('skills/zz-meridian/'.length)}`;
|
|
135
|
-
const content =
|
|
144
|
+
const content = payloadBytes(f);
|
|
136
145
|
writeIn(root, rel, content);
|
|
137
146
|
if (record)
|
|
138
147
|
record[rel] = sha256(content);
|
package/dist/replay.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createHash } from 'node:crypto';
|
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import path from 'node:path';
|
|
9
9
|
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import { brandArgs, inside, run, sha256 } from './files.js';
|
|
10
|
+
import { brandArgs, inside, projectPath, run, sha256 } from './files.js';
|
|
11
11
|
/** The package folder of the running CLI: the parent of its `dist/`. */
|
|
12
12
|
export const runningRelease = () => path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
13
13
|
/** A command's failure as one message: the cause, then everything it printed. */
|
|
@@ -165,7 +165,7 @@ function replayTree(pkgRoot, route, brand, scratch, moduleType) {
|
|
|
165
165
|
export function replay(pkgRoot, route, brand, scratch, moduleType = false) {
|
|
166
166
|
return replayTree(pkgRoot, route, brand, scratch, moduleType).hashes;
|
|
167
167
|
}
|
|
168
|
-
/** Every regular file under `<release>/payload` as posix paths, symbolic links never followed. */
|
|
168
|
+
/** Every regular file under `<release>/payload` as posix project paths, symbolic links never followed. */
|
|
169
169
|
export function payloadList(release) {
|
|
170
170
|
const base = path.join(release, 'payload');
|
|
171
171
|
const out = [];
|
|
@@ -175,7 +175,7 @@ export function payloadList(release) {
|
|
|
175
175
|
if (e.isDirectory())
|
|
176
176
|
walk(p);
|
|
177
177
|
else if (e.isFile())
|
|
178
|
-
out.push(p);
|
|
178
|
+
out.push(projectPath(p));
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
if (fs.existsSync(base))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zz-meridian",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Bring ZZ Meridian, a dashboard design system, into a Next.js project, or start a new dashboard on it. Copies the files in; nothing depends on this package at runtime.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/payload/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of ZZ Meridian, newest first. Versions follow semver: a removed or renamed token, prop or card is major; a new card, token or variant is minor; a corrected value is a patch. Each entry says what breaks and what to do instead.
|
|
4
4
|
|
|
5
|
+
## [0.6.1] · 2026-10-06
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **A created project has its `.gitignore`.** npm renames a `.gitignore` inside an installed package to `.npmignore`, so every project made with `create` since 0.3.0 had a `.npmignore` and no `.gitignore`, and `git add` took in `node_modules`, `.next` and `.env.local`. The package now carries the template's as `payload/gitignore`, and `create` writes it as `.gitignore`. In a project created before 0.6.1, run `git mv .npmignore .gitignore`, then `git rm -r --cached node_modules .next` for whatever was committed; `update` leaves the file alone, since it is the team's.
|
|
10
|
+
- **`update` runs from the registry.** It compares the running package with the published one, and npm's rename made the two differ, so `npx zz-meridian@<version> update` refused itself with "the running package differs from zz-meridian@<version> on the registry" since 0.5.0. 0.6.0 is on npm with this defect and has no tag or GitHub Release: update with 0.6.1.
|
|
11
|
+
- **A gate step whose tool is not installed says so.** `scripts/gate.ts` printed a `TypeError` in place of the missing command.
|
|
12
|
+
|
|
5
13
|
## [0.6.0] · 2026-10-06
|
|
6
14
|
|
|
7
15
|
### Changed
|
package/payload/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zz-meridian-template",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "ZZ Meridian: a dashboard design system and starter. DTCG tokens, five layers of React components and a Design Atlas, in a light and a dark theme.",
|
package/payload/scripts/gate.ts
CHANGED
|
@@ -36,7 +36,8 @@ for (const [name, [cmd, ...args]] of STEPS) {
|
|
|
36
36
|
const ok = r.status === 0;
|
|
37
37
|
console.log(`${ok ? 'ok ' : 'FAIL'} ${name} (${((Date.now() - t) / 1000).toFixed(1)}s)`);
|
|
38
38
|
if (!ok) {
|
|
39
|
-
|
|
39
|
+
// A tool that could not start (not installed) has no output, only the error.
|
|
40
|
+
console.log(`${r.stdout ?? ''}${r.stderr ?? ''}${r.error ? `${cmd}: ${r.error.message}` : ''}`.trim().split('\n').slice(-40).join('\n'));
|
|
40
41
|
process.exit(1);
|
|
41
42
|
}
|
|
42
43
|
}
|
|
File without changes
|