Skip to content

Commit 21307ef

Browse files
Merge remote-tracking branch 'origin/main' into chore/improve-test-workflow
2 parents 48911c0 + 0bf905f commit 21307ef

33 files changed

+965
-176
lines changed

.github/CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# How to contribute to statamic-backup
2+
3+
## Found a bug?
4+
5+
Please do create an issue, or upvote/add more information to an existsing issue for that bug!
6+
7+
When creating issues, please include the exception that was thrown or if you did some troubleshooting - what you found! :)
8+
9+
## Security issue?
10+
11+
Please send an email to [email protected] with the issue.
12+
13+
## Want to contribute with a pull request?
14+
15+
Fantastic, we appreciate it!
16+
17+
1. Make sure the test-and-lint-suite passes, this can be run locally with `composer qa`.
18+
2. Name your PR according to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), the reason for using conventional commits is so we can generate changelogs/release notes. Some examples:
19+
- `fix: backup failing due to xyz`
20+
- `feat: add new feature xyz`
21+
22+
And that is everything, happy coding!

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"devDependencies": {
99
"@vitejs/plugin-vue2": "^2.3.1",
1010
"laravel-vite-plugin": "^1.0.2",
11-
"vite": "^5.2.11"
11+
"vite": "^6.3.5"
1212
},
1313
"dependencies": {
1414
"resumablejs": "^1.1.0"

client/src/components/Backup.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<template>
22
<div>
33
<div class="flex">
4-
<h1 class="mb-6">{{ __("statamic-backup::backup.title") }}</h1>
4+
<div class="flex flex-col mb-4">
5+
<h1>{{ __("statamic-backup::backup.title") }}</h1>
6+
<p v-if="status !== 'idle'" class="text-sm text-gray-700 whitespace-nowrap">
7+
{{ __(`statamic-backup::backup.state.${status}`) }}
8+
</p>
9+
</div>
510
<backup-actions @openBrowser="openBrowser" />
611
</div>
712

@@ -26,7 +31,8 @@ export default {
2631
},
2732
},
2833
created() {
29-
console.log(this.chunkSize)
34+
// console.log(this.chunkSize)
35+
3036
window.backup = {
3137
chunkSize: this.chunkSize
3238
};
@@ -36,6 +42,11 @@ export default {
3642
this.$store.dispatch('backup-provider/pollEndpoint');
3743
}
3844
},
45+
computed: {
46+
status() {
47+
return this.$store.state['backup-provider'].status;
48+
},
49+
},
3950
destroy() {
4051
this.$store.dispatch('backup-provider/stopPolling');
4152
this.$store.unregisterModule('backup-provider');

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"orchestra/testbench": "^9.0",
1818
"pestphp/pest": "^3.0",
1919
"pestphp/pest-plugin-laravel": "^3.0",
20-
"carthage-software/mago": "^0.23.0"
20+
"carthage-software/mago": "1.0.0-alpha.2"
2121
},
2222
"autoload": {
2323
"psr-4": {

docs/pages/pipeline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ final readonly class Logs extends BackupPipe
9898
if (!file_exists(storage_path('logs'))) {
9999
return $this->skip(
100100
reason: 'There was no logs directory',
101-
next: $next
101+
next: $next,
102102
zip: $zip
103-
)
103+
);
104104
}
105105

106106
// Implement the logic to create a backup of your data and add it to the ZipArchive instance $zip.

lang/en/backup.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@
1010
'backup_started' => 'Starting backup...',
1111
'success' => 'Backed up successfully',
1212

13+
'state' => [
14+
'idle' => 'Idle',
15+
'initializing' => 'Fetching initial status',
16+
'queued' => 'Waiting for action to start',
17+
'backup_in_progress' => 'Backup in progress',
18+
'restore_in_progress' => 'Restore in progress',
19+
'backup_completed' => 'Backup completed',
20+
'restore_completed' => 'Restore completed',
21+
'backup_failed' => 'Backup failed',
22+
'restore_failed' => 'Restore failed',
23+
],
24+
1325
'upload' => [
1426
'label' => 'Upload Backup',
1527

mago.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ allow_dynamic_static_calls = true
1919
level = "off"
2020

2121
[[linter.rules]]
22-
name = "analysis/override-attribute"
22+
name = "best-practices/override-attribute"
2323
level = "off"
2424

2525
[[linter.rules]]
2626
name = "naming/class"
2727
level = "off"
2828

29+
[[linter.rules]]
30+
name = "best-practices/literal-named-argument"
31+
level = "off"
32+
2933
[[linter.rules]]
3034
name = "naming/interface"
3135
level = "off"
@@ -34,4 +38,3 @@ level = "off"
3438
# since we support php 8.2 we cannot use constant types
3539
name = "strictness/require-constant-type"
3640
level = "off"
37-

0 commit comments

Comments
 (0)