def get_package_json_and_hash(package_json_path: Path) -> tuple[PackageJson, str]:
    """Get the content of package.json and its hash.

    Args:
        package_json_path: The path to the package.json file.

    Returns:
        A tuple containing the content of package.json as a dictionary and its SHA-256 hash.
    """
    with package_json_path.open("r") as file:
        json_data = json.load(file)

    # Calculate the hash
    json_string = json.dumps(json_data, sort_keys=True)
    hash_object = hashlib.sha256(json_string.encode())
    return (json_data, hash_object.hexdigest())
Get the content of package.json and its hash.

    Args:
        package_json_path: The path to the package.json file.

    Returns:
        A tuple containing the content of package.json as a dictionary and its SHA-256 hash.
    
reflex/utils/exec.py