diff --git a/comfy_cli/command/custom_nodes/command.py b/comfy_cli/command/custom_nodes/command.py index 79d2fba..ddac013 100644 --- a/comfy_cli/command/custom_nodes/command.py +++ b/comfy_cli/command/custom_nodes/command.py @@ -554,12 +554,12 @@ def publish(): @app.command("init", help="Init scaffolding for custom node") @tracking.track_command("node") def scaffold(): - if os.path.exists("comfynode.toml"): - typer.echo("Warning: 'comfynode.toml' already exists. Will not overwrite.") + if os.path.exists("pyproject.toml"): + typer.echo("Warning: 'pyproject.toml' already exists. Will not overwrite.") raise typer.Exit(code=1) typer.echo("Initializing metadata...") initialize_project_config() typer.echo( - "comfynode.toml created successfully. Defaults were filled in. Please check before publishing." + "pyproject.toml created successfully. Defaults were filled in. Please check before publishing." ) diff --git a/comfy_cli/registry/config_parser.py b/comfy_cli/registry/config_parser.py index 7c68230..9494c84 100644 --- a/comfy_cli/registry/config_parser.py +++ b/comfy_cli/registry/config_parser.py @@ -48,17 +48,16 @@ def create_comfynode_config(): # Write the TOML document to a file try: - with open("comfynode.toml", "w") as toml_file: + with open("pyproject.toml", "w") as toml_file: toml_file.write(tomlkit.dumps(document)) - print("comfynode.toml has been created successfully in the current directory.") except IOError as e: - raise Exception(f"Failed to write 'comfynode.toml': {str(e)}") + raise Exception(f"Failed to write 'pyproject.toml': {str(e)}") def initialize_project_config(): create_comfynode_config() - with open("comfynode.toml", "r") as file: + with open("pyproject.toml", "r") as file: document = tomlkit.parse(file.read()) # Get the current git remote URL @@ -100,15 +99,15 @@ def initialize_project_config(): # Write the updated config to a new file in the current directory try: - with open("comfynode.toml", "w") as toml_file: + with open("pyproject.toml", "w") as toml_file: toml_file.write(tomlkit.dumps(document)) - print("comfynode.toml has been created successfully in the current directory.") + print("pyproject.toml has been created successfully in the current directory.") except IOError as e: - raise IOError(f"Failed to write 'comfynode.toml': {str(e)}") + raise IOError(f"Failed to write 'pyproject.toml': {str(e)}") def extract_node_configuration( - path: str = os.path.join(os.getcwd(), "comfynode.toml"), + path: str = os.path.join(os.getcwd(), "pyproject.toml"), ) -> PyProjectConfig: import tomlkit