adjust code to new repository
This commit is contained in:
committed by
T. R. Bernstein
parent
0cf34c475b
commit
795cd8335f
@@ -14,8 +14,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/gabriel-vasile/mimetype"
|
||||
"github.com/pocketbase/pocketbase/tools/inflector"
|
||||
"github.com/pocketbase/pocketbase/tools/security"
|
||||
"github.com/tabshift-gh/pocketbase/tools/inflector"
|
||||
"github.com/tabshift-gh/pocketbase/tools/security"
|
||||
)
|
||||
|
||||
// FileReader defines an interface for a file resource reader.
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tests"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem"
|
||||
"github.com/tabshift-gh/pocketbase/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem"
|
||||
)
|
||||
|
||||
func TestFileAsMap(t *testing.T) {
|
||||
|
||||
@@ -18,11 +18,11 @@ import (
|
||||
"github.com/disintegration/imaging"
|
||||
"github.com/fatih/color"
|
||||
"github.com/gabriel-vasile/mimetype"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/blob"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/fileblob"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/list"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/blob"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/fileblob"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/list"
|
||||
|
||||
// explicit webp decoder because disintegration/imaging does not support webp
|
||||
_ "golang.org/x/image/webp"
|
||||
@@ -413,7 +413,7 @@ var inlineServeContentTypes = []string{
|
||||
var manualExtensionContentTypes = map[string]string{
|
||||
".svg": "image/svg+xml", // (see https://github.com/whatwg/mimesniff/issues/7)
|
||||
".css": "text/css", // (see https://github.com/gabriel-vasile/mimetype/pull/113)
|
||||
".js": "text/javascript", // (see https://github.com/pocketbase/pocketbase/issues/6597)
|
||||
".js": "text/javascript", // (see https://github.com/tabshift-gh/pocketbase/issues/6597)
|
||||
".mjs": "text/javascript",
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/gabriel-vasile/mimetype"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem"
|
||||
)
|
||||
|
||||
func TestFileSystemExists(t *testing.T) {
|
||||
|
||||
@@ -50,7 +50,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/blob"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/blob"
|
||||
)
|
||||
|
||||
const defaultPageSize = 1000
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestS3CopyObject(t *testing.T) {
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestS3DeleteObject(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/xml"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
)
|
||||
|
||||
func TestResponseErrorSerialization(t *testing.T) {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestS3GetObject(t *testing.T) {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestS3HeadObject(t *testing.T) {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestS3ListParamsEncode(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// such as objects list, get, copy, delete and upload.
|
||||
//
|
||||
// For more details why we don't use the official aws-sdk-go-v2, you could check
|
||||
// https://github.com/pocketbase/pocketbase/discussions/6562.
|
||||
// https://github.com/tabshift-gh/pocketbase/discussions/6562.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
@@ -66,7 +66,7 @@ type S3 struct {
|
||||
// Note that the path will be URL escaped based on the AWS [UriEncode rules]
|
||||
// for broader compatibility with some providers that expect the same
|
||||
// path format as the one in the canonical signed header
|
||||
// (see also https://github.com/pocketbase/pocketbase/issues/7153).
|
||||
// (see also https://github.com/tabshift-gh/pocketbase/issues/7153).
|
||||
//
|
||||
// [UriEncode rules]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html
|
||||
func (s3 *S3) URL(path string) string {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestS3URL(t *testing.T) {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestUploaderRequiredFields(t *testing.T) {
|
||||
|
||||
@@ -40,8 +40,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/blob"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/blob"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
)
|
||||
|
||||
const defaultPageSize = 1000
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/blob"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/blob"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/tabshift-gh/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user