Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blueprints: filesTree seems requires a resource property #2136

Open
bph opened this issue Feb 4, 2025 · 0 comments
Open

Blueprints: filesTree seems requires a resource property #2136

bph opened this issue Feb 4, 2025 · 0 comments
Labels
[Package][@wp-playground] Blueprints [Type] Bug An existing feature does not function as intended

Comments

@bph
Copy link
Collaborator

bph commented Feb 4, 2025

This step should work without a resource property for filesTree

{
    "$schema": "https://playground.wordpress.net/blueprint-schema.json",
    "steps": [
    {
        "step": "writeFiles",
            "writeToPath": "/wordpress/wp-content/plugins/woo-shipping-method",
            "filesTree": {
            "name": "woo-shipping-method",
            "files": {
                "plugin.php": "<?php\n/*\nPlugin Name: My Plugin\n*/",
                "readme.txt": "=== My Plugin ===\nDescription: A simple plugin",
                "includes": {
                    "class-main.php": "<?php\nclass Main_Class {}",
                    "functions.php": "<?php\nfunction my_plugin_init() {}"
                }
           }
      }
]
}

Message in Browser console:

Error: Invalid blueprint: must have required property 'resource' at /steps/0/filesTree

Image

@bph bph added the [Type] Bug An existing feature does not function as intended label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package][@wp-playground] Blueprints [Type] Bug An existing feature does not function as intended
Projects
Status: Inbox
Development

No branches or pull requests

1 participant