Skip to content

Commit 00c8568

Browse files
author
root
committed
upgrade pb to 0.39.0
1 parent 5bfb81a commit 00c8568

249 files changed

Lines changed: 9245 additions & 7108 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

backend/cmd/appos/bootstrap/cron.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package bootstrap
22

33
import (
4+
"context"
45
"errors"
56
"fmt"
67
"time"
@@ -42,7 +43,7 @@ func registerCronHooks(app *pocketbase.PocketBase, asynqClient *asynq.Client) {
4243
feedsPollCronJobID,
4344
"*/5 * * * *",
4445
cronutil.Wrap(app, feedsPollCronJobID, func() {
45-
if _, err := feeds.PollDueSources(nil, app, nil, time.Now().UTC()); err != nil {
46+
if _, err := feeds.PollDueSources(context.TODO(), app, nil, time.Now().UTC()); err != nil {
4647
panic(err)
4748
}
4849
}),

backend/cmd/openapi/gen_test.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,19 @@ func TestScanFile_WithHelperSeedsDiscoversSoftwareRoutes(t *testing.T) {
6464
}
6565

6666
want := map[string]string{
67-
"GET /api/servers/{serverId}/software": "auth",
68-
"GET /api/servers/{serverId}/software/{componentKey}": "auth",
69-
"POST /api/servers/{serverId}/software/{componentKey}/{action}": "auth",
70-
"GET /api/servers/{serverId}/software/capabilities": "auth",
71-
"GET /api/servers/{serverId}/software/operations": "auth",
72-
"GET /api/servers/{serverId}/software/operations/{operationId}": "auth",
67+
"GET /api/servers/{serverId}/software": "auth",
68+
"GET /api/servers/{serverId}/software/{componentKey}": "auth",
69+
"POST /api/servers/{serverId}/software/{componentKey}/{action}": "auth",
70+
"GET /api/servers/{serverId}/software/capabilities": "auth",
71+
"GET /api/servers/{serverId}/software/operations": "auth",
72+
"GET /api/servers/{serverId}/software/operations/{operationId}": "auth",
7373
"DELETE /api/servers/{serverId}/software/operations/{operationId}": "auth",
74-
"GET /api/software/local": "auth",
75-
"GET /api/software/local/{componentKey}": "auth",
76-
"GET /api/software/server-catalog": "auth",
77-
"GET /api/software/server-catalog/{componentKey}": "auth",
74+
"GET /api/software/local": "auth",
75+
"GET /api/software/local/services": "auth",
76+
"GET /api/software/local/services/{name}/logs": "auth",
77+
"GET /api/software/local/{componentKey}": "auth",
78+
"GET /api/software/server-catalog": "auth",
79+
"GET /api/software/server-catalog/{componentKey}": "auth",
7880
}
7981

8082
got := map[string]string{}

backend/domain/assets/storage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func WriteLocalFile(basePath, rel, content string) error {
5252
if err := os.MkdirAll(filepath.Dir(abs), 0o755); err != nil {
5353
return err
5454
}
55-
return os.WriteFile(abs, []byte(content), 0o644)
55+
return os.WriteFile(abs, []byte(content), 0o600)
5656
}
5757

5858
func WriteLocalFolder(basePath string, files map[string]string) error {
@@ -119,4 +119,4 @@ func RemoveLocalStorage(basePath string) error {
119119
return err
120120
}
121121
return nil
122-
}
122+
}

backend/domain/config/sysconfig/schema/schema_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,4 @@ func TestEveryCustomEntry_HasModuleAndKey(t *testing.T) {
174174
t.Errorf("custom entry %s has no Key", e.ID)
175175
}
176176
}
177-
}
177+
}

backend/domain/feeds/bookmark.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,4 @@ func defaultFaviconURL(base *url.URL) string {
184184

185185
func normalizeMetadataText(value string) string {
186186
return strings.Join(strings.Fields(strings.TrimSpace(value)), " ")
187-
}
187+
}

backend/domain/feeds/cleanup.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ type retentionCandidateRow struct {
3535
SourceName string `db:"source_name"`
3636
}
3737

38-
3938
type retentionPlan struct {
4039
GlobalTotalBefore int
4140
GlobalDeleteCount int
@@ -292,4 +291,4 @@ func countFeedItems(app core.App, sourceID string) (int, error) {
292291
}
293292

294293
return result.Count, nil
295-
}
294+
}

backend/domain/feeds/cleanup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ func TestRunRetentionSweepAppliesConfiguredPolicy(t *testing.T) {
182182
if firstStored.GetInt("item_count") != 20 || secondStored.GetInt("item_count") != 1 {
183183
t.Fatalf("expected refreshed source counts after retention sweep, got %d and %d", firstStored.GetInt("item_count"), secondStored.GetInt("item_count"))
184184
}
185-
}
185+
}

backend/domain/feeds/extract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ func hasAny(set map[string]struct{}, keys ...string) bool {
6060
}
6161
}
6262
return false
63-
}
63+
}

backend/domain/feeds/extract_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ func TestExtractKeywordsAndTags(t *testing.T) {
2020
t.Fatalf("expected tag %q at %d, got %#v", want, i, tags)
2121
}
2222
}
23-
}
23+
}

backend/domain/feeds/item.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
const (
12-
CollectionItems = "feed_items"
12+
CollectionItems = "feed_items"
1313
MaxItemContentRawChars = 1 << 20
1414

1515
OriginTypeFeed = "feed"
@@ -169,4 +169,4 @@ func truncateRunesWithSuffix(value string, maxRunes int, suffix string) string {
169169
return suffix
170170
}
171171
return truncated + suffix
172-
}
172+
}

0 commit comments

Comments
 (0)