@pollinations/cli 0.1.69 → 0.1.70
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 +8 -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.70",
|
|
18
18
|
description: "The Pollinations CLI \u2014 for humans, AI agents, and everything in between",
|
|
19
19
|
type: "module",
|
|
20
20
|
bin: {
|
|
@@ -2224,16 +2224,19 @@ var resolveHarnessKey = async (harness, options) => {
|
|
|
2224
2224
|
return existing;
|
|
2225
2225
|
}
|
|
2226
2226
|
const accountKey = resolveApiKey() ?? await loginWithDeviceFlow({ browser: options.browser });
|
|
2227
|
-
const login2 = await gen(
|
|
2228
|
-
"/account/key",
|
|
2229
|
-
{ apiKey: accountKey }
|
|
2230
|
-
);
|
|
2227
|
+
const login2 = await gen("/account/key", { apiKey: accountKey });
|
|
2231
2228
|
if (!login2.permissions.account?.includes("keys")) {
|
|
2232
2229
|
printInfo(
|
|
2233
2230
|
`${harness.label} uses the polli login, which can't create keys.`
|
|
2234
2231
|
);
|
|
2235
2232
|
return accountKey;
|
|
2236
2233
|
}
|
|
2234
|
+
if (login2.pollenBudget != null) {
|
|
2235
|
+
printInfo(
|
|
2236
|
+
`${harness.label} uses the polli login and its pollen budget.`
|
|
2237
|
+
);
|
|
2238
|
+
return accountKey;
|
|
2239
|
+
}
|
|
2237
2240
|
const name = `polli-harness-${harness.id}`;
|
|
2238
2241
|
const created = await gen("/account/keys", {
|
|
2239
2242
|
method: "POST",
|