Skip to content

Commit 1e30915

Browse files
authored
Merge branch 'tempestphp:main' into main
2 parents 92416b4 + ecf2013 commit 1e30915

21 files changed

+57
-40
lines changed

.commitlintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": ["@commitlint/config-conventional"],
33
"rules": {
4+
"scope-empty ": [0, "never"],
45
"subject-case": [
56
2,
67
"never",

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ sync-db.sh
1515
app/tempest-access.log
1616
vite-tempest
1717
public/build/
18+
database.sqlite

deploy.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1-
git pull
1+
#!/bin/bash
2+
3+
. /home/forge/.bashrc
4+
. ~/.nvm/nvm.sh
5+
6+
# Composer
27
php8.4 /usr/local/bin/composer install --no-dev
3-
php8.4 tempest discovery:generate
8+
9+
# Bun
10+
/home/forge/.bun/bin/bun --version
11+
/home/forge/.bun/bin/bun install
12+
/home/forge/.bun/bin/bun run build
13+
14+
# Tempest
415
php8.4 tempest command-palette:index
5-
npm install
6-
npm run build
716
php8.4 tempest cache:clear --all
817
php8.4 tempest discovery:generate
918
php8.4 tempest migrate:up --force
1019
php8.4 tempest static:clean --force
1120
php8.4 tempest static:generate
21+
22+
# Supervisor
1223
sudo supervisorctl restart all

src/Console/DeployCommand.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,25 @@
44

55
namespace App\Console;
66

7-
use Tempest\Console\Console;
87
use Tempest\Console\ConsoleCommand;
8+
use Tempest\Console\HasConsole;
99

1010
final readonly class DeployCommand
1111
{
12-
public function __construct(
13-
private Console $console,
14-
) {
15-
}
12+
use HasConsole;
1613

1714
#[ConsoleCommand('deploy')]
1815
public function __invoke(): void
1916
{
20-
$this->console->info('Starting deploy');
17+
$this->info('Starting deploy');
18+
19+
$this->info('Pulling changes');
20+
passthru("ssh [email protected] 'cd tempest.stitcher.io && git pull'");
21+
$this->success('Done');
2122

22-
passthru("ssh [email protected] 'cd tempest.stitcher.io && sh deploy.sh'");
23+
$this->info('Running deploy script');
24+
passthru("ssh [email protected] 'cd tempest.stitcher.io && bash deploy.sh'");
2325

24-
$this->console->success('Deploy success');
26+
$this->success('Deploy success');
2527
}
2628
}

src/Web/Blog/articles/2024-10-02-alpha-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ final readonly class RssController
9393
cache: function () {
9494
return file_get_contents('https://stitcher.io/rss')
9595
},
96-
expiresAt: (new DateTimeImmutable())->add(new DateInterval('P1D'))
96+
expiresAt: new DateTimeImmutable()->add(new DateInterval('P1D'))
9797
);
9898
}
9999
}

src/Web/Blog/articles/2024-10-31-alpha-3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function __invoke(): void
152152
```php
153153
use Tempest\Generation\ClassManipulator;
154154

155-
(new ClassManipulator(PackageMigration::class))
155+
new ClassManipulator(PackageMigration::class)
156156
->removeClassAttribute(DoNotDiscover::class)
157157
->setNamespace('App\\Migrations')
158158
->print();

src/Web/Blog/show.view.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- Breadcrumbs -->
1515
<nav class="text-(--ui-text-dimmed) font-medium flex items-center mb-4 text-sm gap-x-1.5">
1616
<x-icon name="tabler:news" class="size-5 mr-1" />
17-
<a href="." class="hover:text-(--ui-text) transition">Blog</a>
17+
<a :href="uri([BlogController::class, 'index'])" class="hover:text-(--ui-text) transition">Blog</a>
1818
<span>/</span>
1919
<span class="text-(--ui-primary)">{{ $post->title }}</span>
2020
</nav>

src/Web/Documentation/content/main/1-framework/01-getting-started.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,15 @@ You can install Tempest in two ways: as a web app with a basic frontend bootstra
8989

9090
If you want to start a new Tempest project, you can use {`tempest/app`} as the starting point. Use `composer create-project` to start:
9191

92-
```txt
92+
```bash
9393
composer create-project tempest/app my-app --stability alpha
9494
cd my-app
95+
./tempest install vite --tailwind
9596
```
9697

97-
The project scaffold includes a basic frontend setup including Tailwind:
98+
Run NPM:
9899

99-
```txt
100+
```bash
100101
npm run dev
101102
```
102103

src/Web/Documentation/content/main/1-framework/02-the-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ final readonly class MarkdownInitializer implements Initializer
6262
{
6363
$environment = new Environment();
6464

65-
$highlighter = (new Highlighter(new CssTheme()));
65+
$highlighter = new Highlighter(new CssTheme());
6666

6767
$highlighter
6868
->addLanguage(new TempestViewLanguage())

src/Web/Documentation/content/main/1-framework/03-controllers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ final readonly class JsonController
282282
{
283283
$data = [ /* … */ ];
284284

285-
return (new Ok($data))->setContentType(ContentType::JSON);
285+
return new Ok($data)->setContentType(ContentType::JSON);
286286
}
287287
}
288288
```

0 commit comments

Comments
 (0)