-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eace4fd
commit c170589
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.PHONY: run clean | ||
|
||
# Build target with caching - only rebuilds if source files change | ||
dist/plugin.wasm: $(shell find src -name '*.ts') | ||
xtp plugin build | ||
|
||
# Run the WordPress categories list command | ||
run: dist/plugin.wasm | ||
./test.sh | ||
|
||
# Clean built files | ||
clean: | ||
rm -f dist/plugin.wasm | ||
|
||
# Default target | ||
.DEFAULT_GOAL := run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
xtp plugin call ./dist/plugin.wasm --wasi --input '{ "params": { "name": "validate", "arguments": { "schema": {"$schema":"http://json-schema.org/draft-07/schema#","title":"Person","type":"object","properties":{"name":{"type":"string","description":"The person'\''s full name"},"age":{"type":"integer","minimum":0,"description":"The person'\''s age in years"},"isStudent":{"type":"boolean","description":"Whether the person is a student"}},"required":["name","age"]}, "document": {"name":"John Doe","age":25,"isStudent":true} } } }' call |