@greatstore/cli 0.1.3 → 0.1.4
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/CHANGELOG.md +17 -0
- package/dist/cli.js +246 -7
- package/dist/gs-skill/references/store-admin.md +11 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to `@greatstore/cli` are recorded here. The format
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/).
|
|
5
5
|
|
|
6
|
+
## 0.1.4 — 2026-09-12
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- Edit one theme field at a time: `gs configure set --theme.fontFamily Manrope
|
|
10
|
+
--theme.radius sharp`. Theme writes merge into the stored theme, so a
|
|
11
|
+
one-field change no longer means retyping the whole object (and no longer
|
|
12
|
+
drops the keys you left out). `--replace` writes a theme outright.
|
|
13
|
+
- `gs configure set --help` prints every field it accepts with its type and
|
|
14
|
+
legal values, and a mistyped field name or value is now rejected with the
|
|
15
|
+
valid list before anything is sent.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Rejected configuration writes say what was wrong with them — the field and
|
|
19
|
+
the values it accepts — instead of "Request rejected."
|
|
20
|
+
- Commands no longer wait on a version check every run, which takes about half
|
|
21
|
+
a second off each one.
|
|
22
|
+
|
|
6
23
|
## 0.1.3 — 2026-09-12
|
|
7
24
|
|
|
8
25
|
### Changed
|
package/dist/cli.js
CHANGED
|
@@ -442,7 +442,7 @@ async function sendOnce(url, options, accessToken) {
|
|
|
442
442
|
} catch {
|
|
443
443
|
}
|
|
444
444
|
const identifier = parsed.code ?? parsed.error;
|
|
445
|
-
const message = buildErrorMessage(res.status, identifier, parsed.detail);
|
|
445
|
+
const message = options.validationDetail && res.status === 400 && parsed.error ? parsed.error : buildErrorMessage(res.status, identifier, parsed.detail);
|
|
446
446
|
throw new HttpError(res.status, message, parsed.code ?? parsed.error);
|
|
447
447
|
}
|
|
448
448
|
var KNOWN_ERROR_MESSAGES = {
|
|
@@ -711,6 +711,164 @@ function realPath(p) {
|
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
+
// src/commands/configure/theme-fields.ts
|
|
715
|
+
var THEME_FIELDS = {
|
|
716
|
+
mode: {
|
|
717
|
+
kind: "string",
|
|
718
|
+
values: ["auto", "light", "dark", "custom"],
|
|
719
|
+
help: "Color scheme. `auto` follows the shopper's system preference.",
|
|
720
|
+
brandVisible: true
|
|
721
|
+
},
|
|
722
|
+
radius: {
|
|
723
|
+
kind: "string",
|
|
724
|
+
values: ["sharp", "default", "rounded"],
|
|
725
|
+
help: "Corner rounding preset applied to every surface.",
|
|
726
|
+
brandVisible: true
|
|
727
|
+
},
|
|
728
|
+
panelPosition: {
|
|
729
|
+
kind: "string",
|
|
730
|
+
values: ["left", "right", "middle"],
|
|
731
|
+
help: "Where the chat panel sits on desktop.",
|
|
732
|
+
brandVisible: true
|
|
733
|
+
},
|
|
734
|
+
fontFamily: {
|
|
735
|
+
kind: "string",
|
|
736
|
+
help: "Primary font family name.",
|
|
737
|
+
brandVisible: true
|
|
738
|
+
},
|
|
739
|
+
secondaryFontFamily: {
|
|
740
|
+
kind: "string",
|
|
741
|
+
help: "Font family for the assistant's chat bubbles.",
|
|
742
|
+
brandVisible: true
|
|
743
|
+
},
|
|
744
|
+
mobileBottomBar: {
|
|
745
|
+
kind: "boolean",
|
|
746
|
+
help: "Show the compact bottom bar on mobile.",
|
|
747
|
+
brandVisible: true
|
|
748
|
+
},
|
|
749
|
+
zIndex: {
|
|
750
|
+
kind: "integer",
|
|
751
|
+
help: "Stacking order of the chat panel on the host page."
|
|
752
|
+
},
|
|
753
|
+
brandColor: { kind: "color", help: "Accent color.", brandVisible: true },
|
|
754
|
+
surfaceColor: { kind: "color", help: "Background color.", brandVisible: true },
|
|
755
|
+
textColor: { kind: "color", help: "Text color.", brandVisible: true },
|
|
756
|
+
surface: { kind: "color", help: "Panel background." },
|
|
757
|
+
surfaceSecondary: { kind: "color", help: "Secondary background." },
|
|
758
|
+
surfaceAccent: { kind: "color", help: "Accented background." },
|
|
759
|
+
surfaceHover: { kind: "color", help: "Hovered background." },
|
|
760
|
+
foreground: { kind: "color", help: "Body text." },
|
|
761
|
+
foregroundSecondary: { kind: "color", help: "Secondary text." },
|
|
762
|
+
foregroundMuted: { kind: "color", help: "Muted text." },
|
|
763
|
+
foregroundAccent: { kind: "color", help: "Accented text." },
|
|
764
|
+
border: { kind: "color", help: "Border color." },
|
|
765
|
+
borderFocus: { kind: "color", help: "Focus-ring color." },
|
|
766
|
+
primary: { kind: "color", help: "Primary button background." },
|
|
767
|
+
primaryForeground: { kind: "color", help: "Primary button text." },
|
|
768
|
+
primaryHover: { kind: "color", help: "Primary button hover." },
|
|
769
|
+
primaryMuted: { kind: "color", help: "Muted primary background." },
|
|
770
|
+
primaryMutedForeground: { kind: "color", help: "Muted primary text." },
|
|
771
|
+
primaryTint: { kind: "color", help: "Primary tint wash." },
|
|
772
|
+
link: { kind: "color", help: "Link color." }
|
|
773
|
+
};
|
|
774
|
+
function suggestThemeFields(input) {
|
|
775
|
+
const target = input.toLowerCase();
|
|
776
|
+
return Object.keys(THEME_FIELDS).map((name) => {
|
|
777
|
+
const lower = name.toLowerCase();
|
|
778
|
+
return {
|
|
779
|
+
name,
|
|
780
|
+
distance: editDistance(target, lower),
|
|
781
|
+
prefix: commonPrefixLength(target, lower)
|
|
782
|
+
};
|
|
783
|
+
}).filter(
|
|
784
|
+
({ name, distance, prefix }) => distance <= Math.max(2, name.length / 3) || prefix >= 4
|
|
785
|
+
).sort((a, b) => b.prefix - a.prefix || a.distance - b.distance).slice(0, 3).map(({ name }) => name);
|
|
786
|
+
}
|
|
787
|
+
function commonPrefixLength(a, b) {
|
|
788
|
+
let i = 0;
|
|
789
|
+
while (i < a.length && i < b.length && a[i] === b[i]) i++;
|
|
790
|
+
return i;
|
|
791
|
+
}
|
|
792
|
+
function editDistance(a, b) {
|
|
793
|
+
let prev = Array.from({ length: b.length + 1 }, (_, i) => i);
|
|
794
|
+
for (let i = 1; i <= a.length; i++) {
|
|
795
|
+
const row = [i];
|
|
796
|
+
for (let j = 1; j <= b.length; j++) {
|
|
797
|
+
row[j] = Math.min(
|
|
798
|
+
(prev[j] ?? 0) + 1,
|
|
799
|
+
(row[j - 1] ?? 0) + 1,
|
|
800
|
+
(prev[j - 1] ?? 0) + (a[i - 1] === b[j - 1] ? 0 : 1)
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
prev = row;
|
|
804
|
+
}
|
|
805
|
+
return prev[b.length] ?? 0;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
// src/commands/configure/help.ts
|
|
809
|
+
var CONFIGURE_HELP = `gs configure \u2014 view and edit a store's configuration.
|
|
810
|
+
|
|
811
|
+
Usage:
|
|
812
|
+
gs configure Show the current configuration.
|
|
813
|
+
gs configure set --<field> <value> Save one or more fields.
|
|
814
|
+
gs configure upload <kind> <file> Upload icon / logoLight / logoDark.
|
|
815
|
+
gs configure clear <kind> Remove an uploaded asset.
|
|
816
|
+
|
|
817
|
+
Run \`gs configure set --help\` for the full field list.
|
|
818
|
+
|
|
819
|
+
Flags:
|
|
820
|
+
--store <slug> Which store to act on (default: nearest .gsrc).
|
|
821
|
+
--json Machine-readable output.
|
|
822
|
+
`;
|
|
823
|
+
function themeFieldLines() {
|
|
824
|
+
const rows = Object.entries(THEME_FIELDS).map(([name, field]) => {
|
|
825
|
+
const type = field.values ? field.values.join(" | ") : field.kind === "color" ? "<css color>" : field.kind === "boolean" ? "true | false" : field.kind === "integer" ? "<integer>" : "<name>";
|
|
826
|
+
return { flag: ` --theme.${name} ${type}`, help: field.help };
|
|
827
|
+
});
|
|
828
|
+
const width = Math.max(...rows.map((r) => r.flag.length)) + 2;
|
|
829
|
+
return rows.map((r) => `${r.flag.padEnd(width)}${r.help}`).join("\n");
|
|
830
|
+
}
|
|
831
|
+
function brandVisibleNames() {
|
|
832
|
+
return Object.entries(THEME_FIELDS).filter(([, field]) => field.brandVisible).map(([name]) => name).join(", ");
|
|
833
|
+
}
|
|
834
|
+
function configureSetHelp() {
|
|
835
|
+
return `gs configure set \u2014 save configuration fields.
|
|
836
|
+
|
|
837
|
+
Only the fields you pass are written; everything else is left alone. Pass an
|
|
838
|
+
empty value to clear a field (e.g. --displayName "").
|
|
839
|
+
|
|
840
|
+
Store fields:
|
|
841
|
+
--displayName <text> Store name shown to shoppers.
|
|
842
|
+
--assistantName <text> What the assistant calls itself.
|
|
843
|
+
--storeLink <url> Where "visit the store" points.
|
|
844
|
+
--extraOrigins <a,b,c> Extra origins allowed to embed the widget.
|
|
845
|
+
--cspScriptHosts <a,b,c> Extra script hosts to allow.
|
|
846
|
+
--cspConnectHosts <a,b,c> Extra connect hosts to allow.
|
|
847
|
+
|
|
848
|
+
Theme fields (merge into the stored theme):
|
|
849
|
+
${themeFieldLines()}
|
|
850
|
+
|
|
851
|
+
Whole-object theme writes:
|
|
852
|
+
--theme '<json>' Merge this JSON object into the stored theme.
|
|
853
|
+
--themeFile <path> Same, read from a file.
|
|
854
|
+
--replace Replace the theme outright instead of merging.
|
|
855
|
+
--theme "" Clear the theme entirely.
|
|
856
|
+
|
|
857
|
+
These are shopper-visible, so confirm them with the merchant before writing:
|
|
858
|
+
${brandVisibleNames()}
|
|
859
|
+
|
|
860
|
+
Examples:
|
|
861
|
+
gs configure set --theme.fontFamily Manrope --theme.radius sharp
|
|
862
|
+
gs configure set --theme.brandColor "#1e1d66"
|
|
863
|
+
gs configure set --theme '{"mode":"dark"}' --replace
|
|
864
|
+
`;
|
|
865
|
+
}
|
|
866
|
+
function configureHelp(sub) {
|
|
867
|
+
if (sub === void 0 || sub === "show") return CONFIGURE_HELP;
|
|
868
|
+
if (sub === "set") return configureSetHelp();
|
|
869
|
+
return void 0;
|
|
870
|
+
}
|
|
871
|
+
|
|
714
872
|
// src/commands/apps/init.ts
|
|
715
873
|
import * as fs4 from "fs";
|
|
716
874
|
import * as path5 from "path";
|
|
@@ -747,7 +905,7 @@ function applyTemplate(content, vars) {
|
|
|
747
905
|
}
|
|
748
906
|
|
|
749
907
|
// src/version.ts
|
|
750
|
-
var CLI_VERSION = true ? "0.1.
|
|
908
|
+
var CLI_VERSION = true ? "0.1.4" : "0.0.0-dev";
|
|
751
909
|
|
|
752
910
|
// src/commands/apps/init.ts
|
|
753
911
|
var NAME_REGEX = /^[a-z][a-z0-9_]*$/;
|
|
@@ -2309,6 +2467,7 @@ function formatList(list) {
|
|
|
2309
2467
|
// src/commands/configure/set.ts
|
|
2310
2468
|
import * as fs10 from "fs";
|
|
2311
2469
|
import * as path12 from "path";
|
|
2470
|
+
var THEME_FLAG_PREFIX = "theme.";
|
|
2312
2471
|
var TEXT_FIELDS = [
|
|
2313
2472
|
"displayName",
|
|
2314
2473
|
"assistantName",
|
|
@@ -2338,17 +2497,36 @@ async function setConfig(args) {
|
|
|
2338
2497
|
body[field] = entries.length === 0 ? null : entries;
|
|
2339
2498
|
}
|
|
2340
2499
|
const themeFile = flagString(args.flags, "themeFile");
|
|
2500
|
+
const perField = collectThemeFieldFlags(args.flags);
|
|
2501
|
+
const replace = flagBool(args.flags, "replace");
|
|
2341
2502
|
if ("theme" in args.flags && themeFile !== void 0) {
|
|
2342
2503
|
throw new Error("Pass either --theme or --themeFile, not both.");
|
|
2343
2504
|
}
|
|
2505
|
+
if (perField !== null && ("theme" in args.flags || themeFile !== void 0)) {
|
|
2506
|
+
throw new Error(
|
|
2507
|
+
"Pass either --theme.<field> flags or a whole --theme/--themeFile object, not both."
|
|
2508
|
+
);
|
|
2509
|
+
}
|
|
2510
|
+
let themePatch;
|
|
2344
2511
|
if ("theme" in args.flags) {
|
|
2345
2512
|
const v = args.flags["theme"];
|
|
2346
2513
|
if (typeof v !== "string") {
|
|
2347
2514
|
throw new Error('--theme requires a JSON value (use --theme "" to clear).');
|
|
2348
2515
|
}
|
|
2349
|
-
|
|
2516
|
+
themePatch = v === "" ? null : parseThemeJson(v, "--theme");
|
|
2350
2517
|
} else if (themeFile !== void 0) {
|
|
2351
|
-
|
|
2518
|
+
themePatch = parseThemeJson(readTextFile(themeFile, "--themeFile"), "--themeFile");
|
|
2519
|
+
} else if (perField !== null) {
|
|
2520
|
+
themePatch = perField;
|
|
2521
|
+
}
|
|
2522
|
+
if (themePatch !== void 0) {
|
|
2523
|
+
body["theme"] = themePatch === null || replace ? themePatch : { ...await readStoredTheme(slug), ...themePatch };
|
|
2524
|
+
if (body["theme"] !== null) {
|
|
2525
|
+
const merged = body["theme"];
|
|
2526
|
+
for (const [key, value] of Object.entries(merged)) {
|
|
2527
|
+
if (value === "") delete merged[key];
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2352
2530
|
}
|
|
2353
2531
|
if (Object.keys(body).length === 0) {
|
|
2354
2532
|
throw new Error(
|
|
@@ -2358,7 +2536,10 @@ async function setConfig(args) {
|
|
|
2358
2536
|
const url = `${adminApiBase(slug)}/configure/save`;
|
|
2359
2537
|
const data = await request(url, {
|
|
2360
2538
|
method: "POST",
|
|
2361
|
-
body
|
|
2539
|
+
body,
|
|
2540
|
+
// Every 400 from this endpoint names the offending field and the values
|
|
2541
|
+
// it accepts — worth far more to the caller than "Request rejected."
|
|
2542
|
+
validationDetail: true
|
|
2362
2543
|
});
|
|
2363
2544
|
if (flagBool(args.flags, "json")) {
|
|
2364
2545
|
process.stdout.write(JSON.stringify(data.config, null, 2) + "\n");
|
|
@@ -2386,6 +2567,59 @@ function parseThemeJson(raw, flag) {
|
|
|
2386
2567
|
}
|
|
2387
2568
|
return parsed;
|
|
2388
2569
|
}
|
|
2570
|
+
async function readStoredTheme(slug) {
|
|
2571
|
+
const url = `${adminApiBase(slug)}/configure/config`;
|
|
2572
|
+
const data = await request(url);
|
|
2573
|
+
return data.brand.theme ?? {};
|
|
2574
|
+
}
|
|
2575
|
+
function collectThemeFieldFlags(flags) {
|
|
2576
|
+
const patch = {};
|
|
2577
|
+
for (const [flag, raw] of Object.entries(flags)) {
|
|
2578
|
+
if (!flag.startsWith(THEME_FLAG_PREFIX)) continue;
|
|
2579
|
+
const name = flag.slice(THEME_FLAG_PREFIX.length);
|
|
2580
|
+
const field = THEME_FIELDS[name];
|
|
2581
|
+
if (!field) {
|
|
2582
|
+
const suggestions = suggestThemeFields(name);
|
|
2583
|
+
throw new Error(
|
|
2584
|
+
`Unknown theme field "${name}".
|
|
2585
|
+
Valid fields: ${Object.keys(THEME_FIELDS).join(", ")}.` + (suggestions.length > 0 ? `
|
|
2586
|
+
Did you mean: ${suggestions.join(", ")}?` : "")
|
|
2587
|
+
);
|
|
2588
|
+
}
|
|
2589
|
+
if (typeof raw !== "string") {
|
|
2590
|
+
if (field.kind === "boolean") {
|
|
2591
|
+
patch[name] = true;
|
|
2592
|
+
continue;
|
|
2593
|
+
}
|
|
2594
|
+
throw new Error(`--${flag} requires a value (use --${flag} "" to clear).`);
|
|
2595
|
+
}
|
|
2596
|
+
patch[name] = coerceThemeValue(flag, name, raw);
|
|
2597
|
+
}
|
|
2598
|
+
return Object.keys(patch).length > 0 ? patch : null;
|
|
2599
|
+
}
|
|
2600
|
+
function coerceThemeValue(flag, name, raw) {
|
|
2601
|
+
const field = THEME_FIELDS[name];
|
|
2602
|
+
if (!field || raw === "") return raw;
|
|
2603
|
+
if (field.values && !field.values.includes(raw)) {
|
|
2604
|
+
throw new Error(
|
|
2605
|
+
`--${flag} must be one of: ${field.values.join(", ")} (got "${raw}").`
|
|
2606
|
+
);
|
|
2607
|
+
}
|
|
2608
|
+
if (field.kind === "boolean") {
|
|
2609
|
+
if (raw !== "true" && raw !== "false") {
|
|
2610
|
+
throw new Error(`--${flag} must be true or false (got "${raw}").`);
|
|
2611
|
+
}
|
|
2612
|
+
return raw === "true";
|
|
2613
|
+
}
|
|
2614
|
+
if (field.kind === "integer") {
|
|
2615
|
+
const n = Number.parseInt(raw, 10);
|
|
2616
|
+
if (!Number.isInteger(n) || String(n) !== raw.trim()) {
|
|
2617
|
+
throw new Error(`--${flag} must be an integer (got "${raw}").`);
|
|
2618
|
+
}
|
|
2619
|
+
return n;
|
|
2620
|
+
}
|
|
2621
|
+
return raw;
|
|
2622
|
+
}
|
|
2389
2623
|
|
|
2390
2624
|
// src/commands/configure/upload.ts
|
|
2391
2625
|
import * as fs11 from "fs";
|
|
@@ -2752,6 +2986,7 @@ var REFRESH_COMMAND = "__refresh-version-cache";
|
|
|
2752
2986
|
var PKG = "@greatstore/cli";
|
|
2753
2987
|
var REGISTRY_URL = `https://registry.npmjs.org/${PKG}/latest`;
|
|
2754
2988
|
var FETCH_TIMEOUT_MS = 5e3;
|
|
2989
|
+
var CACHE_TTL_MS = 10 * 60 * 1e3;
|
|
2755
2990
|
var OutdatedCliError = class extends Error {
|
|
2756
2991
|
constructor(current, latest) {
|
|
2757
2992
|
super(
|
|
@@ -2773,6 +3008,7 @@ async function assertUpToDate(current, opts = {}) {
|
|
|
2773
3008
|
if (cached && compareSemver(cached.latest, current) > 0) {
|
|
2774
3009
|
throw new OutdatedCliError(current, cached.latest);
|
|
2775
3010
|
}
|
|
3011
|
+
if (cached && now() - cached.checkedAt < CACHE_TTL_MS) return;
|
|
2776
3012
|
const fresh = await fetcher();
|
|
2777
3013
|
if (fresh) {
|
|
2778
3014
|
writeCache(home, { latest: fresh, checkedAt: now() });
|
|
@@ -2847,7 +3083,7 @@ function parseVer(v) {
|
|
|
2847
3083
|
}
|
|
2848
3084
|
|
|
2849
3085
|
// src/index.ts
|
|
2850
|
-
var CHANGELOG = true ? "# Changelog\n\nAll notable changes to `@greatstore/cli` are recorded here. The format\nfollows [Keep a Changelog](https://keepachangelog.com/).\n\n## 0.1.3 \u2014 2026-09-12\n\n### Changed\n- `gs skill` prints the steps for installing the GreatStore agent skill\n instead of installing it itself, so any AI coding agent can set it up in\n whichever skills directory it uses \u2014 no `--global` or `--dir` to pick.\n- The installed skill is a link to the copy that ships with the CLI, so\n upgrading `@greatstore/cli` keeps it current with nothing to re-run.\n\n## 0.1.2 \u2014 2026-09-04\n\n### Fixed\n- `gs apps pull` now downloads components that aren't published yet. Pulling\n one used to report that it wasn't found on the server.\n\n## 0.1.1 \u2014 2026-08-20\n\n### Changed\n- Signing in now asks you to authorize the store you picked before the CLI\n gets access to it, and that access can be ended anytime from **Team \u2192 CLI\n access** in the dashboard. Ending it there signs this computer out on its\n next command.\n- For each store, you're signed in on one computer at a time. Signing in to\n that store again from another machine replaces the previous one, which then\n has to sign in again; your other stores are unaffected.\n- This release is required: earlier versions no longer work. Run\n `npm install -g @greatstore/cli` to upgrade.\n\n## 0.1.0 \u2014 2026-08-19\n\n### Changed\n- When a component's `inputSchema` declares fields the component doesn't\n accept, validation now reports them on a single line \u2014 naming the fields\n (capped, with a `(+N more)` count past that) \u2014 instead of one error per\n field. A schema/component mismatch stays readable instead of burying the\n other diagnostics.\n\n## 0.0.48 \u2014 2026-08-19\n\n### Changed\n- Component validation now warns when a component reaches for the page-level\n `window.GreatStore` API. Components should interact with GreatStore through\n the lifecycle props passed into them (`onSendMessage`, `onCallTool`,\n `onGenerateStructuredContent`, \u2026), which are wired to the surface the\n component is mounted in; the warning points you there. It's a nudge, not a\n build failure.\n\n## 0.0.47 \u2014 2026-08-18\n\n### Changed\n- `onGenerateStructuredContent` now takes a required third argument,\n `fallback` \u2014 a schema-shaped object you supply. The component preview\n renders it (there's no live store to generate against there), so a\n generation-driven component previews as it would live. It's validated\n against the schema and throws if the two don't line up.\n\n## 0.0.46 \u2014 2026-08-18\n\n### Added\n- Components now receive an `onGenerateStructuredContent(schema, prompt)`\n prop: ask the store's assistant for content matching a JSON Schema (or a\n Zod schema) and render what it returns, personalized to the shopper. It\n works the same in the conversation on the storefront and every embed.\n Added to the component template, the scaffolded `AGENTS.md` reference, and\n prop validation.\n\n## 0.0.45 \u2014 2026-08-18\n\n### Changed\n- The auto-generated `AGENTS.md` banner now records the CLI version that\n wrote it, so you can tell at a glance when it trails your installed CLI\n and a `gs apps init` refresh is due.\n\n## 0.0.44 \u2014 2026-08-18\n\n### Added\n- New check: a component that still declares `onError` gets a warning\n pointing at the async-component pattern that replaced it, with the\n throw-vs-fallback caveat (a throw asks the assistant to retry, so\n permanent failures should render a fallback rather than throw). Earlier\n this surfaced as the generic \"prop isn't declared in the schema\"\n warning, whose suggested fix was wrong for a former lifecycle callback.\n\n### Changed\n- `gs apps init` now always refreshes `AGENTS.md` (the agent guidance\n file) so it tracks the installed CLI version instead of going stale.\n The file carries a \"do not edit \u2014 auto-generated\" banner; your own\n project files are still left untouched.\n\n## 0.0.43 \u2014 2026-08-18\n\n### Added\n- `gs apps build` and `gs apps push` now check each component before\n building or uploading it. Findings are reported as **errors** (a\n blocker \u2014 the component isn't built or uploaded) or **warnings** (it\n builds and is ready to publish, but something is worth improving),\n and a single run reports everything it found rather than stopping at\n the first problem.\n- New check: a component's props and its `inputSchema.properties` must\n agree. A schema field the component doesn't accept is an error; a prop\n the schema doesn't declare is a warning, since nothing will ever pass\n it. The props GreatStore injects (`onSendMessage`, `onCallTool`,\n `onUpdateModelContext`, `onShowLightbox`, `onClose`, `storeData`,\n `Image`) are exempt.\n\n## 0.0.42 \u2014 2026-08-15\n\n### Changed\n- `gs apps list` now works outside a project. With no `.gsrc` it lists the\n components of the store you're signed in to, instead of erroring. The\n commands that write files or change the store \u2014 `push`, `pull`, `publish`,\n `unpublish`, `delete` \u2014 still require a project.\n\n## 0.0.41 \u2014 2026-08-14\n\n### Changed\n- Internal authentication rework. Re-run `gs login` after updating.\n\n## 0.0.40 \u2014 2026-07-24\n\n### Removed\n- `gs configure set` no longer accepts `--salesGuide` or\n `--salesGuideFile`, and `gs configure show` no longer lists the field.\n\n## 0.0.39 \u2014 2026-07-21\n\n### Added\n- Components now receive an `Image` prop \u2014 a drop-in for `<img>` that\n serves images at the size they're displayed. Render `<Image src=\u2026 />`\n instead of `<img>`; pass `Image={\"img\"}` to preview a component\n outside a store. Scaffolded into `gs apps init` and documented in\n `AGENTS.md`.\n\n## 0.0.38 \u2014 2026-07-13\n\n### Added\n- `gs login --store <slug>` skips the store picker and signs in\n directly to that store \u2014 fails immediately if your account doesn't\n have access to it, instead of falling back to the picker.\n\n## 0.0.37 \u2014 2026-07-10\n\n### Added\n- Signing in now ends by choosing which store to work on \u2014 skipped\n automatically when your account has exactly one. Commands default to\n that store, so `--store` is rarely needed anymore.\n- `gs switch [<slug>]` changes the working store without signing in\n again.\n- `gs apps init` no longer requires `--store` when your sign-in already\n selected a store.\n\n### Changed\n- A `--store` flag or project `.gsrc` that names a different store than\n the one you signed in to is now an error, so work can't accidentally\n target the wrong store. Run `gs switch` to change stores.\n\n## 0.0.33 \u2014 2026-07-10\n\n### Changed\n- `gs apps push` now rejects a component whose `inputSchema` is too\n complex for the assistant to call reliably: union keywords\n (`anyOf`/`oneOf`/`allOf`/`$ref`/`not`), more than 8 KB serialized, or\n more than 50 declared fields. Keep schemas to a small set of flat,\n single-type fields \u2014 one canonical name per concept \u2014 and handle\n aliases or edge cases in component code instead.\n\n## 0.0.32 \u2014 2026-06-18\n\n### Added\n- Chat components can expand an image into a full-screen, on-brand\n lightbox via a new `onShowLightbox({ src, originRect })` prop. Wire it\n to an image's `onClick` \u2014 pass the image URL and, for a smooth zoom,\n the clicked element's `getBoundingClientRect()`. Use it for product\n photos, swatches, or size charts the shopper may want to inspect up\n close, instead of building your own overlay.\n\n## 0.0.31 \u2014 2026-06-18\n\n### Added\n- Components can read a secondary brand font from `--font-secondary`,\n for a second layer of typography. Falls back to the primary font.\n\n### Changed\n- The brand font variable is now `--font-primary` (was `--font-sans`).\n\n## 0.0.30 \u2014 2026-06-17\n\n### Added\n- The agent skill documents a new way to give the assistant background\n context without sending a visible message:\n `window.GreatStore.updateModelContext(text)` on the page, and the\n matching `onUpdateModelContext(text)` prop inside a chat component. Use\n it to keep the assistant aware of what the shopper is doing \u2014 the\n product they're viewing, what's in their cart, the variant they just\n selected \u2014 so its replies stay on point. Each call replaces the previous\n value, and nothing renders in the chat.\n\n## 0.0.29 \u2014 2026-06-12\n\n### Fixed\n- The \"update available\" notice actually fires now. It previously raced\n a 1-second timeout against the npm registry and usually lost, so most\n installs never saw it. The notice is now served instantly from a local\n cache, refreshed in the background after each day's first invocation \u2014\n it can lag one run behind a release, but it no longer adds latency or\n goes silent on slow networks.\n\n## 0.0.28 \u2014 2026-06-12\n\n### Added\n- `gs configure` \u2014 view and edit the store configuration from the CLI:\n display name, assistant name, sales guide, store link, extra origins,\n theme, CSP host lists, and icon/logo uploads. Same fields and\n behaviour as the dashboard's Configure panel.\n- `gs connectors` \u2014 manage the store's MCP connectors: list, add (with\n a discovery probe before saving), remove, enable/disable, toggle the\n Maker MCP, and health-check. Same behaviour as the dashboard's\n Connectors panel.\n- `--store <slug>` on the new admin commands, so they work outside a\n scaffolded component project (a `.gsrc` is still used when present).\n- The agent skill gains a store-administration reference: coding agents\n can read the store's configuration and connectors to ground their\n work, self-serve additive changes like origin allowlists and CSP\n hosts (read-merge-write), and are told which changes need the\n merchant's go-ahead first.\n\n### Changed\n- Component commands now live under `gs apps` (`gs apps push`,\n `gs apps build`, \u2026), matching the dashboard's Apps panel. The old\n top-level forms keep working as aliases, so existing scripts and\n scaffolded projects are unaffected.\n- The skill's structured-content guide now teaches \"point, don't\n paste\": name the SKU/product/collection and let GreatStore research\n the catalog itself instead of inlining fetched specs; validate with\n `gs connectors` that a connector exists for the data a prompt or\n schema depends on (research can't exceed the wired-up connectors);\n and never put shopper data in prompts \u2014 GreatStore already knows the\n shopper, and identified shoppers get per-shopper cached responses.\n\n## 0.0.27 \u2014 2026-06-11\n\n### Changed\n- Skill code samples now carry an explicit reference-only disclaimer:\n coding agents are told to re-express the logic in the host repo's\n framework (React, Vue, Shopify Liquid, Svelte, \u2026) instead of\n retrofitting the framework-free samples as-is.\n\n## 0.0.26 \u2014 2026-06-11\n\n### Added\n- The agent skill gains a \"GreatStore launchers\" recipe: a horizontally\n scrollable row of AI-generated chips, each an engaging first-person\n question about the current page that's sent to the assistant on tap.\n\n### Changed\n- Skill recipes are now one file each under `recipes/`, indexed from\n SKILL.md by a table with description and use-case columns.\n\n## 0.0.25 \u2014 2026-06-11\n\n### Added\n- `gs skill` installs the GreatStore agent skill \u2014 a guide AI coding\n agents use to build with GreatStore: AI content for your own UI, chat\n entry points, page tools, custom in-chat components, push\n notifications, and the store's MCP endpoints. Installs into\n `./.claude/skills/`; use `--global` for `~/.claude/skills/`, or\n `--dir <path>` for agents that read skills from somewhere else. Run\n it again any time to update an installed copy.\n\n## 0.0.24 \u2014 2026-06-03\n\n### Changed\n- `gs init` in an existing project now fills in any scaffold files that\n are missing (for example, the `AGENTS.md` design guide added in\n 0.0.23) and leaves your own files alone. Pass `--force` to refresh\n every scaffold file to the latest version. Your pinned store\n (`.gsrc`) is never rewritten either way.\n\n## 0.0.23 \u2014 2026-06-03\n\n### Added\n- `gs init` now scaffolds an `AGENTS.md` (with `CLAUDE.md` and\n `GEMINI.md` symlinked to it) documenting the design rules every\n component should follow \u2014 use `em` rather than `rem` for sizing, and\n style from the provided brand CSS variables so components match the\n store's theme. It doubles as guidance for AI coding agents.\n\n## 0.0.22 \u2014 2026-06-02\n\n### Added\n- `gs list` now shows a link to each component's page in the dashboard,\n so you can jump straight to a component to preview or publish it. The\n link is also included in `gs list --json`.\n\n## 0.0.21 \u2014 2026-05-31\n\n### Changed\n- The `gs init` component scaffold now shows how to write **async**\n components that load data before they render \u2014 including validating\n inputs up front and signalling a failure by throwing. The scaffolded\n component no longer includes an `onError` prop; throw from an async\n component to report a failure instead.\n\n## 0.0.20 \u2014 2026-05-29\n\n### Added\n- `gs pull`, `gs push`, and `gs publish` now accept several component\n names at once (e.g. `gs publish header footer cart`). Each component\n is reported on its own line and one failure no longer stops the rest.\n\n## 0.0.19 \u2014 2026-05-28\n\n### Fixed\n- `gs login` on Windows no longer opens a sign-in URL with parameters\n stripped, which surfaced as a \"Missing redirect_uri or state\n parameter\" page in the browser.\n\n## 0.0.18 \u2014 2026-05-28\n\n### Changed\n- Push and publish errors now name the specific reason \u2014 including\n every failing field in `manifest.json` \u2014 instead of the previous\n generic message.\n\n## 0.0.17 \u2014 2026-05-28\n\n### Added\n- Each command now prints a one-line upgrade notice when a newer\n `@greatstore/cli` is available on npm.\n\n## 0.0.16 \u2014 2026-05-28\n\n### Changed\n- Simplified error messages.\n\n## 0.0.15 \u2014 2026-05-24\n\n### Added\n- Scaffolded `component.tsx` now declares the four injected lifecycle\n props (`onSendMessage`, `onCallTool`, `onClose`, `onError`) on\n `Props`. Use `onError(message)` to report expected failures (failed\n fetch, host action rejected, invalid host state) so the AI can\n recover on its next turn. Render-time crashes are reported for you.\n\n## 0.0.14 \u2014 2026-05-24\n\n### Changed\n- `gs build` output is now whitespace-minified \u2014 typically ~50% smaller.\n\n## 0.0.13 \u2014 2026-05-24\n\n### Changed\n- `gs build` prints the next-step hint (`gs push`, then `gs publish`).\n\n## 0.0.12 \u2014 2026-05-24\n\n### Fixed\n- `gs build` failing to load Vite in some setups.\n\n## 0.0.11 \u2014 2026-05-24\n\n### Added\n- Multi-component projects. `gs init` (no args) scaffolds the project\n root; `gs init <name>` adds a component under `components/<name>/`.\n- `gs build [<name>]` \u2014 compiles every `components/<name>/bundle.js`.\n- `gs push` (no args) uploads only the components that changed.\n- `gs pull` (no args, or `*`) downloads every component. Locally\n edited components are skipped; pass `--force` to overwrite.\n- Public `CHANGELOG.md`; `gs --version` prints recent entries.\n\n### Changed\n- A project folder ships to exactly one store. Only `gs init` accepts\n `--store`; every other command reads the slug from `.gsrc`. The old\n single-component layout is rejected with a migration hint.\n- `gs init` requires `--store <slug>` for a fresh root, and rejects\n `--store` on an existing root.\n- `gs init` no longer writes `build.mjs` \u2014 scripts call `gs build`.\n\n## 0.0.10 \u2014 2026-05-23\n\n### Changed\n- The sign-in browser tab auto-closes once `gs login` finishes.\n\n## 0.0.9 \u2014 2026-05-23\n\n### Changed\n- Scaffolded manifests include a `displayName` so the admin UI has a\n friendlier label.\n\n## 0.0.8 \u2014 2026-05-23\n\n### Changed\n- `gs push` and `gs publish` print a link to view the component.\n\n## 0.0.6 \u2014 2026-05-23\n\n### Changed\n- `gs --version` reads from the published package version.\n\n## 0.0.4 \u2014 2026-05-23\n\n### Changed\n- Scaffolded projects produce browser-ready bundles out of the box.\n\n## 0.0.3 \u2014 2026-05-23\n\n### Changed\n- Trimmed public README to the essentials.\n\n## 0.0.2 \u2014 2026-05-23\n\n### Fixed\n- Sign-in callback parameter handling.\n" : "";
|
|
3086
|
+
var CHANGELOG = true ? "# Changelog\n\nAll notable changes to `@greatstore/cli` are recorded here. The format\nfollows [Keep a Changelog](https://keepachangelog.com/).\n\n## 0.1.4 \u2014 2026-09-12\n\n### Added\n- Edit one theme field at a time: `gs configure set --theme.fontFamily Manrope\n --theme.radius sharp`. Theme writes merge into the stored theme, so a\n one-field change no longer means retyping the whole object (and no longer\n drops the keys you left out). `--replace` writes a theme outright.\n- `gs configure set --help` prints every field it accepts with its type and\n legal values, and a mistyped field name or value is now rejected with the\n valid list before anything is sent.\n\n### Changed\n- Rejected configuration writes say what was wrong with them \u2014 the field and\n the values it accepts \u2014 instead of \"Request rejected.\"\n- Commands no longer wait on a version check every run, which takes about half\n a second off each one.\n\n## 0.1.3 \u2014 2026-09-12\n\n### Changed\n- `gs skill` prints the steps for installing the GreatStore agent skill\n instead of installing it itself, so any AI coding agent can set it up in\n whichever skills directory it uses \u2014 no `--global` or `--dir` to pick.\n- The installed skill is a link to the copy that ships with the CLI, so\n upgrading `@greatstore/cli` keeps it current with nothing to re-run.\n\n## 0.1.2 \u2014 2026-09-04\n\n### Fixed\n- `gs apps pull` now downloads components that aren't published yet. Pulling\n one used to report that it wasn't found on the server.\n\n## 0.1.1 \u2014 2026-08-20\n\n### Changed\n- Signing in now asks you to authorize the store you picked before the CLI\n gets access to it, and that access can be ended anytime from **Team \u2192 CLI\n access** in the dashboard. Ending it there signs this computer out on its\n next command.\n- For each store, you're signed in on one computer at a time. Signing in to\n that store again from another machine replaces the previous one, which then\n has to sign in again; your other stores are unaffected.\n- This release is required: earlier versions no longer work. Run\n `npm install -g @greatstore/cli` to upgrade.\n\n## 0.1.0 \u2014 2026-08-19\n\n### Changed\n- When a component's `inputSchema` declares fields the component doesn't\n accept, validation now reports them on a single line \u2014 naming the fields\n (capped, with a `(+N more)` count past that) \u2014 instead of one error per\n field. A schema/component mismatch stays readable instead of burying the\n other diagnostics.\n\n## 0.0.48 \u2014 2026-08-19\n\n### Changed\n- Component validation now warns when a component reaches for the page-level\n `window.GreatStore` API. Components should interact with GreatStore through\n the lifecycle props passed into them (`onSendMessage`, `onCallTool`,\n `onGenerateStructuredContent`, \u2026), which are wired to the surface the\n component is mounted in; the warning points you there. It's a nudge, not a\n build failure.\n\n## 0.0.47 \u2014 2026-08-18\n\n### Changed\n- `onGenerateStructuredContent` now takes a required third argument,\n `fallback` \u2014 a schema-shaped object you supply. The component preview\n renders it (there's no live store to generate against there), so a\n generation-driven component previews as it would live. It's validated\n against the schema and throws if the two don't line up.\n\n## 0.0.46 \u2014 2026-08-18\n\n### Added\n- Components now receive an `onGenerateStructuredContent(schema, prompt)`\n prop: ask the store's assistant for content matching a JSON Schema (or a\n Zod schema) and render what it returns, personalized to the shopper. It\n works the same in the conversation on the storefront and every embed.\n Added to the component template, the scaffolded `AGENTS.md` reference, and\n prop validation.\n\n## 0.0.45 \u2014 2026-08-18\n\n### Changed\n- The auto-generated `AGENTS.md` banner now records the CLI version that\n wrote it, so you can tell at a glance when it trails your installed CLI\n and a `gs apps init` refresh is due.\n\n## 0.0.44 \u2014 2026-08-18\n\n### Added\n- New check: a component that still declares `onError` gets a warning\n pointing at the async-component pattern that replaced it, with the\n throw-vs-fallback caveat (a throw asks the assistant to retry, so\n permanent failures should render a fallback rather than throw). Earlier\n this surfaced as the generic \"prop isn't declared in the schema\"\n warning, whose suggested fix was wrong for a former lifecycle callback.\n\n### Changed\n- `gs apps init` now always refreshes `AGENTS.md` (the agent guidance\n file) so it tracks the installed CLI version instead of going stale.\n The file carries a \"do not edit \u2014 auto-generated\" banner; your own\n project files are still left untouched.\n\n## 0.0.43 \u2014 2026-08-18\n\n### Added\n- `gs apps build` and `gs apps push` now check each component before\n building or uploading it. Findings are reported as **errors** (a\n blocker \u2014 the component isn't built or uploaded) or **warnings** (it\n builds and is ready to publish, but something is worth improving),\n and a single run reports everything it found rather than stopping at\n the first problem.\n- New check: a component's props and its `inputSchema.properties` must\n agree. A schema field the component doesn't accept is an error; a prop\n the schema doesn't declare is a warning, since nothing will ever pass\n it. The props GreatStore injects (`onSendMessage`, `onCallTool`,\n `onUpdateModelContext`, `onShowLightbox`, `onClose`, `storeData`,\n `Image`) are exempt.\n\n## 0.0.42 \u2014 2026-08-15\n\n### Changed\n- `gs apps list` now works outside a project. With no `.gsrc` it lists the\n components of the store you're signed in to, instead of erroring. The\n commands that write files or change the store \u2014 `push`, `pull`, `publish`,\n `unpublish`, `delete` \u2014 still require a project.\n\n## 0.0.41 \u2014 2026-08-14\n\n### Changed\n- Internal authentication rework. Re-run `gs login` after updating.\n\n## 0.0.40 \u2014 2026-07-24\n\n### Removed\n- `gs configure set` no longer accepts `--salesGuide` or\n `--salesGuideFile`, and `gs configure show` no longer lists the field.\n\n## 0.0.39 \u2014 2026-07-21\n\n### Added\n- Components now receive an `Image` prop \u2014 a drop-in for `<img>` that\n serves images at the size they're displayed. Render `<Image src=\u2026 />`\n instead of `<img>`; pass `Image={\"img\"}` to preview a component\n outside a store. Scaffolded into `gs apps init` and documented in\n `AGENTS.md`.\n\n## 0.0.38 \u2014 2026-07-13\n\n### Added\n- `gs login --store <slug>` skips the store picker and signs in\n directly to that store \u2014 fails immediately if your account doesn't\n have access to it, instead of falling back to the picker.\n\n## 0.0.37 \u2014 2026-07-10\n\n### Added\n- Signing in now ends by choosing which store to work on \u2014 skipped\n automatically when your account has exactly one. Commands default to\n that store, so `--store` is rarely needed anymore.\n- `gs switch [<slug>]` changes the working store without signing in\n again.\n- `gs apps init` no longer requires `--store` when your sign-in already\n selected a store.\n\n### Changed\n- A `--store` flag or project `.gsrc` that names a different store than\n the one you signed in to is now an error, so work can't accidentally\n target the wrong store. Run `gs switch` to change stores.\n\n## 0.0.33 \u2014 2026-07-10\n\n### Changed\n- `gs apps push` now rejects a component whose `inputSchema` is too\n complex for the assistant to call reliably: union keywords\n (`anyOf`/`oneOf`/`allOf`/`$ref`/`not`), more than 8 KB serialized, or\n more than 50 declared fields. Keep schemas to a small set of flat,\n single-type fields \u2014 one canonical name per concept \u2014 and handle\n aliases or edge cases in component code instead.\n\n## 0.0.32 \u2014 2026-06-18\n\n### Added\n- Chat components can expand an image into a full-screen, on-brand\n lightbox via a new `onShowLightbox({ src, originRect })` prop. Wire it\n to an image's `onClick` \u2014 pass the image URL and, for a smooth zoom,\n the clicked element's `getBoundingClientRect()`. Use it for product\n photos, swatches, or size charts the shopper may want to inspect up\n close, instead of building your own overlay.\n\n## 0.0.31 \u2014 2026-06-18\n\n### Added\n- Components can read a secondary brand font from `--font-secondary`,\n for a second layer of typography. Falls back to the primary font.\n\n### Changed\n- The brand font variable is now `--font-primary` (was `--font-sans`).\n\n## 0.0.30 \u2014 2026-06-17\n\n### Added\n- The agent skill documents a new way to give the assistant background\n context without sending a visible message:\n `window.GreatStore.updateModelContext(text)` on the page, and the\n matching `onUpdateModelContext(text)` prop inside a chat component. Use\n it to keep the assistant aware of what the shopper is doing \u2014 the\n product they're viewing, what's in their cart, the variant they just\n selected \u2014 so its replies stay on point. Each call replaces the previous\n value, and nothing renders in the chat.\n\n## 0.0.29 \u2014 2026-06-12\n\n### Fixed\n- The \"update available\" notice actually fires now. It previously raced\n a 1-second timeout against the npm registry and usually lost, so most\n installs never saw it. The notice is now served instantly from a local\n cache, refreshed in the background after each day's first invocation \u2014\n it can lag one run behind a release, but it no longer adds latency or\n goes silent on slow networks.\n\n## 0.0.28 \u2014 2026-06-12\n\n### Added\n- `gs configure` \u2014 view and edit the store configuration from the CLI:\n display name, assistant name, sales guide, store link, extra origins,\n theme, CSP host lists, and icon/logo uploads. Same fields and\n behaviour as the dashboard's Configure panel.\n- `gs connectors` \u2014 manage the store's MCP connectors: list, add (with\n a discovery probe before saving), remove, enable/disable, toggle the\n Maker MCP, and health-check. Same behaviour as the dashboard's\n Connectors panel.\n- `--store <slug>` on the new admin commands, so they work outside a\n scaffolded component project (a `.gsrc` is still used when present).\n- The agent skill gains a store-administration reference: coding agents\n can read the store's configuration and connectors to ground their\n work, self-serve additive changes like origin allowlists and CSP\n hosts (read-merge-write), and are told which changes need the\n merchant's go-ahead first.\n\n### Changed\n- Component commands now live under `gs apps` (`gs apps push`,\n `gs apps build`, \u2026), matching the dashboard's Apps panel. The old\n top-level forms keep working as aliases, so existing scripts and\n scaffolded projects are unaffected.\n- The skill's structured-content guide now teaches \"point, don't\n paste\": name the SKU/product/collection and let GreatStore research\n the catalog itself instead of inlining fetched specs; validate with\n `gs connectors` that a connector exists for the data a prompt or\n schema depends on (research can't exceed the wired-up connectors);\n and never put shopper data in prompts \u2014 GreatStore already knows the\n shopper, and identified shoppers get per-shopper cached responses.\n\n## 0.0.27 \u2014 2026-06-11\n\n### Changed\n- Skill code samples now carry an explicit reference-only disclaimer:\n coding agents are told to re-express the logic in the host repo's\n framework (React, Vue, Shopify Liquid, Svelte, \u2026) instead of\n retrofitting the framework-free samples as-is.\n\n## 0.0.26 \u2014 2026-06-11\n\n### Added\n- The agent skill gains a \"GreatStore launchers\" recipe: a horizontally\n scrollable row of AI-generated chips, each an engaging first-person\n question about the current page that's sent to the assistant on tap.\n\n### Changed\n- Skill recipes are now one file each under `recipes/`, indexed from\n SKILL.md by a table with description and use-case columns.\n\n## 0.0.25 \u2014 2026-06-11\n\n### Added\n- `gs skill` installs the GreatStore agent skill \u2014 a guide AI coding\n agents use to build with GreatStore: AI content for your own UI, chat\n entry points, page tools, custom in-chat components, push\n notifications, and the store's MCP endpoints. Installs into\n `./.claude/skills/`; use `--global` for `~/.claude/skills/`, or\n `--dir <path>` for agents that read skills from somewhere else. Run\n it again any time to update an installed copy.\n\n## 0.0.24 \u2014 2026-06-03\n\n### Changed\n- `gs init` in an existing project now fills in any scaffold files that\n are missing (for example, the `AGENTS.md` design guide added in\n 0.0.23) and leaves your own files alone. Pass `--force` to refresh\n every scaffold file to the latest version. Your pinned store\n (`.gsrc`) is never rewritten either way.\n\n## 0.0.23 \u2014 2026-06-03\n\n### Added\n- `gs init` now scaffolds an `AGENTS.md` (with `CLAUDE.md` and\n `GEMINI.md` symlinked to it) documenting the design rules every\n component should follow \u2014 use `em` rather than `rem` for sizing, and\n style from the provided brand CSS variables so components match the\n store's theme. It doubles as guidance for AI coding agents.\n\n## 0.0.22 \u2014 2026-06-02\n\n### Added\n- `gs list` now shows a link to each component's page in the dashboard,\n so you can jump straight to a component to preview or publish it. The\n link is also included in `gs list --json`.\n\n## 0.0.21 \u2014 2026-05-31\n\n### Changed\n- The `gs init` component scaffold now shows how to write **async**\n components that load data before they render \u2014 including validating\n inputs up front and signalling a failure by throwing. The scaffolded\n component no longer includes an `onError` prop; throw from an async\n component to report a failure instead.\n\n## 0.0.20 \u2014 2026-05-29\n\n### Added\n- `gs pull`, `gs push`, and `gs publish` now accept several component\n names at once (e.g. `gs publish header footer cart`). Each component\n is reported on its own line and one failure no longer stops the rest.\n\n## 0.0.19 \u2014 2026-05-28\n\n### Fixed\n- `gs login` on Windows no longer opens a sign-in URL with parameters\n stripped, which surfaced as a \"Missing redirect_uri or state\n parameter\" page in the browser.\n\n## 0.0.18 \u2014 2026-05-28\n\n### Changed\n- Push and publish errors now name the specific reason \u2014 including\n every failing field in `manifest.json` \u2014 instead of the previous\n generic message.\n\n## 0.0.17 \u2014 2026-05-28\n\n### Added\n- Each command now prints a one-line upgrade notice when a newer\n `@greatstore/cli` is available on npm.\n\n## 0.0.16 \u2014 2026-05-28\n\n### Changed\n- Simplified error messages.\n\n## 0.0.15 \u2014 2026-05-24\n\n### Added\n- Scaffolded `component.tsx` now declares the four injected lifecycle\n props (`onSendMessage`, `onCallTool`, `onClose`, `onError`) on\n `Props`. Use `onError(message)` to report expected failures (failed\n fetch, host action rejected, invalid host state) so the AI can\n recover on its next turn. Render-time crashes are reported for you.\n\n## 0.0.14 \u2014 2026-05-24\n\n### Changed\n- `gs build` output is now whitespace-minified \u2014 typically ~50% smaller.\n\n## 0.0.13 \u2014 2026-05-24\n\n### Changed\n- `gs build` prints the next-step hint (`gs push`, then `gs publish`).\n\n## 0.0.12 \u2014 2026-05-24\n\n### Fixed\n- `gs build` failing to load Vite in some setups.\n\n## 0.0.11 \u2014 2026-05-24\n\n### Added\n- Multi-component projects. `gs init` (no args) scaffolds the project\n root; `gs init <name>` adds a component under `components/<name>/`.\n- `gs build [<name>]` \u2014 compiles every `components/<name>/bundle.js`.\n- `gs push` (no args) uploads only the components that changed.\n- `gs pull` (no args, or `*`) downloads every component. Locally\n edited components are skipped; pass `--force` to overwrite.\n- Public `CHANGELOG.md`; `gs --version` prints recent entries.\n\n### Changed\n- A project folder ships to exactly one store. Only `gs init` accepts\n `--store`; every other command reads the slug from `.gsrc`. The old\n single-component layout is rejected with a migration hint.\n- `gs init` requires `--store <slug>` for a fresh root, and rejects\n `--store` on an existing root.\n- `gs init` no longer writes `build.mjs` \u2014 scripts call `gs build`.\n\n## 0.0.10 \u2014 2026-05-23\n\n### Changed\n- The sign-in browser tab auto-closes once `gs login` finishes.\n\n## 0.0.9 \u2014 2026-05-23\n\n### Changed\n- Scaffolded manifests include a `displayName` so the admin UI has a\n friendlier label.\n\n## 0.0.8 \u2014 2026-05-23\n\n### Changed\n- `gs push` and `gs publish` print a link to view the component.\n\n## 0.0.6 \u2014 2026-05-23\n\n### Changed\n- `gs --version` reads from the published package version.\n\n## 0.0.4 \u2014 2026-05-23\n\n### Changed\n- Scaffolded projects produce browser-ready bundles out of the box.\n\n## 0.0.3 \u2014 2026-05-23\n\n### Changed\n- Trimmed public README to the essentials.\n\n## 0.0.2 \u2014 2026-05-23\n\n### Fixed\n- Sign-in callback parameter handling.\n" : "";
|
|
2851
3087
|
var HELP = `gs \u2014 GreatStore CLI (v${CLI_VERSION})
|
|
2852
3088
|
|
|
2853
3089
|
Usage:
|
|
@@ -2863,6 +3099,8 @@ Account:
|
|
|
2863
3099
|
Store administration:
|
|
2864
3100
|
configure Show the store configuration.
|
|
2865
3101
|
configure set --<field> <val> Edit it (same fields as the admin Configure panel).
|
|
3102
|
+
\`gs configure set --help\` lists every field,
|
|
3103
|
+
including the theme fields and their values.
|
|
2866
3104
|
configure upload <kind> <file> Upload icon / logoLight / logoDark.
|
|
2867
3105
|
configure clear <kind> Remove an uploaded asset.
|
|
2868
3106
|
connectors List the store's MCP connectors.
|
|
@@ -2928,7 +3166,8 @@ async function main() {
|
|
|
2928
3166
|
return 0;
|
|
2929
3167
|
}
|
|
2930
3168
|
if (flagBool(parsed.flags, "help") || parsed.command === "help" || parsed.command === null) {
|
|
2931
|
-
|
|
3169
|
+
const specific = parsed.command === "configure" ? configureHelp(parsed.positional[0]) : void 0;
|
|
3170
|
+
process.stdout.write(specific ?? HELP);
|
|
2932
3171
|
return 0;
|
|
2933
3172
|
}
|
|
2934
3173
|
if (parsed.command !== null && APPS_ALIASES.has(parsed.command)) {
|
|
@@ -102,9 +102,19 @@ and confirm the result with a read.
|
|
|
102
102
|
gs configure [--json] show configuration
|
|
103
103
|
gs configure set --<field> <value> displayName, assistantName,
|
|
104
104
|
storeLink, extraOrigins a,b,
|
|
105
|
-
theme '<json>' (--themeFile <path>),
|
|
106
105
|
cspScriptHosts a,b, cspConnectHosts a,b
|
|
107
106
|
("" clears a field)
|
|
107
|
+
gs configure set --theme.<field> <value> one theme field, merged into the rest:
|
|
108
|
+
mode auto|light|dark|custom,
|
|
109
|
+
radius sharp|default|rounded,
|
|
110
|
+
panelPosition left|right|middle,
|
|
111
|
+
fontFamily, secondaryFontFamily,
|
|
112
|
+
mobileBottomBar true|false, zIndex,
|
|
113
|
+
brandColor/surfaceColor/textColor and
|
|
114
|
+
the fine-grained color tokens
|
|
115
|
+
gs configure set --theme '<json>' merge a whole object (--themeFile <path>);
|
|
116
|
+
--replace overwrites instead of merging
|
|
117
|
+
gs configure set --help every field, its type and legal values
|
|
108
118
|
gs configure upload <kind> <file> icon | logoLight | logoDark (.png/.jpg/.webp)
|
|
109
119
|
gs configure clear <kind> remove an uploaded asset
|
|
110
120
|
|