@grove-dev/cli 0.7.0 → 0.8.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 +30 -10
- package/dist/audit-cli.d.ts +1 -1
- package/dist/audit-cli.d.ts.map +1 -1
- package/dist/audit-cli.js +11 -11
- package/dist/audit-cli.js.map +1 -1
- package/dist/audit.d.ts +4 -4
- package/dist/audit.d.ts.map +1 -1
- package/dist/audit.js +91 -51
- package/dist/audit.js.map +1 -1
- package/dist/collection-cli.d.ts.map +1 -1
- package/dist/collection-cli.js +1 -1
- package/dist/collection-cli.js.map +1 -1
- package/dist/diff.d.ts +43 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +70 -0
- package/dist/diff.js.map +1 -0
- package/dist/hash.d.ts +36 -0
- package/dist/hash.d.ts.map +1 -0
- package/dist/hash.js +82 -0
- package/dist/hash.js.map +1 -0
- package/dist/icons-cli.d.ts +1 -1
- package/dist/icons-cli.d.ts.map +1 -1
- package/dist/icons-cli.js +32 -14
- package/dist/icons-cli.js.map +1 -1
- package/dist/import-cli.d.ts +1 -1
- package/dist/import-cli.d.ts.map +1 -1
- package/dist/import-cli.js +6 -6
- package/dist/import-cli.js.map +1 -1
- package/dist/index.js +84 -60
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +37 -4
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +251 -57
- package/dist/init.js.map +1 -1
- package/dist/package.json +3 -2
- package/dist/r/about.json +22 -0
- package/dist/r/browse.json +89 -0
- package/dist/r/collections.json +59 -0
- package/dist/r/contributors.json +22 -0
- package/dist/r/default.json +438 -0
- package/dist/r/home.json +67 -0
- package/dist/r/not-found.json +22 -0
- package/dist/r/project-card.json +48 -0
- package/dist/r/record.json +59 -0
- package/dist/r/registry.json +903 -0
- package/dist/r/shell.json +75 -0
- package/dist/r/submit.json +28 -0
- package/dist/r/taxonomy.json +65 -0
- package/dist/r/ui.json +54 -0
- package/dist/readme-cli.d.ts +1 -1
- package/dist/readme-cli.d.ts.map +1 -1
- package/dist/readme-cli.js +37 -47
- package/dist/readme-cli.js.map +1 -1
- package/dist/registry.d.ts +74 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +180 -0
- package/dist/registry.js.map +1 -0
- package/dist/run.d.ts +7 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +20 -0
- package/dist/run.js.map +1 -0
- package/dist/unified-diff.d.ts +14 -0
- package/dist/unified-diff.d.ts.map +1 -0
- package/dist/unified-diff.js +103 -0
- package/dist/unified-diff.js.map +1 -0
- package/dist/update.d.ts +47 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/update.js +231 -0
- package/dist/update.js.map +1 -0
- package/package.json +5 -4
- package/dist/site/.github/ISSUE_TEMPLATE/bug_report.md +0 -33
- package/dist/site/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/dist/site/.github/ISSUE_TEMPLATE/record_submission.md +0 -48
- package/dist/site/.github/pull_request_template.md +0 -27
- package/dist/site/.github/workflows/ci.yml +0 -21
- package/dist/site/.github/workflows/cleanup.yml +0 -27
- package/dist/site/.github/workflows/deploy.yml +0 -36
- package/dist/site/.github/workflows/readme.yml +0 -41
- package/dist/site/.github/workflows/sync-contributors.yml +0 -28
- package/dist/site/.github/workflows/sync-github.yml +0 -31
- package/dist/site/README.md +0 -89
- package/dist/site/astro.config.mjs +0 -26
- package/dist/site/content/records/crewai.md +0 -898
- package/dist/site/content/records/dify.md +0 -35
- package/dist/site/content/records/flowise.md +0 -38
- package/dist/site/content/records/llamaindex.md +0 -45
- package/dist/site/content/records/ollama.md +0 -39
- package/dist/site/content/records/open-webui.md +0 -35
- package/dist/site/data/collections/top-ai-agents.yml +0 -14
- package/dist/site/data/collections/top-flutter.yml +0 -12
- package/dist/site/data/health.yml +0 -13
- package/dist/site/data/records/.gitkeep +0 -0
- package/dist/site/data/records/crewai.yml +0 -23
- package/dist/site/data/records/dify.yml +0 -23
- package/dist/site/data/records/flowise.yml +0 -23
- package/dist/site/data/records/llamaindex.yml +0 -23
- package/dist/site/data/records/ollama.yml +0 -30
- package/dist/site/data/records/open-webui.yml +0 -23
- package/dist/site/data/taxonomy/categories.yml +0 -10
- package/dist/site/data/taxonomy/distribution-channels.yml +0 -43
- package/dist/site/data/taxonomy/licenses.yml +0 -16
- package/dist/site/data/taxonomy/platforms.yml +0 -20
- package/dist/site/data/taxonomy/stacks.yml +0 -15
- package/dist/site/data/taxonomy/topics.yml +0 -29
- package/dist/site/grove.config.ts +0 -110
- package/dist/site/package.json +0 -34
- package/dist/site/public/icons/.grove-icons.json +0 -47
- package/dist/site/public/icons/platforms/android.svg +0 -1
- package/dist/site/public/icons/platforms/app.svg +0 -4
- package/dist/site/public/icons/platforms/chrome.svg +0 -1
- package/dist/site/public/icons/platforms/desktop.svg +0 -4
- package/dist/site/public/icons/platforms/embedded.svg +0 -5
- package/dist/site/public/icons/platforms/ios.svg +0 -1
- package/dist/site/public/icons/platforms/linux.svg +0 -1
- package/dist/site/public/icons/platforms/macos.svg +0 -1
- package/dist/site/public/icons/platforms/ubuntu.svg +0 -1
- package/dist/site/public/icons/platforms/web.svg +0 -5
- package/dist/site/public/icons/platforms/windows.svg +0 -1
- package/dist/site/public/icons/stacks/android.svg +0 -1
- package/dist/site/public/icons/stacks/apple.svg +0 -1
- package/dist/site/public/icons/stacks/bun.svg +0 -1
- package/dist/site/public/icons/stacks/capacitor.svg +0 -1
- package/dist/site/public/icons/stacks/clojure.svg +0 -1
- package/dist/site/public/icons/stacks/dart.svg +0 -1
- package/dist/site/public/icons/stacks/deno.svg +0 -1
- package/dist/site/public/icons/stacks/django.svg +0 -1
- package/dist/site/public/icons/stacks/docker.svg +0 -1
- package/dist/site/public/icons/stacks/firebase.svg +0 -1
- package/dist/site/public/icons/stacks/flutter.svg +0 -1
- package/dist/site/public/icons/stacks/go.svg +0 -1
- package/dist/site/public/icons/stacks/graphql.svg +0 -1
- package/dist/site/public/icons/stacks/ionic.svg +0 -1
- package/dist/site/public/icons/stacks/java.svg +0 -1
- package/dist/site/public/icons/stacks/javascript.svg +0 -1
- package/dist/site/public/icons/stacks/kotlin.svg +0 -1
- package/dist/site/public/icons/stacks/llm.svg +0 -4
- package/dist/site/public/icons/stacks/mongodb.svg +0 -1
- package/dist/site/public/icons/stacks/nodejs.svg +0 -1
- package/dist/site/public/icons/stacks/python.svg +0 -1
- package/dist/site/public/icons/stacks/rag.svg +0 -6
- package/dist/site/public/icons/stacks/react-native.svg +0 -1
- package/dist/site/public/icons/stacks/react.svg +0 -1
- package/dist/site/public/icons/stacks/rust.svg +0 -1
- package/dist/site/public/icons/stacks/solidity.svg +0 -1
- package/dist/site/public/icons/stacks/sveltekit.svg +0 -1
- package/dist/site/public/icons/stacks/swift.svg +0 -1
- package/dist/site/public/icons/stacks/tauri.svg +0 -1
- package/dist/site/public/icons/stacks/tensorflow.svg +0 -1
- package/dist/site/public/icons/stacks/typescript.svg +0 -1
- package/dist/site/public/icons/stacks/vue.svg +0 -1
- package/dist/site/public/logo.svg +0 -16
- package/dist/site/src/components/DirectoryBrowse.astro +0 -246
- package/dist/site/src/components/PipelineStrip.astro +0 -121
- package/dist/site/src/components/TaxonomyList.astro +0 -108
- package/dist/site/src/pages/404.astro +0 -63
- package/dist/site/src/pages/[slug]/[recordSlug].astro +0 -71
- package/dist/site/src/pages/[slug]/index.astro +0 -19
- package/dist/site/src/pages/[slug]/page/[page].astro +0 -32
- package/dist/site/src/pages/[slug]/page/cards.astro +0 -50
- package/dist/site/src/pages/[slug]/page/records.json.ts +0 -24
- package/dist/site/src/pages/about.astro +0 -130
- package/dist/site/src/pages/categories/[name].astro +0 -35
- package/dist/site/src/pages/categories/index.astro +0 -33
- package/dist/site/src/pages/collections/[slug].astro +0 -45
- package/dist/site/src/pages/collections/index.astro +0 -32
- package/dist/site/src/pages/contributors.astro +0 -115
- package/dist/site/src/pages/empty.astro +0 -24
- package/dist/site/src/pages/index.astro +0 -161
- package/dist/site/src/pages/licenses/[name].astro +0 -35
- package/dist/site/src/pages/stacks/[name].astro +0 -35
- package/dist/site/src/pages/stacks/index.astro +0 -35
- package/dist/site/src/pages/submit.astro +0 -183
- package/dist/site/src/styles/global.css +0 -21
- package/dist/site/tsconfig.json +0 -13
- /package/{dist/site/LICENSE → LICENSE} +0 -0
package/dist/update.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { planUpdate, type UpdatePlan } from './diff.js';
|
|
2
|
+
export interface UpdateOptions {
|
|
3
|
+
cwd: string;
|
|
4
|
+
/** Print the plan and exit; don't touch disk. */
|
|
5
|
+
check?: boolean;
|
|
6
|
+
/** Print unified diff for every upstream_changed row. */
|
|
7
|
+
diff?: boolean;
|
|
8
|
+
/** Apply changes even when conflicts exist (locally_modified is still preserved). */
|
|
9
|
+
force?: boolean;
|
|
10
|
+
/** Emit JSON instead of the human-readable table. */
|
|
11
|
+
json?: boolean;
|
|
12
|
+
/** Upstream item to diff against: a local path or an http(s) URL to a built `default.json`. */
|
|
13
|
+
from?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface FileDiff {
|
|
16
|
+
target: string;
|
|
17
|
+
patch: string;
|
|
18
|
+
}
|
|
19
|
+
export interface UpdateSummary {
|
|
20
|
+
plan: UpdatePlan;
|
|
21
|
+
/** Files we wrote to disk during this run. */
|
|
22
|
+
applied: string[];
|
|
23
|
+
/** Files we preserved despite upstream changes. */
|
|
24
|
+
preserved: string[];
|
|
25
|
+
/** Unified diffs for the rows upstream moved, when `--diff` is set. */
|
|
26
|
+
diffs: FileDiff[];
|
|
27
|
+
/** Where the upstream item came from (path or URL). */
|
|
28
|
+
source: string;
|
|
29
|
+
exitCode: 0 | 1 | 2;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Plan and optionally apply a registry update. Takes the consumer
|
|
33
|
+
* root and option flags, returns a structured summary. Printing and
|
|
34
|
+
* exit codes live in `grove update`'s subcommand handler.
|
|
35
|
+
*/
|
|
36
|
+
export declare function runUpdate(options: UpdateOptions): Promise<UpdateSummary>;
|
|
37
|
+
/**
|
|
38
|
+
* Human-readable summary used by the CLI subcommand's default output.
|
|
39
|
+
*
|
|
40
|
+
* The tallies describe the run that actually happened: a conflict taken
|
|
41
|
+
* by `--force` counts as applied, not as an outstanding conflict, so the
|
|
42
|
+
* footer never reads "0 to apply" above "Applied 1 file(s)".
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatPlan(summary: UpdateSummary): string;
|
|
45
|
+
export { classify } from './diff.js';
|
|
46
|
+
export { planUpdate };
|
|
47
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAqBxD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qFAAqF;IACrF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qDAAqD;IACrD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,mDAAmD;IACnD,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,uEAAuE;IACvE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACrB;AAmBD;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAwD9E;AA4GD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CA0BzD;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/update.js
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
/**
|
|
3
|
+
* `grove update` — three-way reconcile of a consumer's installed
|
|
4
|
+
* scaffold against the registry upstream.
|
|
5
|
+
*
|
|
6
|
+
* Algorithm:
|
|
7
|
+
* 1. Read `.grove/registry.lock.json` (the install-time snapshot).
|
|
8
|
+
* 2. Load the upstream `default` item — `--from <path-or-url>`,
|
|
9
|
+
* else the `@grove` registry URL in components.json, else the
|
|
10
|
+
* copy bundled inside the CLI.
|
|
11
|
+
* 3. Hash every file on disk the lockfile or the item names.
|
|
12
|
+
* 4. Diff installed vs lock vs upstream per file → classification.
|
|
13
|
+
* 5. Apply rules per the table in apps/docs/concepts/registry.md:
|
|
14
|
+
*
|
|
15
|
+
* unchanged → skip
|
|
16
|
+
* upstream_changed → install new content
|
|
17
|
+
* new → install
|
|
18
|
+
* locally_modified → preserve, never overwrite
|
|
19
|
+
* conflict → preserve + warn
|
|
20
|
+
* removed → report, do not delete
|
|
21
|
+
*
|
|
22
|
+
* Output: human-readable table by default, JSON via `--json`.
|
|
23
|
+
*
|
|
24
|
+
* Exit codes (CI-friendly):
|
|
25
|
+
* 0 nothing to do, or apply succeeded
|
|
26
|
+
* 1 no lockfile (consumer was never initialized)
|
|
27
|
+
* 2 conflicts present (caller decides whether to --force)
|
|
28
|
+
*/
|
|
29
|
+
import { readFile } from 'node:fs/promises';
|
|
30
|
+
import { resolve } from 'node:path';
|
|
31
|
+
import { planUpdate } from './diff.js';
|
|
32
|
+
import { hashInstalledFile, readLockfile, writeLockfile, } from './hash.js';
|
|
33
|
+
import { itemLockEntries, loadItem, resolveBundledItemPath, resolveRegistryTemplate, SCAFFOLD_ID, SCAFFOLD_ITEM, targetToProjectPath, writeItemFiles, } from './registry.js';
|
|
34
|
+
import { unifiedDiff } from './unified-diff.js';
|
|
35
|
+
/**
|
|
36
|
+
* Pick the upstream item. Explicit `--from` wins; then the registry
|
|
37
|
+
* the project configured in components.json; then the item bundled
|
|
38
|
+
* with the installed `@grove-dev/registry` (which tracks the CLI's
|
|
39
|
+
* version, not the latest release — hence the note).
|
|
40
|
+
*/
|
|
41
|
+
async function resolveUpstreamSource(cwd, from) {
|
|
42
|
+
if (from)
|
|
43
|
+
return from;
|
|
44
|
+
const template = await resolveRegistryTemplate(cwd);
|
|
45
|
+
if (template)
|
|
46
|
+
return template.replace('{name}', SCAFFOLD_ITEM);
|
|
47
|
+
const bundled = resolveBundledItemPath();
|
|
48
|
+
console.error(`[update] no @grove registry in components.json — comparing against the bundled ${bundled}`);
|
|
49
|
+
return bundled;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Plan and optionally apply a registry update. Takes the consumer
|
|
53
|
+
* root and option flags, returns a structured summary. Printing and
|
|
54
|
+
* exit codes live in `grove update`'s subcommand handler.
|
|
55
|
+
*/
|
|
56
|
+
export async function runUpdate(options) {
|
|
57
|
+
const lock = await readLockfile(options.cwd);
|
|
58
|
+
if (!lock) {
|
|
59
|
+
return {
|
|
60
|
+
plan: emptyPlan(),
|
|
61
|
+
applied: [],
|
|
62
|
+
preserved: [],
|
|
63
|
+
diffs: [],
|
|
64
|
+
source: options.from ?? '',
|
|
65
|
+
exitCode: 1,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const source = await resolveUpstreamSource(options.cwd, options.from);
|
|
69
|
+
const item = await loadItem(source);
|
|
70
|
+
const lockMap = mapByTarget(lock.files);
|
|
71
|
+
const upstreamMap = mapByTarget(itemLockEntries(item));
|
|
72
|
+
// Disk state for every target either side knows about — the lock's
|
|
73
|
+
// targets so files upstream dropped classify as `removed`, the
|
|
74
|
+
// item's so brand-new files classify as `new`.
|
|
75
|
+
const installedHashes = await hashAllInstalled(options.cwd, new Set([...lockMap.keys(), ...upstreamMap.keys()]));
|
|
76
|
+
const plan = planUpdate(installedHashes, lockMap, upstreamMap);
|
|
77
|
+
// `--force` takes the upstream side of a conflict, which is what the
|
|
78
|
+
// flag has always claimed to do. `locally_modified` is never in this
|
|
79
|
+
// set: the user edited a file upstream did not touch, so there is
|
|
80
|
+
// nothing to merge and overwriting would only destroy their work.
|
|
81
|
+
const toWrite = new Set([...plan.upstream_changed, ...plan.new]);
|
|
82
|
+
if (options.force)
|
|
83
|
+
for (const target of plan.conflict)
|
|
84
|
+
toWrite.add(target);
|
|
85
|
+
const diskBefore = options.diff
|
|
86
|
+
? await readInstalled(options.cwd, [...plan.upstream_changed, ...plan.conflict])
|
|
87
|
+
: new Map();
|
|
88
|
+
let applied = [];
|
|
89
|
+
if (!options.check) {
|
|
90
|
+
applied = await writeItemFiles(item, options.cwd, { only: toWrite });
|
|
91
|
+
await writeLockfile(options.cwd, nextLockfile(lock, item, plan, new Set(applied)));
|
|
92
|
+
}
|
|
93
|
+
const preserved = [];
|
|
94
|
+
for (const target of plan.locally_modified)
|
|
95
|
+
preserved.push(target);
|
|
96
|
+
for (const target of plan.conflict)
|
|
97
|
+
if (!toWrite.has(target))
|
|
98
|
+
preserved.push(target);
|
|
99
|
+
// Diffs are computed before anything is written when `--check` is on,
|
|
100
|
+
// and against the pre-write content otherwise — either way they show
|
|
101
|
+
// what the upstream change does to the file the user has today.
|
|
102
|
+
const diffs = options.diff ? await buildDiffs(item, options.cwd, plan, diskBefore) : [];
|
|
103
|
+
const exitCode = plan.conflict.length > 0 && !options.force ? 2 : 0;
|
|
104
|
+
return { plan, applied, preserved, diffs, source, exitCode };
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Unified diffs for every row where upstream moved — `upstream_changed`
|
|
108
|
+
* and `conflict`. A `locally_modified` row has no upstream change to
|
|
109
|
+
* show, and `new` has nothing to diff against.
|
|
110
|
+
*/
|
|
111
|
+
async function buildDiffs(item, cwd, plan, before) {
|
|
112
|
+
const upstream = new Map(item.files.map((file) => [targetToProjectPath(file.target), file.content]));
|
|
113
|
+
const diffs = [];
|
|
114
|
+
for (const target of [...plan.upstream_changed, ...plan.conflict]) {
|
|
115
|
+
const after = upstream.get(target);
|
|
116
|
+
if (after === undefined)
|
|
117
|
+
continue;
|
|
118
|
+
const patch = unifiedDiff(before.get(target) ?? '', after, target);
|
|
119
|
+
if (patch)
|
|
120
|
+
diffs.push({ target, patch });
|
|
121
|
+
}
|
|
122
|
+
return diffs;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The lockfile records what this project is reconciled to — not what
|
|
126
|
+
* upstream happens to ship.
|
|
127
|
+
*
|
|
128
|
+
* Stamping the whole upstream item, including files we deliberately
|
|
129
|
+
* refused to overwrite, made the lock claim content that was never
|
|
130
|
+
* written. The next run then saw `registry === lock` for those files and
|
|
131
|
+
* reclassified a `conflict` as a mere `locally_modified`, dropping the
|
|
132
|
+
* exit code from 2 to 0. A pending upstream change was reported exactly
|
|
133
|
+
* once and then never again, and `scaffoldVersion` advertised a version
|
|
134
|
+
* the project was not on.
|
|
135
|
+
*
|
|
136
|
+
* So: upstream entries for files we wrote, previous entries for files we
|
|
137
|
+
* preserved, and `scaffoldVersion` only advances once no conflict is
|
|
138
|
+
* left unresolved.
|
|
139
|
+
*/
|
|
140
|
+
function nextLockfile(lock, item, plan, written) {
|
|
141
|
+
const previous = new Map(lock.files.map((file) => [file.target, file]));
|
|
142
|
+
const preserved = new Set([...plan.locally_modified, ...plan.conflict].filter((target) => !written.has(target)));
|
|
143
|
+
const files = itemLockEntries(item).map((entry) => {
|
|
144
|
+
const carried = preserved.has(entry.target) ? previous.get(entry.target) : undefined;
|
|
145
|
+
return carried ?? entry;
|
|
146
|
+
});
|
|
147
|
+
const unresolved = plan.conflict.some((target) => !written.has(target));
|
|
148
|
+
return {
|
|
149
|
+
scaffold: SCAFFOLD_ID,
|
|
150
|
+
scaffoldVersion: unresolved ? lock.scaffoldVersion : (item.meta?.version ?? '0.0.0'),
|
|
151
|
+
installedAt: new Date().toISOString().slice(0, 10),
|
|
152
|
+
fileCount: files.length,
|
|
153
|
+
files,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function emptyPlan() {
|
|
157
|
+
return {
|
|
158
|
+
unchanged: [],
|
|
159
|
+
upstream_changed: [],
|
|
160
|
+
new: [],
|
|
161
|
+
locally_modified: [],
|
|
162
|
+
conflict: [],
|
|
163
|
+
removed: [],
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function mapByTarget(files) {
|
|
167
|
+
const map = new Map();
|
|
168
|
+
for (const file of files)
|
|
169
|
+
map.set(file.target, file.hash);
|
|
170
|
+
return map;
|
|
171
|
+
}
|
|
172
|
+
async function readInstalled(cwd, targets) {
|
|
173
|
+
const out = new Map();
|
|
174
|
+
for (const target of targets) {
|
|
175
|
+
try {
|
|
176
|
+
out.set(target, await readFile(resolve(cwd, target), 'utf8'));
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
// Missing on disk — the diff renders as an addition.
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
async function hashAllInstalled(cwd, targets) {
|
|
185
|
+
const out = new Map();
|
|
186
|
+
for (const target of targets) {
|
|
187
|
+
out.set(target, await hashInstalledFile(cwd, target));
|
|
188
|
+
}
|
|
189
|
+
return out;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Human-readable summary used by the CLI subcommand's default output.
|
|
193
|
+
*
|
|
194
|
+
* The tallies describe the run that actually happened: a conflict taken
|
|
195
|
+
* by `--force` counts as applied, not as an outstanding conflict, so the
|
|
196
|
+
* footer never reads "0 to apply" above "Applied 1 file(s)".
|
|
197
|
+
*/
|
|
198
|
+
export function formatPlan(summary) {
|
|
199
|
+
const { plan, applied, diffs } = summary;
|
|
200
|
+
const wrote = new Set(applied);
|
|
201
|
+
const forced = plan.conflict.filter((target) => wrote.has(target));
|
|
202
|
+
const outstanding = plan.conflict.filter((target) => !wrote.has(target));
|
|
203
|
+
const lines = [];
|
|
204
|
+
for (const t of plan.unchanged)
|
|
205
|
+
lines.push(`✓ ${t} unchanged`);
|
|
206
|
+
for (const t of plan.upstream_changed)
|
|
207
|
+
lines.push(`↑ ${t} upstream changed`);
|
|
208
|
+
for (const t of plan.new)
|
|
209
|
+
lines.push(`+ ${t} new`);
|
|
210
|
+
for (const t of plan.locally_modified)
|
|
211
|
+
lines.push(`! ${t} locally modified — preserved`);
|
|
212
|
+
for (const t of forced)
|
|
213
|
+
lines.push(`✗ ${t} conflict — took upstream (--force)`);
|
|
214
|
+
for (const t of outstanding)
|
|
215
|
+
lines.push(`✗ ${t} conflict — needs manual merge`);
|
|
216
|
+
for (const t of plan.removed)
|
|
217
|
+
lines.push(`- ${t} removed`);
|
|
218
|
+
lines.push('');
|
|
219
|
+
const applyCount = plan.upstream_changed.length + plan.new.length + forced.length;
|
|
220
|
+
lines.push(`${applyCount} to apply · ${plan.new.length} new · ${summary.preserved.length} preserved · ${outstanding.length} conflict`);
|
|
221
|
+
if (applied.length > 0) {
|
|
222
|
+
lines.push(`\nApplied ${applied.length} file(s).`);
|
|
223
|
+
}
|
|
224
|
+
for (const diff of diffs) {
|
|
225
|
+
lines.push('', diff.patch);
|
|
226
|
+
}
|
|
227
|
+
return lines.join('\n');
|
|
228
|
+
}
|
|
229
|
+
export { classify } from './diff.js';
|
|
230
|
+
export { planUpdate };
|
|
231
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,+BAA+B;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C;AAC1B,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grove-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Grove CLI — scaffolds Grove-powered spaces and orchestrates @grove-dev/core commands.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,13 +47,14 @@
|
|
|
47
47
|
"lighthouse": "^12.8.2",
|
|
48
48
|
"typescript": "^5.9.3",
|
|
49
49
|
"yaml": "^2.6.0",
|
|
50
|
-
"@grove-dev/core": "0.
|
|
50
|
+
"@grove-dev/core": "0.8.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"tsx": "^4.23.0"
|
|
53
|
+
"tsx": "^4.23.0",
|
|
54
|
+
"@grove-dev/registry": "1.0.0"
|
|
54
55
|
},
|
|
55
56
|
"scripts": {
|
|
56
|
-
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json && node -e \"require('fs').copyFileSync('package.json','dist/package.json')\" && node
|
|
57
|
+
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json && node -e \"require('fs').copyFileSync('package.json','dist/package.json')\" && node -e \"require('fs').cpSync('../registry/dist/r','dist/r',{recursive:true})\"",
|
|
57
58
|
"check": "tsc -p tsconfig.json --noEmit",
|
|
58
59
|
"test": "cd ../.. && pnpm exec vitest run --project unit packages/cli",
|
|
59
60
|
"dev": "tsx src/index.ts --help"
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Something is broken on the site
|
|
4
|
-
title: "[bug] "
|
|
5
|
-
labels: ["bug"]
|
|
6
|
-
assignees: []
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## What happened
|
|
10
|
-
|
|
11
|
-
A clear, concise description of the bug.
|
|
12
|
-
|
|
13
|
-
## Steps to reproduce
|
|
14
|
-
|
|
15
|
-
1. Go to '…'
|
|
16
|
-
2. Click on '…'
|
|
17
|
-
3. Scroll down to '…'
|
|
18
|
-
4. See error
|
|
19
|
-
|
|
20
|
-
## What I expected
|
|
21
|
-
|
|
22
|
-
A clear, concise description of what you expected to happen.
|
|
23
|
-
|
|
24
|
-
## What I saw
|
|
25
|
-
|
|
26
|
-
Screenshots, error messages, console output — anything that helps.
|
|
27
|
-
|
|
28
|
-
## Environment
|
|
29
|
-
|
|
30
|
-
- Browser:
|
|
31
|
-
- OS:
|
|
32
|
-
- Page URL:
|
|
33
|
-
- Viewport size (rough):
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an improvement to the site
|
|
4
|
-
title: "[feature] "
|
|
5
|
-
labels: ["enhancement"]
|
|
6
|
-
assignees: []
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## The problem
|
|
10
|
-
|
|
11
|
-
What's missing or awkward today?
|
|
12
|
-
|
|
13
|
-
## The proposed solution
|
|
14
|
-
|
|
15
|
-
What would you like to see? Mockups, links, references — anything
|
|
16
|
-
that helps us understand the shape of the change.
|
|
17
|
-
|
|
18
|
-
## Alternatives considered
|
|
19
|
-
|
|
20
|
-
Any other approaches you weighed, and why this one wins.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Submit a record
|
|
3
|
-
about: Suggest a new entry for the directory
|
|
4
|
-
title: "[submit] "
|
|
5
|
-
labels: ["submission"]
|
|
6
|
-
assignees: []
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
Thanks for taking the time to suggest a new entry! Please fill in the
|
|
10
|
-
template below — the more complete it is, the faster it lands.
|
|
11
|
-
|
|
12
|
-
**Important:** this issue tracker is for **suggestions**, not for the
|
|
13
|
-
actual data. Once approved, a maintainer will add the record to
|
|
14
|
-
`data/records/<slug>.yml` (or invite you to open a PR).
|
|
15
|
-
|
|
16
|
-
## 1. Basics
|
|
17
|
-
|
|
18
|
-
- **Name:**
|
|
19
|
-
- **One-line description:**
|
|
20
|
-
- **Category:** (e.g. Mobile, Web, DevOps, AI/ML)
|
|
21
|
-
- **Primary stack:** (e.g. Flutter, Vue, Go, Python)
|
|
22
|
-
- **Platforms:** (e.g. iOS, Android, Web, Linux, Self-host)
|
|
23
|
-
- **Project type:** (real-app, production, reference, library, tool,
|
|
24
|
-
demo, template, historical)
|
|
25
|
-
- **Difficulty:** (beginner, intermediate, advanced)
|
|
26
|
-
|
|
27
|
-
## 2. Links
|
|
28
|
-
|
|
29
|
-
- **Repository URL:** (the canonical `https://github.com/owner/repo`)
|
|
30
|
-
- **Website / homepage:**
|
|
31
|
-
- **Docs:**
|
|
32
|
-
|
|
33
|
-
## 3. Why it deserves a spot
|
|
34
|
-
|
|
35
|
-
A short paragraph — what makes it stand out, what it's good for, who
|
|
36
|
-
should look at it.
|
|
37
|
-
|
|
38
|
-
## 4. Caveats
|
|
39
|
-
|
|
40
|
-
Anything we should know about: license quirks, abandoned status,
|
|
41
|
-
paid-only features, etc.
|
|
42
|
-
|
|
43
|
-
## 5. Checkboxes
|
|
44
|
-
|
|
45
|
-
- [ ] The repo is **public** on GitHub / another public forge
|
|
46
|
-
- [ ] It's **open source** under an OSI-approved license
|
|
47
|
-
- [ ] It has been **maintained** in the last 12 months
|
|
48
|
-
- [ ] I am **not** the author (or I'm disclosing that I am)
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
## What this PR does
|
|
2
|
-
|
|
3
|
-
A short summary of the change. One or two sentences. If it closes an
|
|
4
|
-
issue, write "Closes #123" so it auto-links.
|
|
5
|
-
|
|
6
|
-
## Why
|
|
7
|
-
|
|
8
|
-
The motivation. Link to any relevant issues or discussions. If this
|
|
9
|
-
is a UI change, attach a before/after screenshot.
|
|
10
|
-
|
|
11
|
-
## How to verify
|
|
12
|
-
|
|
13
|
-
Steps for a reviewer to follow:
|
|
14
|
-
|
|
15
|
-
1. `pnpm install`
|
|
16
|
-
2. `pnpm exec grove validate`
|
|
17
|
-
3. `pnpm grove:dev` and open `…`
|
|
18
|
-
4. Confirm that `…`
|
|
19
|
-
|
|
20
|
-
## Checklist
|
|
21
|
-
|
|
22
|
-
- [ ] `pnpm exec grove validate` passes
|
|
23
|
-
- [ ] `pnpm run build` succeeds locally
|
|
24
|
-
- [ ] For record changes: the `slug` is unique and matches the
|
|
25
|
-
filename (`data/records/<slug>.yml`)
|
|
26
|
-
- [ ] For new categories / stacks / platforms: the field appears
|
|
27
|
-
sensibly in `Browse by category` and `Browse by stack`
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
check:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
timeout-minutes: 10
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
- uses: pnpm/action-setup@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: "24"
|
|
18
|
-
cache: pnpm
|
|
19
|
-
- run: pnpm install --frozen-lockfile
|
|
20
|
-
- run: pnpm exec grove check
|
|
21
|
-
- run: pnpm build
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: Cleanup report
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
# POSIX cron ORs day-of-month with day-of-week when both are
|
|
6
|
-
# restricted, so "0 5 1-7 * 1" fired on the 1st-7th *and* every
|
|
7
|
-
# Monday — about ten times a month. Plain day-of-month keeps it
|
|
8
|
-
# genuinely monthly.
|
|
9
|
-
- cron: "0 5 1 * *"
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
report:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
timeout-minutes: 10
|
|
16
|
-
permissions:
|
|
17
|
-
contents: read
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
- uses: pnpm/action-setup@v4
|
|
21
|
-
- uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: "24"
|
|
24
|
-
cache: pnpm
|
|
25
|
-
- run: pnpm install --frozen-lockfile
|
|
26
|
-
- run: pnpm exec grove cleanup | tee cleanup-report.md
|
|
27
|
-
- run: cat cleanup-report.md >> "$GITHUB_STEP_SUMMARY"
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
name: Deploy
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
pages: write
|
|
11
|
-
id-token: write
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
pages:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
timeout-minutes: 15
|
|
17
|
-
environment:
|
|
18
|
-
name: github-pages
|
|
19
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
20
|
-
steps:
|
|
21
|
-
- uses: actions/checkout@v4
|
|
22
|
-
- uses: pnpm/action-setup@v4
|
|
23
|
-
- uses: actions/setup-node@v4
|
|
24
|
-
with:
|
|
25
|
-
node-version: "24"
|
|
26
|
-
cache: pnpm
|
|
27
|
-
- run: pnpm install --frozen-lockfile
|
|
28
|
-
- run: pnpm build
|
|
29
|
-
env:
|
|
30
|
-
SITE_URL: ${{ vars.SITE_URL }}
|
|
31
|
-
- uses: actions/configure-pages@v5
|
|
32
|
-
- uses: actions/upload-pages-artifact@v3
|
|
33
|
-
with:
|
|
34
|
-
path: dist
|
|
35
|
-
- uses: actions/deploy-pages@v4
|
|
36
|
-
id: deployment
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
name: Update README
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: "0 4 * * 0"
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
readme:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
timeout-minutes: 10
|
|
12
|
-
permissions:
|
|
13
|
-
contents: write
|
|
14
|
-
pull-requests: write
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
- uses: pnpm/action-setup@v4
|
|
18
|
-
- uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version: "24"
|
|
21
|
-
cache: pnpm
|
|
22
|
-
- run: pnpm install --frozen-lockfile
|
|
23
|
-
- name: Regenerate README
|
|
24
|
-
run: pnpm exec grove readme generate
|
|
25
|
-
- name: Detect changes
|
|
26
|
-
id: diff
|
|
27
|
-
run: |
|
|
28
|
-
if git diff --quiet README.md; then
|
|
29
|
-
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
30
|
-
else
|
|
31
|
-
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
32
|
-
fi
|
|
33
|
-
- name: Open PR
|
|
34
|
-
if: steps.diff.outputs.changed == 'true'
|
|
35
|
-
uses: peter-evans/create-pull-request@v6
|
|
36
|
-
with:
|
|
37
|
-
commit-message: "chore(readme): regenerate awesome-list entries"
|
|
38
|
-
title: "Update README (awesome-list)"
|
|
39
|
-
branch: chore/readme-regenerate
|
|
40
|
-
delete-branch: true
|
|
41
|
-
add-paths: README.md
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: Sync contributors
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: "0 4 * * 0"
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
sync:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
timeout-minutes: 10
|
|
12
|
-
permissions:
|
|
13
|
-
contents: write
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- uses: pnpm/action-setup@v4
|
|
17
|
-
- uses: actions/setup-node@v4
|
|
18
|
-
with:
|
|
19
|
-
node-version: "24"
|
|
20
|
-
cache: pnpm
|
|
21
|
-
- run: pnpm install --frozen-lockfile
|
|
22
|
-
- run: pnpm exec grove sync contributors
|
|
23
|
-
env:
|
|
24
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
25
|
-
- uses: stefanzweifel/git-auto-commit-action@v6
|
|
26
|
-
with:
|
|
27
|
-
commit_message: "chore(data): sync contributors"
|
|
28
|
-
file_pattern: data/generated/contributors.json data/generated/repo-stats.json
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: Sync GitHub
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: "0 3 * * 0"
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
sync:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
timeout-minutes: 20
|
|
12
|
-
permissions:
|
|
13
|
-
contents: write
|
|
14
|
-
pull-requests: write
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
- uses: pnpm/action-setup@v4
|
|
18
|
-
- uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version: "24"
|
|
21
|
-
cache: pnpm
|
|
22
|
-
- run: pnpm install --frozen-lockfile
|
|
23
|
-
- run: pnpm exec grove sync github
|
|
24
|
-
env:
|
|
25
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
-
- uses: peter-evans/create-pull-request@v6
|
|
27
|
-
with:
|
|
28
|
-
commit-message: "chore(data): sync GitHub metadata"
|
|
29
|
-
title: "Sync GitHub metadata"
|
|
30
|
-
branch: chore/sync-github
|
|
31
|
-
delete-branch: true
|