WordPress / WordPress/wordpress-playground

Blueprints: filesTree seems requires a resource property

Open
#2,136 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Package][@wp-playground] Blueprints [Type] Bug
Dominant language
JavaScript
Stars
2k
Forks
462
Avg merge
18h 44m
Merged PRs (30d)
33

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the blueprint schema and validation for the writeFiles step's filesTree property, then reproduce the supplied blueprint and browser-console error. Done means the example is accepted without a resource property and existing filesTree validation still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.