@pollinations/cli 0.1.61 → 0.1.62
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 +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var init_package = __esm({
|
|
|
14
14
|
"package.json"() {
|
|
15
15
|
package_default = {
|
|
16
16
|
name: "@pollinations/cli",
|
|
17
|
-
version: "0.1.
|
|
17
|
+
version: "0.1.62",
|
|
18
18
|
description: "The Pollinations CLI \u2014 for humans, AI agents, and everything in between",
|
|
19
19
|
type: "module",
|
|
20
20
|
bin: {
|
|
@@ -313,7 +313,7 @@ var init_api = __esm({
|
|
|
313
313
|
const key = resolveApiKey();
|
|
314
314
|
if (!key) {
|
|
315
315
|
printError("Not logged in. Run: polli auth login");
|
|
316
|
-
fail(
|
|
316
|
+
return fail(
|
|
317
317
|
"Or pipe a key: printf '%s' '<your-key>' | polli auth login --with-token"
|
|
318
318
|
);
|
|
319
319
|
}
|
|
@@ -3300,8 +3300,8 @@ var saveJson = (path, data) => {
|
|
|
3300
3300
|
`, 384);
|
|
3301
3301
|
};
|
|
3302
3302
|
var readKey4 = (ctx) => {
|
|
3303
|
-
const
|
|
3304
|
-
const key = env?.vars?.[KEY_ENV4];
|
|
3303
|
+
const doc = loadJson(configPath2(ctx));
|
|
3304
|
+
const key = doc.env?.vars?.[KEY_ENV4];
|
|
3305
3305
|
return typeof key === "string" && key ? key : null;
|
|
3306
3306
|
};
|
|
3307
3307
|
var providerEntry = (models2) => ({
|
|
@@ -3360,7 +3360,7 @@ var stripConfig3 = (ctx) => {
|
|
|
3360
3360
|
}
|
|
3361
3361
|
const primary = asRecord(doc.agents?.defaults?.model).primary;
|
|
3362
3362
|
if (typeof primary === "string" && primary.startsWith(`${PROVIDER4}/`)) {
|
|
3363
|
-
delete asRecord(
|
|
3363
|
+
delete asRecord(doc.agents?.defaults?.model).primary;
|
|
3364
3364
|
saveJson(configPath2(ctx), doc);
|
|
3365
3365
|
changed = true;
|
|
3366
3366
|
}
|