Skip to content

Commit

Permalink
Disable publish command
Browse files Browse the repository at this point in the history
  • Loading branch information
yoland68 committed May 3, 2024
1 parent 8fcbd10 commit 32ea493
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions comfy_cli/command/custom_nodes/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
import uuid
from comfy_cli.config_manager import ConfigManager
from comfy_cli.workspace_manager import WorkspaceManager
from comfy_cli.registry import (
publish_node_version,
extract_node_configuration,
upload_file_to_signed_url,
zip_files,
initialize_project_config,
)

# from comfy_cli.registry import (
# publish_node_version,
# extract_node_configuration,
# upload_file_to_signed_url,
# zip_files,
# initialize_project_config,
# )

app = typer.Typer()
manager_app = typer.Typer()
Expand Down Expand Up @@ -395,33 +396,34 @@ def fix(
execute_cm_cli(["fix"] + args, channel, mode)


@app.command("publish", help="Publish node to registry")
@tracking.track_command("node")
def publish():
"""
Publish a node with optional validation.
"""

# Perform some validation logic here
typer.echo("Validating node configuration...")
config = extract_node_configuration()

# Prompt for Personal Access Token
token = typer.prompt("Please enter your Personal Access Token", hide_input=True)

# Call API to fetch node version with the token in the body
typer.echo("Publishing node version...")
response = publish_node_version(config, token)

# Zip up all files in the current directory, respecting .gitignore files.
signed_url = response.signedUrl
zip_filename = "node.tar.gz"
typer.echo("Creating zip file...")
zip_files(zip_filename)

# Upload the zip file to the signed URL
typer.echo("Uploading zip file...")
upload_file_to_signed_url(signed_url, zip_filename)
# TODO: re-enable publish after v0 launch
# @app.command("publish", help="Publish node to registry")
# @tracking.track_command("publish")
# def publish():
# """
# Publish a node with optional validation.
# """

# # Perform some validation logic here
# typer.echo("Validating node configuration...")
# config = extract_node_configuration()

# # Prompt for Personal Access Token
# token = typer.prompt("Please enter your Personal Access Token", hide_input=True)

# # Call API to fetch node version with the token in the body
# typer.echo("Publishing node version...")
# response = publish_node_version(config, token)

# # Zip up all files in the current directory, respecting .gitignore files.
# signed_url = response.signedUrl
# zip_filename = "node.tar.gz"
# typer.echo("Creating zip file...")
# zip_files(zip_filename)

# # Upload the zip file to the signed URL
# typer.echo("Uploading zip file...")
# upload_file_to_signed_url(signed_url, zip_filename)


@app.command("init", help="Init scaffolding for custom node")
Expand Down

0 comments on commit 32ea493

Please sign in to comment.