Skip to content

Commit 206a24e

Browse files
committed
[UPDATE] Replace minimum with min in schema definitions and add GitHub token support for demo install
1 parent f89e97a commit 206a24e

12 files changed

Lines changed: 46 additions & 25 deletions

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ EMCP_PATH_REPO ?= $(CURDIR)
3131

3232
demo:
3333
@set -eu; \
34+
GH_TOKEN_VALUE="$${GITHUB_PAT:-$${GITHUB_TOKEN:-$${GH_TOKEN:-}}}"; \
35+
if [ -n "$${GH_TOKEN_VALUE}" ]; then \
36+
export COMPOSER_AUTH="$$(printf '{"github-oauth":{"github.com":"%s"}}' "$${GH_TOKEN_VALUE}")"; \
37+
echo "Using GitHub token from ENV (GITHUB_PAT/GITHUB_TOKEN/GH_TOKEN)."; \
38+
fi; \
3439
command -v "$(EVO_BIN)" >/dev/null 2>&1 || { \
3540
echo "Error: command '$(EVO_BIN)' not found. Install installer first: composer global require evolution-cms/installer"; \
3641
exit 1; \

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,14 @@ make demo-all
238238

239239
This target installs demo Evo, starts `php -S`, issues sApi JWT, runs `php artisan emcp:test`, then runs `composer run test` with HTTP runtime integration enabled.
240240

241+
If GitHub API auth is needed during install, pass token via ENV (same pattern as `evolution`):
242+
243+
```bash
244+
GITHUB_PAT=ghp_xxx make demo-all
245+
```
246+
247+
Fallback ENV names are also supported: `GITHUB_TOKEN`, `GH_TOKEN`.
248+
241249
Optional runtime integration check (against deployed environment):
242250

243251
```bash

README.uk.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@ make demo-all
237237

238238
Ця ціль встановлює demo Evo, запускає `php -S`, видає sApi JWT, виконує `php artisan emcp:test`, а потім `composer run test` з увімкненою HTTP runtime integration перевіркою.
239239

240+
Якщо під час інсталяції потрібна GitHub авторизація API, передай токен через ENV (як у `evolution`):
241+
242+
```bash
243+
GITHUB_PAT=ghp_xxx make demo-all
244+
```
245+
246+
Також підтримуються `GITHUB_TOKEN` і `GH_TOKEN`.
247+
240248
Опційна runtime integration перевірка (проти розгорнутого середовища):
241249

242250
```bash

src/Tools/Content/ContentAncestorsTool.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ protected function respondStage(array $mapped, array $validated): ResponseFactor
104104
public function schema(JsonSchema $schema): array
105105
{
106106
return [
107-
'id' => $schema->integer()->minimum(1)->required(),
108-
'depth' => $schema->integer()->minimum(1)->nullable(),
109-
'limit' => $schema->integer()->minimum(1)->required(),
110-
'offset' => $schema->integer()->minimum(0)->nullable(),
107+
'id' => $schema->integer()->min(1)->required(),
108+
'depth' => $schema->integer()->min(1)->nullable(),
109+
'limit' => $schema->integer()->min(1)->required(),
110+
'offset' => $schema->integer()->min(0)->nullable(),
111111
];
112112
}
113113
}

src/Tools/Content/ContentChildrenTool.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ protected function respondStage(array $mapped, array $validated): ResponseFactor
9797
public function schema(JsonSchema $schema): array
9898
{
9999
return [
100-
'id' => $schema->integer()->minimum(1)->required(),
101-
'limit' => $schema->integer()->minimum(1)->required(),
102-
'offset' => $schema->integer()->minimum(0)->nullable(),
100+
'id' => $schema->integer()->min(1)->required(),
101+
'limit' => $schema->integer()->min(1)->required(),
102+
'offset' => $schema->integer()->min(0)->nullable(),
103103
];
104104
}
105105
}

src/Tools/Content/ContentDescendantsTool.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ protected function respondStage(array $mapped, array $validated): ResponseFactor
104104
public function schema(JsonSchema $schema): array
105105
{
106106
return [
107-
'id' => $schema->integer()->minimum(1)->required(),
108-
'depth' => $schema->integer()->minimum(1)->nullable(),
109-
'limit' => $schema->integer()->minimum(1)->required(),
110-
'offset' => $schema->integer()->minimum(0)->nullable(),
107+
'id' => $schema->integer()->min(1)->required(),
108+
'depth' => $schema->integer()->min(1)->nullable(),
109+
'limit' => $schema->integer()->min(1)->required(),
110+
'offset' => $schema->integer()->min(0)->nullable(),
111111
];
112112
}
113113
}

src/Tools/Content/ContentGetTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected function respondStage(array $mapped, array $validated): ResponseFactor
8484
public function schema(JsonSchema $schema): array
8585
{
8686
return [
87-
'id' => $schema->integer()->minimum(1)->required(),
87+
'id' => $schema->integer()->min(1)->required(),
8888
];
8989
}
9090
}

src/Tools/Content/ContentRootTreeTool.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ protected function respondStage(array $mapped, array $validated): ResponseFactor
9898
public function schema(JsonSchema $schema): array
9999
{
100100
return [
101-
'depth' => $schema->integer()->minimum(1)->nullable(),
102-
'limit' => $schema->integer()->minimum(1)->required(),
103-
'offset' => $schema->integer()->minimum(0)->nullable(),
101+
'depth' => $schema->integer()->min(1)->nullable(),
102+
'limit' => $schema->integer()->min(1)->required(),
103+
'offset' => $schema->integer()->min(0)->nullable(),
104104
];
105105
}
106106
}

src/Tools/Content/ContentSearchTool.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ protected function respondStage(array $mapped, array $validated): ResponseFactor
169169
public function schema(JsonSchema $schema): array
170170
{
171171
return [
172-
'limit' => $schema->integer()->minimum(1),
173-
'offset' => $schema->integer()->minimum(0)->nullable(),
174-
'parent' => $schema->integer()->minimum(0)->nullable(),
175-
'depth' => $schema->integer()->minimum(1)->nullable(),
172+
'limit' => $schema->integer()->min(1),
173+
'offset' => $schema->integer()->min(0)->nullable(),
174+
'parent' => $schema->integer()->min(0)->nullable(),
175+
'depth' => $schema->integer()->min(1)->nullable(),
176176
'order_by' => $schema->string()->nullable(),
177177
'order_dir' => $schema->string()->nullable(),
178178
'order_by_date' => $schema->string()->nullable(),

src/Tools/Content/ContentSiblingsTool.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ protected function respondStage(array $mapped, array $validated): ResponseFactor
109109
public function schema(JsonSchema $schema): array
110110
{
111111
return [
112-
'id' => $schema->integer()->minimum(1)->required(),
113-
'limit' => $schema->integer()->minimum(1)->required(),
114-
'offset' => $schema->integer()->minimum(0)->nullable(),
112+
'id' => $schema->integer()->min(1)->required(),
113+
'limit' => $schema->integer()->min(1)->required(),
114+
'offset' => $schema->integer()->min(0)->nullable(),
115115
];
116116
}
117117
}

0 commit comments

Comments
 (0)