From d718e1cda6f740e380bfe099375fd913fa3a79d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 07:43:15 +0000 Subject: [PATCH 01/31] build(deps): bump github.com/blevesearch/bleve_index_api Bumps [github.com/blevesearch/bleve_index_api](https://github.com/blevesearch/bleve_index_api) from 1.3.2 to 1.3.4. - [Commits](https://github.com/blevesearch/bleve_index_api/compare/v1.3.2...v1.3.4) --- updated-dependencies: - dependency-name: github.com/blevesearch/bleve_index_api dependency-version: 1.3.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index de5f5711b..0a9d6d4da 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.25.5 require ( github.com/Masterminds/sprig v2.22.0+incompatible github.com/blevesearch/bleve/v2 v2.5.7 - github.com/blevesearch/bleve_index_api v1.3.2 + github.com/blevesearch/bleve_index_api v1.3.4 github.com/bradleyfalzon/ghinstallation/v2 v2.18.0 github.com/brianvoe/gofakeit/v6 v6.28.0 github.com/dop251/goja v0.0.0-20250309171923-bcd7cc6bf64c diff --git a/go.sum b/go.sum index 73df5d192..01d4efdcc 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCk github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/blevesearch/bleve/v2 v2.5.7 h1:2d9YrL5zrX5EBBW++GOaEKjE+NPWeZGaX77IM26m1Z8= github.com/blevesearch/bleve/v2 v2.5.7/go.mod h1:yj0NlS7ocGC4VOSAedqDDMktdh2935v2CSWOCDMHdSA= -github.com/blevesearch/bleve_index_api v1.3.2 h1:y4VLXBF7nQR01CvF+QzmCJKMpVPCLp1CJ5FsRSZXzRE= -github.com/blevesearch/bleve_index_api v1.3.2/go.mod h1:xvd48t5XMeeioWQ5/jZvgLrV98flT2rdvEJ3l/ki4Ko= +github.com/blevesearch/bleve_index_api v1.3.4 h1:hZezxSRGFX4+/wiEn/a9xxBIo4BAJvqVfmZYoVzmjas= +github.com/blevesearch/bleve_index_api v1.3.4/go.mod h1:xvd48t5XMeeioWQ5/jZvgLrV98flT2rdvEJ3l/ki4Ko= github.com/blevesearch/geo v0.2.4 h1:ECIGQhw+QALCZaDcogRTNSJYQXRtC8/m8IKiA706cqk= github.com/blevesearch/geo v0.2.4/go.mod h1:K56Q33AzXt2YExVHGObtmRSFYZKYGv0JEN5mdacJJR8= github.com/blevesearch/go-faiss v1.0.26 h1:4dRLolFgjPyjkaXwff4NfbZFdE/dfywbzDqporeQvXI= From 0a0272579cd628fd543205c4efdf8dea1c0b6201 Mon Sep 17 00:00:00 2001 From: marle3003 Date: Mon, 23 Mar 2026 16:48:53 +0100 Subject: [PATCH 02/31] feat(javascript): add insecure option to http request methods --- engine/common/host.go | 1 + engine/host.go | 14 +++++++++++-- js/http/http.go | 6 ++++++ js/http/http_test.go | 48 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 2 deletions(-) diff --git a/engine/common/host.go b/engine/common/host.go index b03e89a8e..ef67cf24b 100644 --- a/engine/common/host.go +++ b/engine/common/host.go @@ -116,6 +116,7 @@ type HttpClient interface { type HttpClientOptions struct { MaxRedirects int Timeout time.Duration + Insecure bool } type Action struct { diff --git a/engine/host.go b/engine/host.go index e1e38b208..0690843ba 100644 --- a/engine/host.go +++ b/engine/host.go @@ -1,6 +1,7 @@ package engine import ( + "crypto/tls" "encoding/json" "fmt" "mokapi/config/dynamic" @@ -283,8 +284,15 @@ func (sh *scriptHost) KafkaClient() common.KafkaClient { } func (sh *scriptHost) HttpClient(opts common.HttpClientOptions) common.HttpClient { - return &http.Client{ - Timeout: opts.Timeout, + transport := http.DefaultTransport.(*http.Transport).Clone() + + if opts.Insecure { + transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} + } + + c := &http.Client{ + Transport: transport, + Timeout: opts.Timeout, CheckRedirect: func(req *http.Request, via []*http.Request) error { if l := len(via); l > opts.MaxRedirects { log.Warnf("Stopped after %d redirects, original URL was %s", opts.MaxRedirects, via[0].URL) @@ -293,6 +301,8 @@ func (sh *scriptHost) HttpClient(opts common.HttpClientOptions) common.HttpClien return nil }, } + + return c } func (sh *scriptHost) CanClose() bool { diff --git a/js/http/http.go b/js/http/http.go index fa2d6bfc9..890eeb953 100644 --- a/js/http/http.go +++ b/js/http/http.go @@ -281,6 +281,12 @@ func parseArgs(args *goja.Object) (*RequestArgs, common.HttpClientOptions, error continue } rArgs.Body = v.Export() + case "insecure": + v := args.Get(k) + if v.ExportType().Kind() != reflect.Bool { + return rArgs, opts, fmt.Errorf("unexpected type for 'insecure': got %s, expected Boolean", util.JsType(v)) + } + opts.Insecure = v.ToBoolean() } } } diff --git a/js/http/http_test.go b/js/http/http_test.go index da462f191..82975a834 100644 --- a/js/http/http_test.go +++ b/js/http/http_test.go @@ -546,6 +546,54 @@ func TestHttp(t *testing.T) { r.Equal(t, "unexpected type for 'maxRedirects': got String, expected Number", v.Export()) }, }, + { + name: "fetch insecure", + client: func(options common.HttpClientOptions) common.HttpClient { + return &enginetest.HttpClient{ + DoFunc: func(request *http.Request) (*http.Response, error) { + if !options.Insecure { + return nil, fmt.Errorf("expected insecure=true") + } + return &http.Response{StatusCode: http.StatusOK}, nil + }, + } + }, + test: func(t *testing.T, vm *goja.Runtime, host *enginetest.Host) { + _, err := vm.RunString(` + const m = require('mokapi/http') + const p = m.fetch('https://foo.bar', { insecure: true }) + let result; + p.then(v => result = v).catch(err => result = err) + `) + r.NoError(t, err) + time.Sleep(200 * time.Millisecond) + + v, err := vm.RunString("result") + r.NoError(t, err) + res, ok := v.Export().(mod.Response) + if !ok { + r.FailNow(t, v.String()) + } + r.Equal(t, http.StatusOK, res.StatusCode) + }, + }, + { + name: "fetch insecure not boolean", + test: func(t *testing.T, vm *goja.Runtime, host *enginetest.Host) { + _, err := vm.RunString(` + const m = require('mokapi/http') + const p = m.fetch('https://foo.bar', { insecure: 'foo' }) + let result; + p.then(v => result = v).catch(err => result = err) + `) + r.NoError(t, err) + time.Sleep(200 * time.Millisecond) + + v, err := vm.RunString("result") + r.NoError(t, err) + r.Equal(t, "unexpected type for 'insecure': got String, expected Boolean", v.Export()) + }, + }, } for _, tc := range testcases { From e80532c69a9ff64312324aa1bf75253e63480236 Mon Sep 17 00:00:00 2001 From: marle3003 Date: Tue, 24 Mar 2026 11:11:13 +0100 Subject: [PATCH 03/31] feat(webui): prevent null reference error --- webui/src/components/dashboard/http/Request.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webui/src/components/dashboard/http/Request.vue b/webui/src/components/dashboard/http/Request.vue index cb1ce31d6..8e556fa6f 100644 --- a/webui/src/components/dashboard/http/Request.vue +++ b/webui/src/components/dashboard/http/Request.vue @@ -79,7 +79,10 @@ const eventData = computed(() => { }) function getResponseContentType(): string { - return eventData.value?.response.headers['Content-Type'] ?? '' + if (!eventData.value?.response?.headers) { + return '' + } + return eventData.value.response.headers['Content-Type'] ?? '' } const hasActions = computed(() => { if (!eventData.value) { From ce206fc21275c094a753d00bef5ed01a78d2a293 Mon Sep 17 00:00:00 2001 From: marle3003 Date: Tue, 24 Mar 2026 17:38:55 +0100 Subject: [PATCH 04/31] fix(config): improve config files without a file extension fix(config): use content type specified in the HTTP response if no file extension is provided --- api/handler_config.go | 12 +++++++++- api/handler_config_test.go | 29 +++++++++++++++++++++++ config/dynamic/config_info.go | 13 +++++----- config/dynamic/parse.go | 2 ++ config/dynamic/parse_test.go | 2 ++ config/dynamic/provider/http/http.go | 4 ++++ config/dynamic/provider/http/http_test.go | 29 ++++++++++++++++++++--- 7 files changed, 81 insertions(+), 10 deletions(-) diff --git a/api/handler_config.go b/api/handler_config.go index aa761e090..180e005f9 100644 --- a/api/handler_config.go +++ b/api/handler_config.go @@ -79,7 +79,17 @@ func (h *handler) getConfigData(w http.ResponseWriter, r *http.Request, key stri ext := filepath.Ext(path) mt := mime.TypeByExtension(filepath.Ext(ext)) if mt == "" { - mt = "text/plain" + if ext == "" { + values, err := mime.ExtensionsByType(c.Info.Kernel().ContentType) + if err == nil && len(values) > 0 { + ext = values[0] + path += ext + mt = mime.TypeByExtension(filepath.Ext(ext)) + } + } + if mt == "" { + mt = "text/plain" + } } w.Header().Set("Last-Modified", c.Info.Time.UTC().Format(http.TimeFormat)) w.Header().Set("Content-Type", mt) diff --git a/api/handler_config_test.go b/api/handler_config_test.go index f5abbd834..658e80f6b 100644 --- a/api/handler_config_test.go +++ b/api/handler_config_test.go @@ -149,6 +149,7 @@ func TestHandler_Config(t *testing.T) { requestUrl: "http://foo.api/api/configs/foo/data", test: []try.ResponseCondition{ try.HasStatusCode(http.StatusOK), + try.HasHeader("Content-Disposition", "inline; filename=\"foo.yaml\""), try.HasHeader("Last-Modified", "Wed, 27 Dec 2023 13:01:30 GMT"), try.HasHeaderXor("Content-Type", "text/plain", "application/yaml"), try.HasHeader("Cache-Control", "no-cache"), @@ -173,6 +174,34 @@ func TestHandler_Config(t *testing.T) { requestUrl: "http://foo.api/api/configs/foo/data", test: []try.ResponseCondition{ try.HasStatusCode(http.StatusOK), + try.HasHeader("Content-Disposition", "inline; filename=\"foo.json\""), + try.HasHeader("Last-Modified", "Fri, 22 Dec 2023 13:01:30 GMT"), + try.HasHeader("Content-Type", "application/json"), + try.HasHeader("Etag", etag), + try.HasHeader("Cache-Control", "no-cache"), + try.HasBody(`{"foo": "bar"}`), + }, + }, + { + name: "config data: no extension but ContentType in Info is set", + app: func() *runtime.App { + + return &runtime.App{Configs: map[string]*dynamic.Config{ + "foo": { + Info: dynamic.ConfigInfo{ + Url: mustUrl("https://foo.bar/foo"), + Time: mustTime("2023-12-22T13:01:30+00:00"), + Checksum: checksum, + ContentType: "application/json", + }, + Raw: data, + }, + }} + }, + requestUrl: "http://foo.api/api/configs/foo/data", + test: []try.ResponseCondition{ + try.HasStatusCode(http.StatusOK), + try.HasHeader("Content-Disposition", "inline; filename=\"foo.json\""), try.HasHeader("Last-Modified", "Fri, 22 Dec 2023 13:01:30 GMT"), try.HasHeader("Content-Type", "application/json"), try.HasHeader("Etag", etag), diff --git a/config/dynamic/config_info.go b/config/dynamic/config_info.go index 113a3ca0e..d4a78eb6a 100644 --- a/config/dynamic/config_info.go +++ b/config/dynamic/config_info.go @@ -12,12 +12,13 @@ import ( ) type ConfigInfo struct { - Provider string - Url *url.URL - Checksum []byte - Time time.Time - inner *ConfigInfo - Tags []string + Provider string + Url *url.URL + Checksum []byte + Time time.Time + inner *ConfigInfo + Tags []string + ContentType string } func (ci *ConfigInfo) Path() string { diff --git a/config/dynamic/parse.go b/config/dynamic/parse.go index 6145d5818..083512836 100644 --- a/config/dynamic/parse.go +++ b/config/dynamic/parse.go @@ -76,10 +76,12 @@ func parse(c *Config) (interface{}, error) { var v interface{} v, err = parseJson(b, result) if err == nil { + c.Info.ContentType = "application/json" return v, nil } v, err = parseYaml(b, result) if v != nil && err == nil { + c.Info.ContentType = "application/yaml" return v, nil } err = nil diff --git a/config/dynamic/parse_test.go b/config/dynamic/parse_test.go index 4d80224c0..552d46b5d 100644 --- a/config/dynamic/parse_test.go +++ b/config/dynamic/parse_test.go @@ -107,6 +107,7 @@ func TestParse(t *testing.T) { err := dynamic.Parse(c, &dynamictest.Reader{}) require.NoError(t, err) require.Equal(t, "foo", c.Data.(*data).User) + require.Equal(t, "application/json", c.Info.ContentType) }, }, { @@ -161,6 +162,7 @@ func TestParse(t *testing.T) { err := dynamic.Parse(c, &dynamictest.Reader{}) require.NoError(t, err) require.Equal(t, "foo", c.Data.(*data).User) + require.Equal(t, "application/yaml", c.Info.ContentType) }, }, { diff --git a/config/dynamic/provider/http/http.go b/config/dynamic/provider/http/http.go index 0faf03b4a..7d7364b7a 100644 --- a/config/dynamic/provider/http/http.go +++ b/config/dynamic/provider/http/http.go @@ -198,6 +198,10 @@ func (p *Provider) readUrl(u *url.URL) (c *dynamic.Config, changed bool, err err Raw: b, } + if ct := res.Header.Get("Content-Type"); ct != "" { + c.Info.ContentType = ct + } + return } diff --git a/config/dynamic/provider/http/http_test.go b/config/dynamic/provider/http/http_test.go index 2ff37331a..fabc108ad 100644 --- a/config/dynamic/provider/http/http_test.go +++ b/config/dynamic/provider/http/http_test.go @@ -3,9 +3,6 @@ package http import ( "context" "fmt" - "github.com/sirupsen/logrus" - "github.com/sirupsen/logrus/hooks/test" - "github.com/stretchr/testify/require" "io" "mokapi/config/dynamic" "mokapi/config/static" @@ -15,6 +12,10 @@ import ( "net/http/httptest" "testing" "time" + + "github.com/sirupsen/logrus" + "github.com/sirupsen/logrus/hooks/test" + "github.com/stretchr/testify/require" ) func TestProvider_Start(t *testing.T) { @@ -159,6 +160,28 @@ func TestProvider_Start(t *testing.T) { require.Equal(t, fmt.Sprintf("request to %v failed: request has timed out", url), hook.LastEntry().Message) }, }, + { + name: "content type", + init: func() (static.HttpProvider, *httptest.Server) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte("foo: bar")) + })) + + cfg := static.HttpProvider{ + Urls: []string{server.URL}, + } + + return cfg, server + }, + test: func(t *testing.T, url string, ch chan dynamic.ConfigEvent, hook *test.Hook, err error) { + require.NoError(t, err) + c := <-ch + require.Equal(t, "foo: bar", string(c.Config.Raw)) + require.Equal(t, "application/json", c.Config.Info.ContentType) + }, + }, } for _, tc := range testcases { From 8f0851bcdbb484a76433132bae533d03fffa457d Mon Sep 17 00:00:00 2001 From: marle3003 Date: Tue, 24 Mar 2026 17:39:44 +0100 Subject: [PATCH 05/31] fix(webui): improve displaying header controls in source view component test(javascript): add test for shared values --- js/mokapi/shared_test.go | 15 +++++++++++++++ webui/src/components/dashboard/SourceView.vue | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/js/mokapi/shared_test.go b/js/mokapi/shared_test.go index 70f80b246..3feed4d96 100644 --- a/js/mokapi/shared_test.go +++ b/js/mokapi/shared_test.go @@ -343,6 +343,21 @@ func TestModule_Shared(t *testing.T) { r.Equal(t, "bar", mokapi.Export(v)) }, }, + { + name: "delete field in object", + test: func(t *testing.T, newVm func() *goja.Runtime) { + vm1 := newVm() + + v, err := vm1.RunString(` + const m = require('mokapi'); + const shared = m.shared.update('foo', (v) => v ?? { foo: 'bar' }); + delete shared.foo + shared + `) + r.NoError(t, err) + r.Equal(t, map[string]any{}, mokapi.Export(v)) + }, + }, { name: "push array", test: func(t *testing.T, newVm func() *goja.Runtime) { diff --git a/webui/src/components/dashboard/SourceView.vue b/webui/src/components/dashboard/SourceView.vue index ead96826f..edef08be6 100644 --- a/webui/src/components/dashboard/SourceView.vue +++ b/webui/src/components/dashboard/SourceView.vue @@ -297,6 +297,12 @@ watch( place-content: center; border-right: 1px solid var(--source-border); } +.source-view .header .controls > a { + font-size: 0.9rem; + border-right: 1px solid var(--source-border); + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} .source-view .header button.active { background-color: black !important; outline: 1px solid var(--source-border); From ff98f63b98833faf337798e34ae23723a14142e6 Mon Sep 17 00:00:00 2001 From: marle3003 Date: Tue, 24 Mar 2026 18:08:27 +0100 Subject: [PATCH 06/31] test(imap): improve test --- imap/idle_test.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/imap/idle_test.go b/imap/idle_test.go index 4980c5eae..5be684545 100644 --- a/imap/idle_test.go +++ b/imap/idle_test.go @@ -188,25 +188,27 @@ func TestSendUpdatesWhileIdle(t *testing.T) { IdleFunc: func(w imap.UpdateWriter, done chan struct{}, session map[string]interface{}) error { session["idle"] = done go func() { + defer close(sent) + err := w.WriteNumMessages(10) require.NoError(t, err) err = w.WriteMessageFlags(20, []imap.Flag{imap.FlagSeen}) require.NoError(t, err) err = w.WriteExpunge(1) - sent <- true }() return nil }, }, } - defer s.Close() go func() { err := s.ListenAndServe() require.ErrorIs(t, err, imap.ErrServerClosed) }() - c := imap.NewClient(fmt.Sprintf("localhost:%v", p)) - defer func() { _ = c.Close() }() + defer func() { + _ = c.Close() + defer s.Close() + }() _, err := c.Dial() require.NoError(t, err) @@ -220,7 +222,11 @@ func TestSendUpdatesWhileIdle(t *testing.T) { require.NoError(t, err) require.Equal(t, "+ idling", res) - <-sent + select { + case <-sent: + case <-time.After(4 * time.Second): + t.Fatal("timeout waiting for updates") + } res, err = c.ReadLine() require.NoError(t, err) From 7ab4951468a2688c2cea06ee05fc9355f8ded6a8 Mon Sep 17 00:00:00 2001 From: marle3003 Date: Wed, 25 Mar 2026 17:52:29 +0100 Subject: [PATCH 07/31] fix(json parser): use Exportable interface when schema or property is not specified --- schema/json/parser/parser.go | 8 ++-- schema/json/parser/parser_object.go | 8 +++- schema/json/parser/parser_test.go | 57 +++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 6 deletions(-) diff --git a/schema/json/parser/parser.go b/schema/json/parser/parser.go index 453d3fa61..9cfaca690 100644 --- a/schema/json/parser/parser.go +++ b/schema/json/parser/parser.go @@ -43,14 +43,14 @@ func (p *Parser) Parse(data interface{}) (interface{}, error) { } func (p *Parser) parse(data interface{}, s *schema.Schema) (interface{}, error) { - if s == nil { - return data, nil - } - if e, ok := data.(Exportable); ok { data = e.Export() } + if s == nil { + return data, nil + } + if s.Boolean != nil { if *s.Boolean { return data, nil diff --git a/schema/json/parser/parser_object.go b/schema/json/parser/parser_object.go index 35974570a..6e4e5e729 100644 --- a/schema/json/parser/parser_object.go +++ b/schema/json/parser/parser_object.go @@ -9,8 +9,8 @@ import ( "regexp" "regexp/syntax" "sort" - "strings" "strconv" + "strings" ) func (p *Parser) parseObject(data interface{}, s *schema.Schema, evaluated map[string]bool) (*sortedmap.LinkedHashMap[string, interface{}], error) { @@ -253,7 +253,11 @@ func (p *Parser) parseMap(v reflect.Value, s *schema.Schema, evaluated map[strin name := fmt.Sprintf("%v", k.Interface()) if _, found := obj.Get(name); !found { o := v.MapIndex(k) - obj.Set(name, o.Interface()) + val := o.Interface() + if e, ok := val.(Exportable); ok { + val = e.Export() + } + obj.Set(name, val) } } } diff --git a/schema/json/parser/parser_test.go b/schema/json/parser/parser_test.go index 764bc1d9f..900dfdcf0 100644 --- a/schema/json/parser/parser_test.go +++ b/schema/json/parser/parser_test.go @@ -276,3 +276,60 @@ func TestParser_Null(t *testing.T) { }) } } + +type exportable struct { + export func() any +} + +func (e *exportable) Export() any { + return e.export() +} + +func TestParser_Exportable(t *testing.T) { + testcases := []struct { + name string + data interface{} + schema *schema.Schema + test func(t *testing.T, v interface{}, err error) + }{ + { + name: "schema integer", + data: &exportable{export: func() any { return 123 }}, + schema: schematest.New("integer"), + test: func(t *testing.T, v interface{}, err error) { + require.NoError(t, err) + require.Equal(t, int64(123), v) + }, + }, + { + name: "no schema", + data: &exportable{export: func() any { return 123 }}, + schema: nil, + test: func(t *testing.T, v interface{}, err error) { + require.NoError(t, err) + require.Equal(t, 123, v) + }, + }, + { + name: "exportable as additional property", + data: map[string]interface{}{"foo": &exportable{export: func() any { return 123 }}}, + schema: schematest.New("object"), + test: func(t *testing.T, v interface{}, err error) { + require.NoError(t, err) + require.Equal(t, map[string]any{"foo": 123}, v) + }, + }, + } + + t.Parallel() + for _, tc := range testcases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + p := &parser.Parser{Schema: tc.schema} + v, err := p.Parse(tc.data) + tc.test(t, v, err) + }) + } +} From 3d1b7bb4c57625ce9198882c97579d423db80239 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 07:43:17 +0000 Subject: [PATCH 08/31] build(deps): bump github.com/blevesearch/bleve_index_api Bumps [github.com/blevesearch/bleve_index_api](https://github.com/blevesearch/bleve_index_api) from 1.3.4 to 1.3.6. - [Commits](https://github.com/blevesearch/bleve_index_api/compare/v1.3.4...v1.3.6) --- updated-dependencies: - dependency-name: github.com/blevesearch/bleve_index_api dependency-version: 1.3.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0a9d6d4da..230869807 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.25.5 require ( github.com/Masterminds/sprig v2.22.0+incompatible github.com/blevesearch/bleve/v2 v2.5.7 - github.com/blevesearch/bleve_index_api v1.3.4 + github.com/blevesearch/bleve_index_api v1.3.6 github.com/bradleyfalzon/ghinstallation/v2 v2.18.0 github.com/brianvoe/gofakeit/v6 v6.28.0 github.com/dop251/goja v0.0.0-20250309171923-bcd7cc6bf64c diff --git a/go.sum b/go.sum index 01d4efdcc..d7cb64ea4 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCk github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/blevesearch/bleve/v2 v2.5.7 h1:2d9YrL5zrX5EBBW++GOaEKjE+NPWeZGaX77IM26m1Z8= github.com/blevesearch/bleve/v2 v2.5.7/go.mod h1:yj0NlS7ocGC4VOSAedqDDMktdh2935v2CSWOCDMHdSA= -github.com/blevesearch/bleve_index_api v1.3.4 h1:hZezxSRGFX4+/wiEn/a9xxBIo4BAJvqVfmZYoVzmjas= -github.com/blevesearch/bleve_index_api v1.3.4/go.mod h1:xvd48t5XMeeioWQ5/jZvgLrV98flT2rdvEJ3l/ki4Ko= +github.com/blevesearch/bleve_index_api v1.3.6 h1:Cp67NjekrlHh2KTDGpKM0hqMnBTBIBJVQVtEEzDnIaI= +github.com/blevesearch/bleve_index_api v1.3.6/go.mod h1:xvd48t5XMeeioWQ5/jZvgLrV98flT2rdvEJ3l/ki4Ko= github.com/blevesearch/geo v0.2.4 h1:ECIGQhw+QALCZaDcogRTNSJYQXRtC8/m8IKiA706cqk= github.com/blevesearch/geo v0.2.4/go.mod h1:K56Q33AzXt2YExVHGObtmRSFYZKYGv0JEN5mdacJJR8= github.com/blevesearch/go-faiss v1.0.26 h1:4dRLolFgjPyjkaXwff4NfbZFdE/dfywbzDqporeQvXI= From 1c2abde62a8cb21418a15c84939ed139351f2fb9 Mon Sep 17 00:00:00 2001 From: maesi Date: Fri, 27 Mar 2026 11:41:39 +0100 Subject: [PATCH 09/31] style(webui): hide column if number of content types is not one --- .../components/dashboard/http/request/HttpRequestCard.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webui/src/components/dashboard/http/request/HttpRequestCard.vue b/webui/src/components/dashboard/http/request/HttpRequestCard.vue index 14defafec..8118b9a87 100644 --- a/webui/src/components/dashboard/http/request/HttpRequestCard.vue +++ b/webui/src/components/dashboard/http/request/HttpRequestCard.vue @@ -111,9 +111,9 @@ function getSchemeClass(scheme: HttpSecurityScheme) {
-
-

Request content type

-

{{ operation.requestBody.contents[0]?.type }}

+
+

Request content type

+

{{ operation.requestBody.contents[0]?.type }}

Required

From 44e92ccb1a939cd0052949f2da52ca2606125bf5 Mon Sep 17 00:00:00 2001 From: maesi Date: Fri, 27 Mar 2026 18:36:45 +0100 Subject: [PATCH 10/31] chore(webui): improve bundle size --- examples/mokapi/services_http.js | 2 +- webui/package-lock.json | 198 ++++-------------- webui/package.json | 4 +- webui/src/ace-editor/ace-config.ts | 20 -- webui/src/ace-editor/ace-theme-mokapi-dark.js | 4 - .../src/ace-editor/ace-theme-mokapi-light.js | 4 - webui/src/ace-editor/mode-ldif.js | 30 --- .../components/dashboard/SchemaValidate.vue | 2 +- .../components/dashboard/ServiceInfoCard.vue | 8 +- webui/src/components/dashboard/SourceView.vue | 2 +- .../dashboard/http/HttpOperation.vue | 11 +- .../components/dashboard/http/HttpService.vue | 2 +- .../dashboard/http/HttpServicesCard.vue | 6 +- .../src/components/dashboard/http/Servers.vue | 4 +- .../dashboard/http/request/HttpParameters.vue | 8 +- .../dashboard/http/response/HeaderTable.vue | 6 +- .../http/response/HttpResponseCard.vue | 6 +- .../dashboard/kafka/KafkaServicesCard.vue | 6 +- .../components/dashboard/kafka/KafkaTopic.vue | 4 +- .../dashboard/kafka/KafkaTopics.vue | 4 +- .../src/components/dashboard/kafka/Server.vue | 6 +- .../components/dashboard/kafka/Servers.vue | 4 +- .../dashboard/kafka/TopicConfig.vue | 4 +- .../dashboard/ldap/LdapServicesCard.vue | 6 +- .../dashboard/mail/MailServicesCard.vue | 4 +- .../src/components/dashboard/mail/Mailbox.vue | 12 +- .../components/dashboard/mail/Mailboxes.vue | 4 +- webui/src/components/dashboard/mail/Rules.vue | 9 +- .../src/components/dashboard/mail/Servers.vue | 4 +- webui/src/components/docs/Examples.vue | 15 +- webui/src/composables/markdown.ts | 15 +- webui/src/main.ts | 20 +- webui/src/views/Ldap.vue | 2 +- webui/src/vue-modules.d.ts | 12 +- 34 files changed, 138 insertions(+), 310 deletions(-) delete mode 100644 webui/src/ace-editor/ace-config.ts delete mode 100644 webui/src/ace-editor/ace-theme-mokapi-dark.js delete mode 100644 webui/src/ace-editor/ace-theme-mokapi-light.js delete mode 100644 webui/src/ace-editor/mode-ldif.js diff --git a/examples/mokapi/services_http.js b/examples/mokapi/services_http.js index 9c5bc401e..e8065dbfb 100644 --- a/examples/mokapi/services_http.js +++ b/examples/mokapi/services_http.js @@ -377,7 +377,7 @@ export let apps = [ { method: "get", summary: "Finds Pets by status", - description: "Multiple status values can be provided with comma separated strings", + description: "Multiple status values **can** be provided with comma separated strings", operationId: "findPetsByStatus", tags: ["pet"], parameters: [ diff --git a/webui/package-lock.json b/webui/package-lock.json index ed1f7302c..347a2ea17 100644 --- a/webui/package-lock.json +++ b/webui/package-lock.json @@ -22,10 +22,12 @@ "del-cli": "^7.0.0", "express": "^5.2.1", "fuse.js": "^7.1.0", + "highlight.js": "^11.11.1", "http-status-codes": "^2.3.0", "js-yaml": "^4.1.1", "kafkajs": "^2.2.4", "ldapts": "^8.1.7", + "markdown-it": "^14.1.1", "markdown-it-container": "^4.0.0", "mime-types": "^3.0.2", "ncp": "^2.0.0", @@ -33,8 +35,6 @@ "vue": "^3.5.30", "vue-router": "^5.0.4", "vue3-ace-editor": "^2.2.4", - "vue3-highlightjs": "^1.0.5", - "vue3-markdown-it": "^1.0.10", "whatwg-mimetype": "^5.0.0", "xml-formatter": "^3.6.7" }, @@ -835,12 +835,14 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", + "dev": true, "license": "MIT" }, "node_modules/@types/markdown-it": { "version": "14.1.2", "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", + "dev": true, "license": "MIT", "dependencies": { "@types/linkify-it": "^5", @@ -861,6 +863,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", + "dev": true, "license": "MIT" }, "node_modules/@types/mokapi": { @@ -3546,12 +3549,12 @@ } }, "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", + "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", "license": "BSD-3-Clause", "engines": { - "node": "*" + "node": ">=12.0.0" } }, "node_modules/hookable": { @@ -4487,12 +4490,12 @@ } }, "node_modules/linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "license": "MIT", "dependencies": { - "uc.micro": "^1.0.1" + "uc.micro": "^2.0.0" } }, "node_modules/load-json-file": { @@ -4544,12 +4547,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash.flow": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/lodash.flow/-/lodash.flow-3.5.0.tgz", - "integrity": "sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==", - "license": "MIT" - }, "node_modules/magic-string": { "version": "0.30.21", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", @@ -4575,35 +4572,20 @@ } }, "node_modules/markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==", "license": "MIT", "dependencies": { "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" }, "bin": { - "markdown-it": "bin/markdown-it.js" - } - }, - "node_modules/markdown-it-abbr": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz", - "integrity": "sha512-ZeA4Z4SaBbYysZap5iZcxKmlPL6bYA8grqhzJIHB1ikn7njnzaP8uwbtuXc4YXD5LicI4/2Xmc0VwmSiFV04gg==", - "license": "MIT" - }, - "node_modules/markdown-it-anchor": { - "version": "8.6.7", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", - "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", - "license": "Unlicense", - "peerDependencies": { - "@types/markdown-it": "*", - "markdown-it": "*" + "markdown-it": "bin/markdown-it.mjs" } }, "node_modules/markdown-it-container": { @@ -4612,84 +4594,14 @@ "integrity": "sha512-HaNccxUH0l7BNGYbFbjmGpf5aLHAMTinqRZQAEQbMr2cdD3z91Q6kIo1oUn1CQndkT03jat6ckrdRYuwwqLlQw==", "license": "MIT" }, - "node_modules/markdown-it-deflist": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/markdown-it-deflist/-/markdown-it-deflist-2.1.0.tgz", - "integrity": "sha512-3OuqoRUlSxJiuQYu0cWTLHNhhq2xtoSFqsZK8plANg91+RJQU1ziQ6lA2LzmFAEes18uPBsHZpcX6We5l76Nzg==", - "license": "MIT" - }, - "node_modules/markdown-it-emoji": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz", - "integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ==", - "license": "MIT" - }, - "node_modules/markdown-it-footnote": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz", - "integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==", - "license": "MIT" - }, - "node_modules/markdown-it-highlightjs": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/markdown-it-highlightjs/-/markdown-it-highlightjs-3.6.0.tgz", - "integrity": "sha512-ex+Lq3cVkprh0GpGwFyc53A/rqY6GGzopPCG1xMsf8Ya3XtGC8Uw9tChN1rWbpyDae7tBBhVHVcMM29h4Btamw==", - "license": "Unlicense", - "dependencies": { - "highlight.js": "^11.3.1", - "lodash.flow": "^3.5.0" - } - }, - "node_modules/markdown-it-highlightjs/node_modules/highlight.js": { - "version": "11.11.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", - "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/markdown-it-ins": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/markdown-it-ins/-/markdown-it-ins-3.0.1.tgz", - "integrity": "sha512-32SSfZqSzqyAmmQ4SHvhxbFqSzPDqsZgMHDwxqPzp+v+t8RsmqsBZRG+RfRQskJko9PfKC2/oxyOs4Yg/CfiRw==", - "license": "MIT" - }, - "node_modules/markdown-it-mark": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz", - "integrity": "sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A==", - "license": "MIT" - }, - "node_modules/markdown-it-sub": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/markdown-it-sub/-/markdown-it-sub-1.0.0.tgz", - "integrity": "sha512-z2Rm/LzEE1wzwTSDrI+FlPEveAAbgdAdPhdWarq/ZGJrGW/uCQbKAnhoCsE4hAbc3SEym26+W2z/VQB0cQiA9Q==", - "license": "MIT" - }, - "node_modules/markdown-it-sup": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz", - "integrity": "sha512-E32m0nV9iyhRR7CrhnzL5msqic7rL1juWre6TQNxsnApg7Uf+F97JOKxUijg5YwXz86lZ0mqfOnutoryyNdntQ==", - "license": "MIT" - }, - "node_modules/markdown-it-task-lists": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz", - "integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==", - "license": "ISC" - }, - "node_modules/markdown-it-toc-done-right": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/markdown-it-toc-done-right/-/markdown-it-toc-done-right-4.2.0.tgz", - "integrity": "sha512-UB/IbzjWazwTlNAX0pvWNlJS8NKsOQ4syrXZQ/C72j+jirrsjVRT627lCaylrKJFBQWfRsPmIVQie8x38DEhAQ==", - "license": "MIT" - }, "node_modules/markdown-it/node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } @@ -4704,9 +4616,9 @@ } }, "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "license": "MIT" }, "node_modules/media-typer": { @@ -5611,6 +5523,15 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { "version": "6.14.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", @@ -6675,9 +6596,9 @@ } }, "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "license": "MIT" }, "node_modules/ufo": { @@ -7081,39 +7002,6 @@ "vue": "^3" } }, - "node_modules/vue3-highlightjs": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/vue3-highlightjs/-/vue3-highlightjs-1.0.5.tgz", - "integrity": "sha512-Q4YNPXu0X5VMBnwPVOk+IQf1Ohp9jFdMitEAmzaz8qVVefcQpN6Dx4BnDGKxja3TLDVF+EgL136wC8YzmoCX9w==", - "license": "ISC", - "dependencies": { - "highlight.js": "^10.3.2" - }, - "peerDependencies": { - "vue": "^3.0.0" - } - }, - "node_modules/vue3-markdown-it": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/vue3-markdown-it/-/vue3-markdown-it-1.0.10.tgz", - "integrity": "sha512-mTvHu0zl7jrh7ojgaZ+tTpCLiS4CVg4bTgTu4KGhw/cRRY5YgIG8QgFAPu6kCzSW6Znc9a52Beb6hFvF4hSMkQ==", - "license": "MIT", - "dependencies": { - "markdown-it": "^12.3.2", - "markdown-it-abbr": "^1.0.4", - "markdown-it-anchor": "^8.4.1", - "markdown-it-deflist": "^2.1.0", - "markdown-it-emoji": "^2.0.0", - "markdown-it-footnote": "^3.0.3", - "markdown-it-highlightjs": "^3.6.0", - "markdown-it-ins": "^3.0.1", - "markdown-it-mark": "^3.0.1", - "markdown-it-sub": "^1.0.0", - "markdown-it-sup": "^1.0.0", - "markdown-it-task-lists": "^2.1.1", - "markdown-it-toc-done-right": "^4.2.0" - } - }, "node_modules/webpack-virtual-modules": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", diff --git a/webui/package.json b/webui/package.json index ce3cd6bbe..069229f3c 100644 --- a/webui/package.json +++ b/webui/package.json @@ -31,10 +31,12 @@ "del-cli": "^7.0.0", "express": "^5.2.1", "fuse.js": "^7.1.0", + "highlight.js": "^11.11.1", "http-status-codes": "^2.3.0", "js-yaml": "^4.1.1", "kafkajs": "^2.2.4", "ldapts": "^8.1.7", + "markdown-it": "^14.1.1", "markdown-it-container": "^4.0.0", "mime-types": "^3.0.2", "ncp": "^2.0.0", @@ -42,8 +44,6 @@ "vue": "^3.5.30", "vue-router": "^5.0.4", "vue3-ace-editor": "^2.2.4", - "vue3-highlightjs": "^1.0.5", - "vue3-markdown-it": "^1.0.10", "whatwg-mimetype": "^5.0.0", "xml-formatter": "^3.6.7" }, diff --git a/webui/src/ace-editor/ace-config.ts b/webui/src/ace-editor/ace-config.ts deleted file mode 100644 index 41bbf7cb0..000000000 --- a/webui/src/ace-editor/ace-config.ts +++ /dev/null @@ -1,20 +0,0 @@ -import ace from "ace-builds/src-noconflict/ace"; - -import 'ace-builds' -import 'ace-builds/src-noconflict/mode-json' -import 'ace-builds/src-noconflict/mode-xml' -import 'ace-builds/src-noconflict/mode-yaml' -import 'ace-builds/src-noconflict/mode-javascript' -import '@/ace-editor/ace-theme-mokapi-dark.js' -import '@/ace-editor/ace-theme-mokapi-light.js' -import '@/ace-editor/mode-ldif.js' - -ace.config.set("useWorker", false); - -// ace.config.setModuleUrl('ace/mode/json', modeJsonUrl) -// ace.config.setModuleUrl('ace/mode/xml', xmlUrl) -// ace.config.setModuleUrl('ace/mode/yaml', yamlUrl) -// ace.config.setModuleUrl('ace/mode/javascript', jsUrl) - -// ace.config.setModuleUrl('ace/theme/mokapi-dark', mokapi_dark) -// ace.config.setModuleUrl('ace/theme/mokapi-light', mokapi_light) diff --git a/webui/src/ace-editor/ace-theme-mokapi-dark.js b/webui/src/ace-editor/ace-theme-mokapi-dark.js deleted file mode 100644 index 5688d4470..000000000 --- a/webui/src/ace-editor/ace-theme-mokapi-dark.js +++ /dev/null @@ -1,4 +0,0 @@ -ace.define("ace/theme/mokapi-dark", [], function(require, exports, module){ - exports.isDark = true; - exports.cssClass = "ace-mokapi-dark"; -}); \ No newline at end of file diff --git a/webui/src/ace-editor/ace-theme-mokapi-light.js b/webui/src/ace-editor/ace-theme-mokapi-light.js deleted file mode 100644 index bf4ac7337..000000000 --- a/webui/src/ace-editor/ace-theme-mokapi-light.js +++ /dev/null @@ -1,4 +0,0 @@ -ace.define("ace/theme/mokapi-light", [], function(require, exports, module){ - exports.isDark = false; - exports.cssClass = "ace-mokapi-light"; -}); \ No newline at end of file diff --git a/webui/src/ace-editor/mode-ldif.js b/webui/src/ace-editor/mode-ldif.js deleted file mode 100644 index 8c60af5ae..000000000 --- a/webui/src/ace-editor/mode-ldif.js +++ /dev/null @@ -1,30 +0,0 @@ -import ace from "ace-builds/src-noconflict/ace"; - -ace.define("ace/mode/ldif", function(require, exports) { - const TextMode = require("ace/mode/text").Mode; - const Tokenizer = require("ace/tokenizer").Tokenizer; - const TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules; - - // Proper highlight rules class - class LdifHighlightRules extends TextHighlightRules { - constructor() { - super(); - this.$rules = { - start: [ - { token: "dn", regex: "^dn:.*$" }, - { token: "keyword", regex: "^[a-zA-Z]+:" }, - { token: "comment", regex: "^#.*$" }, - { token: "text", regex: ".+" } - ] - }; - } - } - - exports.Mode = class LdifMode extends TextMode { - constructor() { - super(); - this.HighlightRules = LdifHighlightRules; - this.$id = "ace/mode/ldif"; - } - }; -}); diff --git a/webui/src/components/dashboard/SchemaValidate.vue b/webui/src/components/dashboard/SchemaValidate.vue index efdf624be..2178aed52 100644 --- a/webui/src/components/dashboard/SchemaValidate.vue +++ b/webui/src/components/dashboard/SchemaValidate.vue @@ -1,7 +1,7 @@