Files
Michal Klos b9077d96d8 chore(deps): consolidate dependency and security bumps (#13081)
* chore(deps): consolidate dependency and security bumps

Dependabot PRs applied:
- #12878 qs 6.15.2 -> 6.16.0 (web/web-runtime)
- #13013 alpine 3.24.1 -> 3.24.2
- #13061 actions/checkout -> v7.0.1 (missed instance in k8s.yml)
- #13062 actions/setup-node -> v7.0.0 (missed instance in k8s.yml)
- #13075 simple-git 3.36.0 -> 4.0.1 (security)
- #13076 katex 0.16.45 -> 0.18.2+ (security)
- #13077 dompurify 3.4.13 -> 3.4.16 (security)
- #13079 go deps minor-and-patch group, 18 updates (opa 1.19.0 -> 1.21.1, otel 1.46 -> 1.47, bleve, govips, grpc-gateway, lico, tablewriter, logrus, gjson, x/exp, x/image, genproto, etc.)

Skipped (already satisfied on master): #12513, #12624, #12625, #12633

Manual security bumps via pnpm.overrides (no dependabot PR existed):
- axios -> 1.20.0
- smol-toml -> 1.9.0
- postcss -> 8.5.23
- postcss-selector-parser -> 7.1.6
- colord -> 2.9.4
- unhead -> 2.1.13
- markdown-it -> 14.3.1
- esbuild -> 0.28.1
- brace-expansion 5.0.11 -> 5.0.12

Not fixable: sprintf-js and elliptic have no patched version released upstream yet; left as-is.

go build and pnpm install verified clean.

* chore(deps): fix residual transitive vulns found by trivy

trivy flagged duplicate/stale resolutions that survived the earlier
override pass: dompurify (3.4.12 -> 3.4.16), qs (6.14.2 -> 6.16.0),
and fast-uri (3.1.7 -> 3.1.8, CVE-2026-86472). Added/bumped pnpm.overrides
accordingly. trivy fs scan of web/pnpm-lock.yaml now clean.

* chore(deps): bump reva to bac0e1ee144ab853a81c6b02142032f102dd245a

Pins github.com/owncloud/reva/v2 to bac0e1ee144ab853a81c6b02142032f102dd245a,
pulling in its go-playground/locales and huandu/xstrings version bumps.
Appends this PR to changelog/unreleased/bump-reva.md.

go build ./... verified clean after go mod vendor resync.

* fix(ci): revert unhead override, breaks web build

* revert: keep k8s.yml actions/checkout and setup-node pinned
2026-10-07 07:56:56 +02:00

151 lines
4.1 KiB
Go

// Copyright (c) 2015 Couchbase, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package index
import (
"net"
"time"
)
type Document interface {
ID() string
Size() int
VisitFields(visitor FieldVisitor)
VisitComposite(visitor CompositeFieldVisitor)
HasComposite() bool
NumPlainTextBytes() uint64
AddIDField()
StoredFieldsBytes() uint64
Indexed() bool
}
type FieldVisitor func(Field)
type Field interface {
Name() string
Value() []byte
ArrayPositions() []uint64
EncodedFieldType() byte
Analyze()
Options() FieldIndexingOptions
AnalyzedLength() int
AnalyzedTokenFrequencies() TokenFrequencies
NumPlainTextBytes() uint64
}
type CompositeFieldVisitor func(field CompositeField)
type CompositeField interface {
Field
Compose(field string, length int, freq TokenFrequencies)
}
type TextField interface {
Text() string
}
type NumericField interface {
Number() (float64, error)
}
type DateTimeField interface {
DateTime() (time.Time, string, error)
}
type BooleanField interface {
Boolean() (bool, error)
}
type GeoPointField interface {
Lon() (float64, error)
Lat() (float64, error)
}
type GeoShapeField interface {
GeoShape() (GeoJSON, error)
EncodedShape() []byte
}
// GeoShapeV2Field represents an analyzed geo shape field
type GeoShapeV2Field interface {
// InnerCells returns the covering cells fully contained within the shape
InnerCells() []uint64
// CrossCells returns the covering cells that overlap the shape's boundary
CrossCells() []uint64
// EncodedBoundingBox returns the serialized bounding box of the shape
EncodedBoundingBox() []byte
// EncodedShape returns the serialized shape
EncodedShape() []byte
// Scores returns the shape's inner and cross cell scores
Scores() (inner, cross uint64)
}
type IPField interface {
IP() (net.IP, error)
}
// TokenizableSpatialField is an optional interface for fields that
// supports pluggable custom hierarchial spatial token generation.
type TokenizableSpatialField interface {
// SetSpatialAnalyzerPlugin lets the index implementations to
// initialise relevant spatial analyzer plugins for the field
// to override the spatial token generations during the analysis phase.
SetSpatialAnalyzerPlugin(SpatialAnalyzerPlugin)
}
// SynonymField represents a field that contains a list of synonyms for a set of terms.
// Each SynonymField is generated from a single synonym definition, and its name corresponds
// to the synonym source to which the synonym definition belongs.
type SynonymField interface {
Field
// IterateSynonyms iterates over the synonyms for the term in the field.
// The provided visitor function is called with each term and its corresponding synonyms.
IterateSynonyms(visitor func(term string, synonyms []string))
}
// SynonymFieldVisitor is a function type used to visit a SynonymField within a document.
type SynonymFieldVisitor func(SynonymField)
// SynonymDocument represents a special type of document that contains synonym fields.
// Each SynonymField is a field with a list of synonyms for a set of terms.
// These fields are derived from synonym definitions, and their names correspond to the synonym sources.
type SynonymDocument interface {
Document
// VisitSynonymFields allows iteration over all synonym fields in the document.
// The provided visitor function is called for each synonym field.
VisitSynonymFields(visitor SynonymFieldVisitor)
}
// NestedDocument is a document that contains other documents inside it.
type NestedDocument interface {
Document
// VisitNestedDocuments allows iteration over all nested documents in the document.
// The provided visitor function is called for each nested document.
VisitNestedDocuments(visitor func(doc Document))
}