@genfeedai/cli 0.3.0 → 0.3.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/index.js +11 -11
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -29749,7 +29749,7 @@ var brandsCommand = new Command("brands").description("Manage brands").option("-
|
|
|
29749
29749
|
active: b.id === activeBrandId,
|
|
29750
29750
|
description: b.description,
|
|
29751
29751
|
id: b.id,
|
|
29752
|
-
|
|
29752
|
+
label: b.label
|
|
29753
29753
|
}))
|
|
29754
29754
|
});
|
|
29755
29755
|
return;
|
|
@@ -29764,7 +29764,7 @@ var brandsCommand = new Command("brands").description("Manage brands").option("-
|
|
|
29764
29764
|
for (const brand of brands) {
|
|
29765
29765
|
const isActive = brand.id === activeBrandId;
|
|
29766
29766
|
const marker = isActive ? source_default.green("●") : source_default.dim("○");
|
|
29767
|
-
const name = isActive ? source_default.bold(brand.
|
|
29767
|
+
const name = isActive ? source_default.bold(brand.label) : brand.label;
|
|
29768
29768
|
const activeLabel = isActive ? source_default.dim(" (active)") : "";
|
|
29769
29769
|
print(` ${marker} ${name}${activeLabel}`);
|
|
29770
29770
|
if (brand.description) {
|
|
@@ -29794,7 +29794,7 @@ brandsCommand.command("select").description("Select the active brand").action(as
|
|
|
29794
29794
|
const selected = await dist_default5({
|
|
29795
29795
|
choices: brands.map((brand) => ({
|
|
29796
29796
|
description: brand.description,
|
|
29797
|
-
name: brand.id === activeBrandId ? `${brand.
|
|
29797
|
+
name: brand.id === activeBrandId ? `${brand.label} (current)` : brand.label,
|
|
29798
29798
|
value: brand.id
|
|
29799
29799
|
})),
|
|
29800
29800
|
default: activeBrandId,
|
|
@@ -29803,7 +29803,7 @@ brandsCommand.command("select").description("Select the active brand").action(as
|
|
|
29803
29803
|
await setActiveBrand(selected);
|
|
29804
29804
|
const selectedBrand = brands.find((b) => b.id === selected);
|
|
29805
29805
|
print();
|
|
29806
|
-
print(formatSuccess(`Active brand: ${source_default.bold(selectedBrand?.
|
|
29806
|
+
print(formatSuccess(`Active brand: ${source_default.bold(selectedBrand?.label)}`));
|
|
29807
29807
|
} catch (error49) {
|
|
29808
29808
|
handleError(error49);
|
|
29809
29809
|
}
|
|
@@ -29829,12 +29829,12 @@ brandsCommand.command("current").description("Show the current active brand").op
|
|
|
29829
29829
|
activeBrand: {
|
|
29830
29830
|
description: brand.description,
|
|
29831
29831
|
id: brand.id,
|
|
29832
|
-
name: brand.
|
|
29832
|
+
name: brand.label
|
|
29833
29833
|
}
|
|
29834
29834
|
});
|
|
29835
29835
|
return;
|
|
29836
29836
|
}
|
|
29837
|
-
print(formatSuccess(`Active brand: ${source_default.bold(brand.
|
|
29837
|
+
print(formatSuccess(`Active brand: ${source_default.bold(brand.label)}`));
|
|
29838
29838
|
if (brand.description) {
|
|
29839
29839
|
print(formatLabel("Description", brand.description));
|
|
29840
29840
|
}
|
|
@@ -33665,12 +33665,12 @@ async function completeLogin(apiKey) {
|
|
|
33665
33665
|
print(formatWarning("No brands found. Create one at https://app.genfeed.ai"));
|
|
33666
33666
|
} else if (brands.length === 1) {
|
|
33667
33667
|
await setActiveBrand(brands[0].id);
|
|
33668
|
-
print(formatSuccess(`Active brand: ${source_default.bold(brands[0].
|
|
33668
|
+
print(formatSuccess(`Active brand: ${source_default.bold(brands[0].label)}`));
|
|
33669
33669
|
} else {
|
|
33670
33670
|
const selected = await dist_default5({
|
|
33671
33671
|
choices: brands.map((brand) => ({
|
|
33672
33672
|
description: brand.description,
|
|
33673
|
-
name: brand.
|
|
33673
|
+
name: brand.label,
|
|
33674
33674
|
value: brand.id
|
|
33675
33675
|
})),
|
|
33676
33676
|
message: "Select a brand:"
|
|
@@ -33678,7 +33678,7 @@ async function completeLogin(apiKey) {
|
|
|
33678
33678
|
await setActiveBrand(selected);
|
|
33679
33679
|
const selectedBrand = brands.find((b) => b.id === selected);
|
|
33680
33680
|
print();
|
|
33681
|
-
print(formatSuccess(`Active brand: ${source_default.bold(selectedBrand?.
|
|
33681
|
+
print(formatSuccess(`Active brand: ${source_default.bold(selectedBrand?.label)}`));
|
|
33682
33682
|
}
|
|
33683
33683
|
} catch {
|
|
33684
33684
|
print(formatWarning("Could not fetch brands. Set one later with `gf brands`"));
|
|
@@ -34193,7 +34193,7 @@ var whoamiCommand = new Command("whoami").description("Show current user and org
|
|
|
34193
34193
|
}
|
|
34194
34194
|
if (options.json) {
|
|
34195
34195
|
printJson({
|
|
34196
|
-
activeBrand: activeBrand ? { id: activeBrand.id,
|
|
34196
|
+
activeBrand: activeBrand ? { id: activeBrand.id, label: activeBrand.label } : null,
|
|
34197
34197
|
organization: info2.organization,
|
|
34198
34198
|
scopes: info2.scopes,
|
|
34199
34199
|
user: info2.user
|
|
@@ -34206,7 +34206,7 @@ var whoamiCommand = new Command("whoami").description("Show current user and org
|
|
|
34206
34206
|
print(formatLabel("Organization", info2.organization.name));
|
|
34207
34207
|
print(formatLabel("Scopes", info2.scopes.join(", ")));
|
|
34208
34208
|
if (activeBrand) {
|
|
34209
|
-
print(formatLabel("Active Brand", activeBrand.
|
|
34209
|
+
print(formatLabel("Active Brand", activeBrand.label));
|
|
34210
34210
|
} else if (activeBrandId) {
|
|
34211
34211
|
print(formatLabel("Active Brand", source_default.dim("(not found - run gf brands select)")));
|
|
34212
34212
|
} else {
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"gf": "dist/index.js"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
+
"@genfeedai/deserializer": "^1.0.0",
|
|
8
9
|
"@inquirer/prompts": "8.2.0",
|
|
9
10
|
"chalk": "5.6.2",
|
|
10
11
|
"commander": "14.0.3",
|
|
@@ -67,9 +68,10 @@
|
|
|
67
68
|
"prepare": "husky",
|
|
68
69
|
"test": "vitest run",
|
|
69
70
|
"test:coverage": "vitest run --coverage",
|
|
71
|
+
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
70
72
|
"test:watch": "vitest",
|
|
71
73
|
"typecheck": "tsc --noEmit"
|
|
72
74
|
},
|
|
73
75
|
"type": "module",
|
|
74
|
-
"version": "0.3.
|
|
76
|
+
"version": "0.3.1"
|
|
75
77
|
}
|