@pollinations/cli 0.1.76 → 0.1.77

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 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.76",
17
+ version: "0.1.77",
18
18
  description: "The Pollinations CLI \u2014 for humans, AI agents, and everything in between",
19
19
  type: "module",
20
20
  bin: {
@@ -4167,9 +4167,9 @@ for (const harness of HARNESSES) {
4167
4167
 
4168
4168
  // src/commands/keys.ts
4169
4169
  init_api();
4170
+ init_output();
4170
4171
  import chalk6 from "chalk";
4171
4172
  import { Command as Command17 } from "commander";
4172
- init_output();
4173
4173
  var MODELS_HELP = "Models the key can use: categories (text, image, video, audio, 3d, embedding, realtime, decision) or model IDs from `polli models`. A category includes models added later; a model ID allows only that model";
4174
4174
  var formatPerms = (p) => {
4175
4175
  if (!p) return "-";
@@ -4256,7 +4256,7 @@ var create2 = new Command17("create").description(
4256
4256
  "--type <type>",
4257
4257
  "Key type: secret or publishable app key",
4258
4258
  "secret"
4259
- ).option("--expires-in <seconds>", "Expiry in seconds (max 365 days)").option("--models <models...>", MODELS_HELP).option("--budget <pollen>", "Pollen budget cap").option(
4259
+ ).option("--expires-in <seconds>", "Expiry in seconds").option("--models <models...>", MODELS_HELP).option("--budget <pollen>", "Pollen budget cap").option(
4260
4260
  "--quest-pollen-only",
4261
4261
  "Never spend paid Pollen; requests stop when Quest Pollen runs out"
4262
4262
  ).option(
@@ -4287,13 +4287,13 @@ Examples:
4287
4287
  fail("--earnings requires --type publishable");
4288
4288
  }
4289
4289
  if (opts.expiresIn !== void 0) {
4290
- body.expiresIn = numberOption(
4291
- "--expires-in",
4292
- opts.expiresIn,
4293
- 1,
4294
- 365 * 86400,
4295
- true
4296
- );
4290
+ const expiresIn = Number(opts.expiresIn);
4291
+ if (!Number.isInteger(expiresIn) || expiresIn < 1) {
4292
+ fail(
4293
+ "--expires-in must be a whole number of seconds above 0"
4294
+ );
4295
+ }
4296
+ body.expiresIn = expiresIn;
4297
4297
  }
4298
4298
  if (opts.models) body.allowedModels = opts.models;
4299
4299
  if (opts.budget !== void 0) {