@doufunao123/asset-gateway 0.4.0 → 0.5.0

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -527,7 +527,7 @@ async function saveOutput(result, assetType, outputDir) {
527
527
  function createGenerateCommand() {
528
528
  const command = new Command3("generate").description("Generate assets via the gateway");
529
529
  command.addCommand(
530
- new Command3("image").description("Generate an image from a text prompt").requiredOption("--prompt <text>", "Image description prompt").option("--provider <id>", "Provider to use").option("--transparent", "Request transparent background").option("--model <model>", "Model to use").option("--size <size>", "Image size (e.g. 1024x1024)").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
530
+ new Command3("image").description("Generate an image from a text prompt").requiredOption("--prompt <text>", "Image description prompt").option("--provider <id>", "Provider to use").option("--transparent", "Request transparent background").option("--model <model>", "Model to use").option("--size <size>", "Image size (e.g. 1024x1024)").option("--input <url>", "Input image URL for editing (Gemini/Grok)").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
531
531
  try {
532
532
  const ctx = createContext(this);
533
533
  const body = {
@@ -538,6 +538,7 @@ function createGenerateCommand() {
538
538
  if (options.transparent) body.transparent = true;
539
539
  if (options.model) body.model = options.model;
540
540
  if (options.size) body.size = options.size;
541
+ if (options.input) body.input_file = options.input;
541
542
  const data = await ctx.client.post("/api/generate", body);
542
543
  const localPath = await saveOutput(data, "image", options.outputDir);
543
544
  if (localPath) data.local_path = localPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doufunao123/asset-gateway",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Universal asset generation gateway CLI",
5
5
  "type": "module",
6
6
  "bin": {