From 3109800950ebbc0656c52f1f233b7cab38067e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20SZKIBA?= Date: Fri, 30 Aug 2024 13:57:23 +0200 Subject: [PATCH] feat: Integrate k6lint and perform a compliance check after each modification. --- CONTRIBUTING.md | 5 +- README.md | 434 +++--------------- action.yml | 4 + cmd/api.go | 332 ++++++++++++++ cmd/cmd.go | 25 +- cmd/context.go | 54 ++- cmd/help.md | 2 + cmd/k6registry/main.go | 4 + cmd/lint.go | 134 ++++++ cmd/load.go | 53 +-- docs/example-api.txt | 57 +++ docs/example-api/category/authentication.json | 1 + docs/example-api/category/browser.json | 1 + docs/example-api/category/data.json | 89 ++++ docs/example-api/category/kubernetes.json | 61 +++ docs/example-api/category/messaging.json | 1 + docs/example-api/category/misc.json | 160 +++++++ docs/example-api/category/observability.json | 74 +++ docs/example-api/category/protocol.json | 1 + docs/example-api/category/reporting.json | 74 +++ docs/example-api/grade/A.json | 124 +++++ docs/example-api/grade/B.json | 1 + docs/example-api/grade/C.json | 133 ++++++ docs/example-api/grade/D.json | 1 + docs/example-api/grade/E.json | 1 + docs/example-api/grade/F.json | 1 + docs/example-api/grade/passing/A.json | 124 +++++ docs/example-api/grade/passing/B.json | 124 +++++ docs/example-api/grade/passing/C.json | 255 ++++++++++ docs/example-api/grade/passing/D.json | 255 ++++++++++ docs/example-api/grade/passing/E.json | 255 ++++++++++ docs/example-api/grade/passing/F.json | 255 ++++++++++ .../grafana/xk6-dashboard/badge.svg | 1 + .../grafana/xk6-dashboard/extension.json | 72 +++ .../grafana/xk6-disruptor/badge.svg | 1 + .../grafana/xk6-disruptor/extension.json | 59 +++ .../github.com/grafana/xk6-sql/badge.svg | 1 + .../github.com/grafana/xk6-sql/extension.json | 45 ++ .../github.com/szkiba/xk6-faker/badge.svg | 1 + .../szkiba/xk6-faker/extension.json | 42 ++ .../gitlab.com/szkiba/xk6-banner/badge.svg | 1 + .../szkiba/xk6-banner/extension.json | 35 ++ .../module/go.k6.io/k6/extension.json | 123 +++++ docs/example-api/product/cloud.json | 170 +++++++ docs/example-api/product/oss.json | 378 +++++++++++++++ docs/example-api/registry.json | 378 +++++++++++++++ docs/example-api/registry.schema.json | 239 ++++++++++ docs/example-api/tier/community.json | 79 ++++ docs/example-api/tier/official.json | 301 ++++++++++++ docs/example.json | 359 --------------- docs/registry.md | 18 + docs/registry.schema.json | 36 ++ docs/registry.schema.yaml | 34 +- go.mod | 47 +- go.sum | 196 +++++++- registry.go | 25 + registry_gen.go | 38 +- releases/v0.1.14.md | 77 ++++ 58 files changed, 5080 insertions(+), 771 deletions(-) create mode 100644 cmd/api.go create mode 100644 cmd/lint.go create mode 100644 docs/example-api.txt create mode 100644 docs/example-api/category/authentication.json create mode 100644 docs/example-api/category/browser.json create mode 100644 docs/example-api/category/data.json create mode 100644 docs/example-api/category/kubernetes.json create mode 100644 docs/example-api/category/messaging.json create mode 100644 docs/example-api/category/misc.json create mode 100644 docs/example-api/category/observability.json create mode 100644 docs/example-api/category/protocol.json create mode 100644 docs/example-api/category/reporting.json create mode 100644 docs/example-api/grade/A.json create mode 100644 docs/example-api/grade/B.json create mode 100644 docs/example-api/grade/C.json create mode 100644 docs/example-api/grade/D.json create mode 100644 docs/example-api/grade/E.json create mode 100644 docs/example-api/grade/F.json create mode 100644 docs/example-api/grade/passing/A.json create mode 100644 docs/example-api/grade/passing/B.json create mode 100644 docs/example-api/grade/passing/C.json create mode 100644 docs/example-api/grade/passing/D.json create mode 100644 docs/example-api/grade/passing/E.json create mode 100644 docs/example-api/grade/passing/F.json create mode 100644 docs/example-api/module/github.com/grafana/xk6-dashboard/badge.svg create mode 100644 docs/example-api/module/github.com/grafana/xk6-dashboard/extension.json create mode 100644 docs/example-api/module/github.com/grafana/xk6-disruptor/badge.svg create mode 100644 docs/example-api/module/github.com/grafana/xk6-disruptor/extension.json create mode 100644 docs/example-api/module/github.com/grafana/xk6-sql/badge.svg create mode 100644 docs/example-api/module/github.com/grafana/xk6-sql/extension.json create mode 100644 docs/example-api/module/github.com/szkiba/xk6-faker/badge.svg create mode 100644 docs/example-api/module/github.com/szkiba/xk6-faker/extension.json create mode 100644 docs/example-api/module/gitlab.com/szkiba/xk6-banner/badge.svg create mode 100644 docs/example-api/module/gitlab.com/szkiba/xk6-banner/extension.json create mode 100644 docs/example-api/module/go.k6.io/k6/extension.json create mode 100644 docs/example-api/product/cloud.json create mode 100644 docs/example-api/product/oss.json create mode 100644 docs/example-api/registry.json create mode 100644 docs/example-api/registry.schema.json create mode 100644 docs/example-api/tier/community.json create mode 100644 docs/example-api/tier/official.json create mode 100644 releases/v0.1.14.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11795cb..179153e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ The JSON schema of the registry can be found in the [registry.schema.yaml] file, ```bash yq -o=json -P docs/registry.schema.yaml > docs/registry.schema.json -go-jsonschema --capitalization URL -p k6registry --only-models -o registry_gen.go docs/registry.schema.yaml +go-jsonschema --capitalization URL --capitalization OSS -p k6registry --only-models -o registry_gen.go docs/registry.schema.yaml ``` [registry.schema.json]: docs/registry.schema.json @@ -53,7 +53,8 @@ go-jsonschema --capitalization URL -p k6registry --only-models -o registry_gen.g The example registry can be found in [example.yaml] file, the documentation ([registry.md], [README.md]) must be updated after modification. ```bash -go run ./cmd/k6registry --lint docs/example.yaml > docs/example.json +go run ./cmd/k6registry --lint -o docs/example.json --api docs/example-api docs/example.yaml +tree -n --noreport --filesfirst -o docs/example-api.txt docs/example-api mdcode update docs/registry.md mdcode update README.md ``` diff --git a/README.md b/README.md index 006a705..0351e39 100644 --- a/README.md +++ b/README.md @@ -56,365 +56,6 @@ Check [k6 Extension Registry Concept](docs/registry.md) for information on desig Registry generated from the source above. ```json file=docs/example.json -[ - { - "categories": [ - "reporting", - "observability" - ], - "description": "Web-based metrics dashboard for k6", - "module": "github.com/grafana/xk6-dashboard", - "outputs": [ - "dashboard" - ], - "products": [ - "oss" - ], - "repo": { - "clone_url": "https://github.com/grafana/xk6-dashboard.git", - "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", - "homepage": "https://github.com/grafana/xk6-dashboard", - "license": "AGPL-3.0", - "name": "xk6-dashboard", - "owner": "grafana", - "public": true, - "stars": 325, - "timestamp": 1719907965, - "topics": [ - "xk6", - "xk6-official", - "xk6-output-dashboard" - ], - "url": "https://github.com/grafana/xk6-dashboard", - "versions": [ - "v0.7.5", - "v0.7.4", - "v0.7.3", - "v0.7.3-alpha.1", - "v0.7.2", - "v0.7.1", - "v0.7.0", - "v0.7.0-apha.3", - "v0.7.0-alpha.5", - "v0.7.0-alpha.4", - "v0.7.0-alpha.3", - "v0.7.0-alpha.2", - "v0.7.0-alpha.1", - "v0.6.1", - "v0.6.0", - "v0.5.5", - "v0.5.4", - "v0.5.3", - "v0.5.2", - "v0.5.1", - "v0.5.0", - "v0.4.4", - "v0.4.3", - "v0.4.2", - "v0.4.1", - "v0.4.0", - "v0.3.2", - "v0.3.1", - "v0.3.0", - "v0.2.0", - "v0.1.3", - "v0.1.2", - "v0.1.1", - "v0.1.0" - ] - }, - "tier": "official" - }, - { - "categories": [ - "data" - ], - "description": "Load test SQL Servers", - "imports": [ - "k6/x/sql" - ], - "module": "github.com/grafana/xk6-sql", - "products": [ - "cloud", - "oss" - ], - "repo": { - "clone_url": "https://github.com/grafana/xk6-sql.git", - "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", - "homepage": "https://github.com/grafana/xk6-sql", - "license": "Apache-2.0", - "name": "xk6-sql", - "owner": "grafana", - "public": true, - "stars": 104, - "timestamp": 1721400602, - "topics": [ - "k6", - "sql", - "xk6" - ], - "url": "https://github.com/grafana/xk6-sql", - "versions": [ - "v0.4.0", - "v0.3.0", - "v0.2.1", - "v0.2.0", - "v0.1.1", - "v0.1.0", - "v0.0.1" - ] - }, - "tier": "official" - }, - { - "categories": [ - "kubernetes" - ], - "description": "Inject faults to test", - "imports": [ - "k6/x/disruptor" - ], - "module": "github.com/grafana/xk6-disruptor", - "products": [ - "oss" - ], - "repo": { - "clone_url": "https://github.com/grafana/xk6-disruptor.git", - "description": "Extension for injecting faults into k6 tests", - "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", - "license": "AGPL-3.0", - "name": "xk6-disruptor", - "owner": "grafana", - "public": true, - "stars": 88, - "timestamp": 1724358828, - "topics": [ - "chaos-engineering", - "fault-injection", - "k6", - "testing", - "xk6" - ], - "url": "https://github.com/grafana/xk6-disruptor", - "versions": [ - "v0.3.11", - "v0.3.10", - "v0.3.9", - "v0.3.8", - "v0.3.7", - "v0.3.6", - "v0.3.5", - "v0.3.5-rc2", - "v0.3.5-rc1", - "v0.3.4", - "v0.3.3", - "v0.3.2", - "v0.3.1", - "v0.3.0", - "v0.2.1", - "v0.2.0", - "v0.1.3", - "v0.1.2", - "v0.1.1", - "v0.1.0" - ] - }, - "tier": "official" - }, - { - "categories": [ - "data" - ], - "description": "Generate random fake data", - "imports": [ - "k6/x/faker" - ], - "module": "github.com/szkiba/xk6-faker", - "products": [ - "oss" - ], - "repo": { - "clone_url": "https://github.com/szkiba/xk6-faker.git", - "description": "Random fake data generator for k6.", - "homepage": "http://ivan.szkiba.hu/xk6-faker/", - "license": "AGPL-3.0", - "name": "xk6-faker", - "owner": "szkiba", - "public": true, - "stars": 49, - "timestamp": 1719935566, - "topics": [ - "xk6", - "xk6-javascript-k6-x-faker" - ], - "url": "https://github.com/szkiba/xk6-faker", - "versions": [ - "v0.3.0", - "v0.3.0-alpha.1", - "v0.2.2", - "v0.2.1", - "v0.2.0", - "v0.1.0" - ] - }, - "tier": "community" - }, - { - "categories": [ - "misc" - ], - "description": "Print ASCII art banner from k6 test", - "imports": [ - "k6/x/banner" - ], - "module": "gitlab.com/szkiba/xk6-banner", - "products": [ - "oss" - ], - "repo": { - "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", - "description": "Print ASCII art banner from k6 test.", - "homepage": "https://gitlab.com/szkiba/xk6-banner", - "license": "MIT", - "name": "xk6-banner", - "owner": "szkiba", - "public": true, - "timestamp": 1724312566, - "topics": [ - "xk6" - ], - "url": "https://gitlab.com/szkiba/xk6-banner", - "versions": [ - "v0.1.0" - ] - }, - "tier": "community" - }, - { - "categories": [ - "misc" - ], - "description": "A modern load testing tool, using Go and JavaScript", - "module": "go.k6.io/k6", - "products": [ - "cloud", - "oss" - ], - "repo": { - "clone_url": "https://github.com/grafana/k6.git", - "description": "A modern load testing tool, using Go and JavaScript - https://k6.io", - "homepage": "https://github.com/grafana/k6", - "license": "AGPL-3.0", - "name": "k6", - "owner": "grafana", - "public": true, - "topics": [ - "es6", - "go", - "golang", - "hacktoberfest", - "javascript", - "load-generator", - "load-testing", - "performance" - ], - "url": "https://github.com/grafana/k6", - "versions": [ - "v0.53.0", - "v0.52.0", - "v0.51.0", - "v0.50.0", - "v0.49.0", - "v0.48.0", - "v0.47.0", - "v0.46.0", - "v0.45.1", - "v0.45.0", - "v0.44.1", - "v0.44.0", - "v0.43.1", - "v0.43.0", - "v0.42.0", - "v0.41.0", - "v0.40.0", - "v0.39.0", - "v0.38.3", - "v0.38.2", - "v0.38.1", - "v0.38.0", - "v0.37.0", - "v0.36.0", - "v0.35.0", - "v0.34.1", - "v0.34.0", - "v0.33.0", - "v0.32.0", - "v0.31.1", - "v0.31.0", - "v0.30.0", - "v0.29.0", - "v0.28.0", - "v0.27.1", - "v0.27.0", - "v0.26.2", - "v0.26.1", - "v0.26.0", - "v0.25.1", - "v0.25.0", - "v0.24.0", - "v0.23.1", - "v0.23.0", - "v0.22.1", - "v0.22.0", - "v0.21.1", - "v0.21.0", - "v0.20.0", - "v0.19.0", - "v0.18.2", - "v0.18.1", - "v0.18.0", - "v0.17.2", - "v0.17.1", - "v0.17.0", - "v0.16.0", - "v0.15.0", - "v0.14.0", - "v0.13.0", - "v0.12.2", - "v0.12.1", - "v0.11.0", - "v0.10.0", - "v0.9.3", - "v0.9.2", - "v0.9.1", - "v0.9.0", - "v0.8.5", - "v0.8.4", - "v0.8.3", - "v0.8.2", - "v0.8.1", - "v0.8.0", - "v0.7.0", - "v0.6.0", - "v0.5.2", - "v0.5.1", - "v0.5.0", - "v0.4.5", - "v0.4.4", - "v0.4.3", - "v0.4.2", - "v0.4.1", - "v0.4.0", - "v0.3.0", - "v0.2.1", - "v0.2.0", - "v0.0.2", - "v0.0.1" - ] - }, - "tier": "official" - } -] ``` @@ -449,6 +90,7 @@ name | reqired | default | description -------|---------|---------|------------- in | yes | | input file name out | no | stdout | output file name +api | no | | output directory name mute | no | `false` | no output, only validation loose | no | `false` | skip JSON schema validation lint | no | `false` | enable built-in linter @@ -457,6 +99,8 @@ ref | no | | reference output URL for change detection In GitHub action mode, the change can be indicated by comparing the output to a reference output. The reference output URL can be passed in the `ref` action parameter. The `changed` output variable will be `true` or `false` depending on whether the output has changed or not compared to the reference output. +The `api` parameter can be used to specify a directory into which the outputs are written. The `registry.json` file is placed in the root directory. The `extension.json` file and the `badge.svg` file are placed in a directory with the same name as the go module path of the extension (if the `lint` parameter is `true`). + **Outputs** name | description @@ -493,6 +137,7 @@ Repository metadata is collected using the API of the extensions' git repository The output of the generation will be written to the standard output by default. The output can be saved to a file using the `-o/--out` flag. +The `--api` flag can be used to specify a directory to which the outputs will be written. The `registry.json` file is placed in the root directory. The `extension.json` file and the `badge.svg` file (if the `--lint` flag is used) are placed in a directory with the same name as the extension's go module path. ``` k6registry [flags] [source-file] @@ -502,6 +147,7 @@ k6registry [flags] [source-file] ``` -o, --out string write output to file instead of stdout + --api string write outputs to directory instead of stdout -q, --quiet no output, only validation --loose skip JSON schema validation --lint enable built-in linter @@ -512,6 +158,76 @@ k6registry [flags] [source-file] +## API in the filesystem + +By using the `--api` flag, files are created with relative paths in a base directory with a kind of REST API logic: +- in the `module` directory, a directory with the same name as the path of the extension module + - `badge.svg` badge generated based on the compliance grade + - `extension.json` extension data in a separate file +- the subdirectories of the base directory contain subsets of the registry broken down according to different properties (`tier`, `product`, `category`, `grade`) + +```ascii file=docs/example-api.txt +docs/example-api +├── registry.json +├── registry.schema.json +├── category +│   ├── authentication.json +│   ├── browser.json +│   ├── data.json +│   ├── kubernetes.json +│   ├── messaging.json +│   ├── misc.json +│   ├── observability.json +│   ├── protocol.json +│   └── reporting.json +├── grade +│   ├── A.json +│   ├── B.json +│   ├── C.json +│   ├── D.json +│   ├── E.json +│   ├── F.json +│   └── passing +│   ├── A.json +│   ├── B.json +│   ├── C.json +│   ├── D.json +│   ├── E.json +│   └── F.json +├── module +│   ├── github.com +│   │   ├── grafana +│   │   │   ├── xk6-dashboard +│   │   │   │   ├── badge.svg +│   │   │   │   └── extension.json +│   │   │   ├── xk6-disruptor +│   │   │   │   ├── badge.svg +│   │   │   │   └── extension.json +│   │   │   └── xk6-sql +│   │   │   ├── badge.svg +│   │   │   └── extension.json +│   │   └── szkiba +│   │   └── xk6-faker +│   │   ├── badge.svg +│   │   └── extension.json +│   ├── gitlab.com +│   │   └── szkiba +│   │   └── xk6-banner +│   │   ├── badge.svg +│   │   └── extension.json +│   └── go.k6.io +│   └── k6 +│   └── extension.json +├── product +│   ├── cloud.json +│   └── oss.json +└── tier + ├── community.json + └── official.json +``` + +The primary purpose of the `--api` flag is to support a custom *k6 extension registry* instance. + ## Contribure If you want to contribute, start by reading [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/action.yml b/action.yml index 62411a0..eeb6951 100644 --- a/action.yml +++ b/action.yml @@ -15,6 +15,10 @@ inputs: description: output file name required: false + api: + description: api directory name + required: false + mute: description: no output, only validation required: false diff --git a/cmd/api.go b/cmd/api.go new file mode 100644 index 0000000..69a1e7f --- /dev/null +++ b/cmd/api.go @@ -0,0 +1,332 @@ +package cmd + +import ( + "encoding/json" + "os" + "path/filepath" + + "github.com/grafana/k6registry" + "github.com/narqo/go-badge" +) + +func writeAPI(registry k6registry.Registry, target string) error { + if err := writeAPIGroupGlobal(registry, target); err != nil { + return err + } + + if err := writeAPIGroupModule(registry, target); err != nil { + return err + } + + if err := writeAPIGroupSubset(registry, target); err != nil { + return err + } + + return nil +} + +//nolint:forbidigo +func writeAPIGroupGlobal(registry k6registry.Registry, target string) error { + filename := filepath.Join(target, "registry.schema.json") + + if err := os.WriteFile(filename, k6registry.Schema, 0o600); err != nil { + return err + } + + filename = filepath.Join(target, "registry.json") + + data, err := json.MarshalIndent(registry, "", " ") + if err != nil { + return err + } + + return os.WriteFile(filename, data, 0o600) +} + +//nolint:forbidigo +func writeAPIGroupModule(registry k6registry.Registry, target string) error { + base := filepath.Join(target, "module") + + if err := os.MkdirAll(base, 0o750); err != nil { + return err + } + + for _, ext := range registry { + dir := filepath.Join(base, ext.Module) + + if err := os.MkdirAll(dir, 0o750); err != nil { + return err + } + + filename := filepath.Join(dir, "badge.svg") + + if ext.Compliance != nil { + b, err := badge.RenderBytes("k6 registry", string(ext.Compliance.Grade), badgecolor(ext.Compliance.Grade)) + if err != nil { + return err + } + + err = os.WriteFile(filename, b, 0o600) + if err != nil { + return err + } + } + + filename = filepath.Join(dir, "extension.json") + + data, err := json.MarshalIndent(ext, "", " ") + if err != nil { + return err + } + + if err = os.WriteFile(filename, data, 0o600); err != nil { + return err + } + } + + return nil +} + +func writeAPIGroupSubset(registry k6registry.Registry, target string) error { + if err := writeAPISubsetProduct(registry, target); err != nil { + return err + } + + if err := writeAPISubsetTier(registry, target); err != nil { + return err + } + + if err := writeAPISubsetGrade(registry, target); err != nil { + return err + } + + return writeAPISubsetCategory(registry, target) +} + +//nolint:forbidigo +func writeAPISubsetProduct(registry k6registry.Registry, target string) error { + base := filepath.Join(target, "product") + + if err := os.MkdirAll(base, 0o750); err != nil { + return err + } + + products := make(map[k6registry.Product]k6registry.Registry, len(k6registry.Products)) + + for _, ext := range registry { + for _, prod := range ext.Products { + reg, found := products[prod] + if !found { + reg = make(k6registry.Registry, 0) + } + + reg = append(reg, ext) + products[prod] = reg + } + } + + for prod, reg := range products { + data, err := json.MarshalIndent(reg, "", " ") + if err != nil { + return err + } + + err = os.WriteFile(filepath.Join(base, string(prod)+".json"), data, 0o600) + if err != nil { + return err + } + } + + return nil +} + +//nolint:forbidigo +func writeAPISubsetTier(registry k6registry.Registry, target string) error { + base := filepath.Join(target, "tier") + + if err := os.MkdirAll(base, 0o750); err != nil { + return err + } + + tiers := make(map[k6registry.Tier]k6registry.Registry, len(k6registry.Tiers)) + + for _, ext := range registry { + if len(ext.Tier) == 0 { + continue + } + + reg, found := tiers[ext.Tier] + if !found { + reg = make(k6registry.Registry, 0) + } + + reg = append(reg, ext) + tiers[ext.Tier] = reg + } + + for tier, reg := range tiers { + data, err := json.MarshalIndent(reg, "", " ") + if err != nil { + return err + } + + err = os.WriteFile(filepath.Join(base, string(tier)+".json"), data, 0o600) + if err != nil { + return err + } + } + + return nil +} + +//nolint:forbidigo +func writeAPISubsetGrade(registry k6registry.Registry, target string) error { + base := filepath.Join(target, "grade") + + if err := os.MkdirAll(base, 0o750); err != nil { + return err + } + + grades := make(map[k6registry.Grade]k6registry.Registry, len(k6registry.Grades)) + + for _, grade := range k6registry.Grades { + grades[grade] = make(k6registry.Registry, 0) + } + + for _, ext := range registry { + if ext.Compliance == nil || len(ext.Compliance.Grade) == 0 { + continue + } + + reg, found := grades[ext.Compliance.Grade] + if !found { + reg = make(k6registry.Registry, 0) + } + + reg = append(reg, ext) + grades[ext.Compliance.Grade] = reg + } + + for grade, reg := range grades { + data, err := json.MarshalIndent(reg, "", " ") + if err != nil { + return err + } + + err = os.WriteFile(filepath.Join(base, string(grade)+".json"), data, 0o600) + if err != nil { + return err + } + } + + return writeAPISubsetGradePassing(registry, target) +} + +//nolint:forbidigo +func writeAPISubsetGradePassing(registry k6registry.Registry, target string) error { + base := filepath.Join(target, "grade", "passing") + + if err := os.MkdirAll(base, 0o750); err != nil { + return err + } + + grades := make(map[k6registry.Grade]k6registry.Registry, len(k6registry.Grades)) + + for _, grade := range k6registry.Grades { + grades[grade] = make(k6registry.Registry, 0) + } + + for _, ext := range registry { + if ext.Compliance == nil || len(ext.Compliance.Grade) == 0 { + continue + } + + for _, grade := range k6registry.Grades { + if ext.Compliance.Grade > grade { + continue + } + + reg, found := grades[grade] + if !found { + reg = make(k6registry.Registry, 0) + } + + reg = append(reg, ext) + grades[grade] = reg + } + } + + for grade, reg := range grades { + data, err := json.MarshalIndent(reg, "", " ") + if err != nil { + return err + } + + err = os.WriteFile(filepath.Join(base, string(grade)+".json"), data, 0o600) + if err != nil { + return err + } + } + + return nil +} + +//nolint:forbidigo +func writeAPISubsetCategory(registry k6registry.Registry, target string) error { + base := filepath.Join(target, "category") + + if err := os.MkdirAll(base, 0o750); err != nil { + return err + } + + categories := make(map[k6registry.Category]k6registry.Registry, len(k6registry.Categories)) + + for _, category := range k6registry.Categories { + categories[category] = make(k6registry.Registry, 0) + } + + for _, ext := range registry { + for _, cat := range ext.Categories { + reg, found := categories[cat] + if !found { + reg = make(k6registry.Registry, 0) + } + + reg = append(reg, ext) + categories[cat] = reg + } + } + + for cat, reg := range categories { + data, err := json.MarshalIndent(reg, "", " ") + if err != nil { + return err + } + + err = os.WriteFile(filepath.Join(base, string(cat)+".json"), data, 0o600) + if err != nil { + return err + } + } + + return nil +} + +func badgecolor(grade k6registry.Grade) badge.Color { + switch grade { + case k6registry.GradeA: + return "brightgreen" + case k6registry.GradeB: + return "green" + case k6registry.GradeC: + return "yellowgreen" + case k6registry.GradeD: + return "orange" + case k6registry.GradeE: + return "yellow" + case k6registry.GradeF: + return "red" + default: + return "blue" + } +} diff --git a/cmd/cmd.go b/cmd/cmd.go index e906e0d..883f489 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -19,6 +19,7 @@ type options struct { quiet bool loose bool lint bool + api string } // New creates new cobra command for exec command. @@ -45,7 +46,7 @@ func New() (*cobra.Command, error) { }, } - ctx, err := newContext(context.TODO()) + ctx, err := newContext(context.TODO(), root.Root().Name()) if err != nil { return nil, err } @@ -57,6 +58,7 @@ func New() (*cobra.Command, error) { flags.SortFlags = false flags.StringVarP(&opts.out, "out", "o", "", "write output to file instead of stdout") + flags.StringVar(&opts.api, "api", "", "write outputs to directory instead of stdout") flags.BoolVarP(&opts.quiet, "quiet", "q", false, "no output, only validation") flags.BoolVar(&opts.loose, "loose", false, "skip JSON schema validation") flags.BoolVar(&opts.lint, "lint", false, "enable built-in linter") @@ -74,6 +76,16 @@ func New() (*cobra.Command, error) { //nolint:forbidigo func run(ctx context.Context, args []string, opts *options) (result error) { + if len(opts.api) != 0 { + if err := os.MkdirAll(opts.api, 0o750); err != nil { + return err + } + + if len(opts.out) == 0 { + opts.quiet = true + } + } + input := os.Stdin if len(args) > 0 { @@ -115,6 +127,10 @@ func run(ctx context.Context, args []string, opts *options) (result error) { return err } + if len(opts.api) != 0 { + return writeAPI(registry, opts.api) + } + if opts.quiet { return nil } @@ -125,5 +141,10 @@ func run(ctx context.Context, args []string, opts *options) (result error) { encoder.SetIndent("", " ") } - return encoder.Encode(registry) + err = encoder.Encode(registry) + if err != nil { + return err + } + + return nil } diff --git a/cmd/context.go b/cmd/context.go index c444bd1..d706c97 100644 --- a/cmd/context.go +++ b/cmd/context.go @@ -5,8 +5,12 @@ import ( "errors" "fmt" "net/http" + "os" + "path/filepath" + "syscall" "time" + "github.com/adrg/xdg" "github.com/cli/go-gh/v2/pkg/api" "github.com/cli/go-gh/v2/pkg/auth" "github.com/cli/go-gh/v2/pkg/config" @@ -31,12 +35,24 @@ func contextGitHubClient(ctx context.Context) (*github.Client, error) { // newContext prepares GitHub CLI extension context with http.Client and github.Client values. // You can use ContextHTTPClient and ContextGitHubClient later to get client instances from the context. -func newContext(ctx context.Context) (context.Context, error) { +func newContext(ctx context.Context, appname string) (context.Context, error) { htc, err := newHTTPClient() if err != nil { return nil, err } + cacheDir, err := xdg.CacheFile(appname) + if err != nil { + return nil, err + } + + err = os.MkdirAll(cacheDir, syscall.S_IWUSR|syscall.S_IRUSR|syscall.S_IXUSR) //nolint:forbidigo + if err != nil { + return nil, err + } + + ctx = context.WithValue(ctx, cacheDirKey{}, cacheDir) + return context.WithValue(ctx, githubClientKey{}, github.NewClient(htc)), nil } @@ -59,3 +75,39 @@ func newHTTPClient() (*http.Client, error) { return api.NewHTTPClient(opts) } + +type cacheDirKey struct{} + +func contextCacheDir(ctx context.Context) (string, error) { + value := ctx.Value(cacheDirKey{}) + if value != nil { + if client, ok := value.(string); ok { + return client, nil + } + } + + return "", fmt.Errorf("%w: missing cache dir", errInvalidContext) +} + +//nolint:forbidigo +func cacheSubDir(ctx context.Context, subdir string) (string, error) { + base, err := contextCacheDir(ctx) + if err != nil { + return "", err + } + + dir := filepath.Join(base, subdir) + if err := os.MkdirAll(dir, syscall.S_IWUSR|syscall.S_IRUSR|syscall.S_IXUSR); err != nil { + return "", err + } + + return dir, nil +} + +func modulesDir(ctx context.Context) (string, error) { + return cacheSubDir(ctx, "modules") +} + +func checksDir(ctx context.Context) (string, error) { + return cacheSubDir(ctx, "checks") +} diff --git a/cmd/help.md b/cmd/help.md index 82c1a75..88bddd6 100644 --- a/cmd/help.md +++ b/cmd/help.md @@ -7,3 +7,5 @@ The source of the extension registry is read from the YAML (or JSON) format file Repository metadata is collected using the API of the extensions' git repository managers. Currently only the GitHub API is supported. The output of the generation will be written to the standard output by default. The output can be saved to a file using the `-o/--out` flag. + +The `--api` flag can be used to specify a directory to which the outputs will be written. The `registry.json` file is placed in the root directory. The `extension.json` file and the `badge.svg` file (if the `--lint` flag is used) are placed in a directory with the same name as the extension's go module path. \ No newline at end of file diff --git a/cmd/k6registry/main.go b/cmd/k6registry/main.go index 7674983..7e7cdd1 100644 --- a/cmd/k6registry/main.go +++ b/cmd/k6registry/main.go @@ -71,6 +71,10 @@ func getArgs() []string { args = append(args, "--compact") } + if api := getenv("INPUT_API", ""); len(api) != 0 { + args = append(args, "--api", api) + } + if out := getenv("INPUT_OUT", ""); len(out) != 0 { args = append(args, "--out", out) } diff --git a/cmd/lint.go b/cmd/lint.go new file mode 100644 index 0000000..dae51d7 --- /dev/null +++ b/cmd/lint.go @@ -0,0 +1,134 @@ +package cmd + +import ( + "context" + "encoding/json" + "errors" + "io/fs" + "os" + "path/filepath" + + "github.com/go-git/go-git/v5" + "github.com/grafana/k6lint" +) + +//nolint:forbidigo +func loadCompliance(ctx context.Context, module string, timestamp float64) (*k6lint.Compliance, bool, error) { + base, err := checksDir(ctx) + if err != nil { + return nil, false, err + } + + filename := filepath.Join(base, module) + ".json" + + data, err := os.ReadFile(filepath.Clean(filename)) + if err != nil { + if errors.Is(err, fs.ErrNotExist) { + return nil, false, nil + } + return nil, false, err + } + + var comp k6lint.Compliance + + if err := json.Unmarshal(data, &comp); err != nil { + return nil, false, err + } + + if comp.Timestamp >= timestamp { + return &comp, true, nil + } + + return nil, false, nil +} + +//nolint:forbidigo +func saveCompliance(ctx context.Context, module string, comp *k6lint.Compliance) error { + base, err := checksDir(ctx) + if err != nil { + return err + } + + filename := filepath.Join(base, module) + ".json" + + if err := os.MkdirAll(filepath.Dir(filename), 0o750); err != nil { + return err + } + + data, err := json.Marshal(comp) + if err != nil { + return err + } + + return os.WriteFile(filename, data, 0o600) +} + +//nolint:forbidigo +func updateWorkdir(ctx context.Context, dir string, cloneURL string) error { + _, err := os.Stat(dir) + notfound := err != nil && errors.Is(err, os.ErrNotExist) + + if err != nil && !notfound { + return err + } + + if notfound { + _, err = git.PlainCloneContext(ctx, dir, false, &git.CloneOptions{URL: cloneURL}) + return err + } + + repo, err := git.PlainOpen(dir) + if err != nil { + return err + } + + wtree, err := repo.Worktree() + if err != nil { + return err + } + + err = wtree.Pull(&git.PullOptions{}) + if err != nil && !errors.Is(err, git.NoErrAlreadyUpToDate) { + return err + } + + return nil +} + +func checkCompliance(ctx context.Context, module string, cloneURL string, tstamp float64) (*k6lint.Compliance, error) { + com, found, err := loadCompliance(ctx, module, tstamp) + if found { + return com, nil + } + + if err != nil && !errors.Is(err, fs.ErrNotExist) { + return nil, err + } + + base, err := modulesDir(ctx) + if err != nil { + return nil, err + } + + dir := filepath.Join(base, module) + + if err := updateWorkdir(ctx, dir, cloneURL); err != nil { + return nil, err + } + + compliance, err := k6lint.Lint(ctx, dir, &k6lint.Options{ + Passed: []k6lint.Checker{k6lint.CheckerLicense, k6lint.CheckerVersions, k6lint.CheckerGit}, + }) + if err != nil { + return nil, err + } + + compliance.Checks = nil + + err = saveCompliance(ctx, module, compliance) + if err != nil { + return nil, err + } + + return compliance, nil +} diff --git a/cmd/load.go b/cmd/load.go index 5862683..d81c221 100644 --- a/cmd/load.go +++ b/cmd/load.go @@ -2,20 +2,31 @@ package cmd import ( "context" - "encoding/json" "errors" "fmt" "io" "strings" - "github.com/Masterminds/semver" + "github.com/Masterminds/semver/v3" "github.com/google/go-github/v62/github" "github.com/grafana/k6registry" "github.com/xanzy/go-gitlab" "gopkg.in/yaml.v3" ) -func load(ctx context.Context, in io.Reader, loose bool, lint bool) (interface{}, error) { +func k6AsExtension() k6registry.Extension { + return k6registry.Extension{ + Module: k6Module, + Description: k6Description, + Tier: k6registry.TierOfficial, + Products: []k6registry.Product{ + k6registry.ProductCloud, + k6registry.ProductOSS, + }, + } +} + +func load(ctx context.Context, in io.Reader, loose bool, lint bool) (k6registry.Registry, error) { var ( raw []byte err error @@ -37,16 +48,7 @@ func load(ctx context.Context, in io.Reader, loose bool, lint bool) (interface{} return nil, err } - registry = append(registry, - k6registry.Extension{ - Module: k6Module, - Description: k6Description, - Tier: k6registry.TierOfficial, - Products: []k6registry.Product{ - k6registry.ProductCloud, - k6registry.ProductOss, - }, - }) + registry = append(registry, k6AsExtension()) for idx, ext := range registry { if len(ext.Tier) == 0 { @@ -54,7 +56,7 @@ func load(ctx context.Context, in io.Reader, loose bool, lint bool) (interface{} } if len(ext.Products) == 0 { - registry[idx].Products = append(registry[idx].Products, k6registry.ProductOss) + registry[idx].Products = append(registry[idx].Products, k6registry.ProductOSS) } if len(ext.Categories) == 0 { @@ -71,6 +73,15 @@ func load(ctx context.Context, in io.Reader, loose bool, lint bool) (interface{} } registry[idx].Repo = repo + + if lint && ext.Module != k6Module { + compliance, err := checkCompliance(ctx, ext.Module, repo.CloneURL, repo.Timestamp) + if err != nil { + return nil, err + } + + registry[idx].Compliance = &k6registry.Compliance{Grade: k6registry.Grade(compliance.Grade), Level: compliance.Level} + } } if lint { @@ -79,18 +90,7 @@ func load(ctx context.Context, in io.Reader, loose bool, lint bool) (interface{} } } - bin, err := json.Marshal(registry) - if err != nil { - return nil, err - } - - var result []interface{} - - if err := json.Unmarshal(bin, &result); err != nil { - return nil, err - } - - return result, nil + return registry, nil } func loadRepository(ctx context.Context, module string) (*k6registry.Repository, error) { @@ -104,6 +104,7 @@ func loadRepository(ctx context.Context, module string) (*k6registry.Repository, if strings.HasPrefix(module, k6Module) { repo.Stars = 0 repo.Timestamp = 0 + repo.CloneURL = "" } return repo, nil diff --git a/docs/example-api.txt b/docs/example-api.txt new file mode 100644 index 0000000..10c8fc0 --- /dev/null +++ b/docs/example-api.txt @@ -0,0 +1,57 @@ +docs/example-api +├── registry.json +├── registry.schema.json +├── category +│   ├── authentication.json +│   ├── browser.json +│   ├── data.json +│   ├── kubernetes.json +│   ├── messaging.json +│   ├── misc.json +│   ├── observability.json +│   ├── protocol.json +│   └── reporting.json +├── grade +│   ├── A.json +│   ├── B.json +│   ├── C.json +│   ├── D.json +│   ├── E.json +│   ├── F.json +│   └── passing +│   ├── A.json +│   ├── B.json +│   ├── C.json +│   ├── D.json +│   ├── E.json +│   └── F.json +├── module +│   ├── github.com +│   │   ├── grafana +│   │   │   ├── xk6-dashboard +│   │   │   │   ├── badge.svg +│   │   │   │   └── extension.json +│   │   │   ├── xk6-disruptor +│   │   │   │   ├── badge.svg +│   │   │   │   └── extension.json +│   │   │   └── xk6-sql +│   │   │   ├── badge.svg +│   │   │   └── extension.json +│   │   └── szkiba +│   │   └── xk6-faker +│   │   ├── badge.svg +│   │   └── extension.json +│   ├── gitlab.com +│   │   └── szkiba +│   │   └── xk6-banner +│   │   ├── badge.svg +│   │   └── extension.json +│   └── go.k6.io +│   └── k6 +│   └── extension.json +├── product +│   ├── cloud.json +│   └── oss.json +└── tier + ├── community.json + └── official.json diff --git a/docs/example-api/category/authentication.json b/docs/example-api/category/authentication.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/example-api/category/authentication.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/example-api/category/browser.json b/docs/example-api/category/browser.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/example-api/category/browser.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/example-api/category/data.json b/docs/example-api/category/data.json new file mode 100644 index 0000000..356c69e --- /dev/null +++ b/docs/example-api/category/data.json @@ -0,0 +1,89 @@ +[ + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/category/kubernetes.json b/docs/example-api/category/kubernetes.json new file mode 100644 index 0000000..c92185e --- /dev/null +++ b/docs/example-api/category/kubernetes.json @@ -0,0 +1,61 @@ +[ + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example-api/category/messaging.json b/docs/example-api/category/messaging.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/example-api/category/messaging.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/example-api/category/misc.json b/docs/example-api/category/misc.json new file mode 100644 index 0000000..a413dbf --- /dev/null +++ b/docs/example-api/category/misc.json @@ -0,0 +1,160 @@ +[ + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "description": "A modern load testing tool, using Go and JavaScript", + "module": "go.k6.io/k6", + "products": [ + "cloud", + "oss" + ], + "repo": { + "description": "A modern load testing tool, using Go and JavaScript - https://k6.io", + "homepage": "https://github.com/grafana/k6", + "license": "AGPL-3.0", + "name": "k6", + "owner": "grafana", + "public": true, + "topics": [ + "es6", + "go", + "golang", + "hacktoberfest", + "javascript", + "load-generator", + "load-testing", + "performance" + ], + "url": "https://github.com/grafana/k6", + "versions": [ + "v0.53.0", + "v0.52.0", + "v0.51.0", + "v0.50.0", + "v0.49.0", + "v0.48.0", + "v0.47.0", + "v0.46.0", + "v0.45.1", + "v0.45.0", + "v0.44.1", + "v0.44.0", + "v0.43.1", + "v0.43.0", + "v0.42.0", + "v0.41.0", + "v0.40.0", + "v0.39.0", + "v0.38.3", + "v0.38.2", + "v0.38.1", + "v0.38.0", + "v0.37.0", + "v0.36.0", + "v0.35.0", + "v0.34.1", + "v0.34.0", + "v0.33.0", + "v0.32.0", + "v0.31.1", + "v0.31.0", + "v0.30.0", + "v0.29.0", + "v0.28.0", + "v0.27.1", + "v0.27.0", + "v0.26.2", + "v0.26.1", + "v0.26.0", + "v0.25.1", + "v0.25.0", + "v0.24.0", + "v0.23.1", + "v0.23.0", + "v0.22.1", + "v0.22.0", + "v0.21.1", + "v0.21.0", + "v0.20.0", + "v0.19.0", + "v0.18.2", + "v0.18.1", + "v0.18.0", + "v0.17.2", + "v0.17.1", + "v0.17.0", + "v0.16.0", + "v0.15.0", + "v0.14.0", + "v0.13.0", + "v0.12.2", + "v0.12.1", + "v0.11.0", + "v0.10.0", + "v0.9.3", + "v0.9.2", + "v0.9.1", + "v0.9.0", + "v0.8.5", + "v0.8.4", + "v0.8.3", + "v0.8.2", + "v0.8.1", + "v0.8.0", + "v0.7.0", + "v0.6.0", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.5", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.0.2", + "v0.0.1" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example-api/category/observability.json b/docs/example-api/category/observability.json new file mode 100644 index 0000000..388fc41 --- /dev/null +++ b/docs/example-api/category/observability.json @@ -0,0 +1,74 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example-api/category/protocol.json b/docs/example-api/category/protocol.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/example-api/category/protocol.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/example-api/category/reporting.json b/docs/example-api/category/reporting.json new file mode 100644 index 0000000..388fc41 --- /dev/null +++ b/docs/example-api/category/reporting.json @@ -0,0 +1,74 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example-api/grade/A.json b/docs/example-api/grade/A.json new file mode 100644 index 0000000..72644d9 --- /dev/null +++ b/docs/example-api/grade/A.json @@ -0,0 +1,124 @@ +[ + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/grade/B.json b/docs/example-api/grade/B.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/example-api/grade/B.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/example-api/grade/C.json b/docs/example-api/grade/C.json new file mode 100644 index 0000000..3bff378 --- /dev/null +++ b/docs/example-api/grade/C.json @@ -0,0 +1,133 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example-api/grade/D.json b/docs/example-api/grade/D.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/example-api/grade/D.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/example-api/grade/E.json b/docs/example-api/grade/E.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/example-api/grade/E.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/example-api/grade/F.json b/docs/example-api/grade/F.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/example-api/grade/F.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/example-api/grade/passing/A.json b/docs/example-api/grade/passing/A.json new file mode 100644 index 0000000..72644d9 --- /dev/null +++ b/docs/example-api/grade/passing/A.json @@ -0,0 +1,124 @@ +[ + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/grade/passing/B.json b/docs/example-api/grade/passing/B.json new file mode 100644 index 0000000..72644d9 --- /dev/null +++ b/docs/example-api/grade/passing/B.json @@ -0,0 +1,124 @@ +[ + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/grade/passing/C.json b/docs/example-api/grade/passing/C.json new file mode 100644 index 0000000..6c4ef56 --- /dev/null +++ b/docs/example-api/grade/passing/C.json @@ -0,0 +1,255 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/grade/passing/D.json b/docs/example-api/grade/passing/D.json new file mode 100644 index 0000000..6c4ef56 --- /dev/null +++ b/docs/example-api/grade/passing/D.json @@ -0,0 +1,255 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/grade/passing/E.json b/docs/example-api/grade/passing/E.json new file mode 100644 index 0000000..6c4ef56 --- /dev/null +++ b/docs/example-api/grade/passing/E.json @@ -0,0 +1,255 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/grade/passing/F.json b/docs/example-api/grade/passing/F.json new file mode 100644 index 0000000..6c4ef56 --- /dev/null +++ b/docs/example-api/grade/passing/F.json @@ -0,0 +1,255 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/module/github.com/grafana/xk6-dashboard/badge.svg b/docs/example-api/module/github.com/grafana/xk6-dashboard/badge.svg new file mode 100644 index 0000000..8d69d24 --- /dev/null +++ b/docs/example-api/module/github.com/grafana/xk6-dashboard/badge.svg @@ -0,0 +1 @@ +k6 registryk6 registryCC \ No newline at end of file diff --git a/docs/example-api/module/github.com/grafana/xk6-dashboard/extension.json b/docs/example-api/module/github.com/grafana/xk6-dashboard/extension.json new file mode 100644 index 0000000..20f78f3 --- /dev/null +++ b/docs/example-api/module/github.com/grafana/xk6-dashboard/extension.json @@ -0,0 +1,72 @@ +{ + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" +} \ No newline at end of file diff --git a/docs/example-api/module/github.com/grafana/xk6-disruptor/badge.svg b/docs/example-api/module/github.com/grafana/xk6-disruptor/badge.svg new file mode 100644 index 0000000..8d69d24 --- /dev/null +++ b/docs/example-api/module/github.com/grafana/xk6-disruptor/badge.svg @@ -0,0 +1 @@ +k6 registryk6 registryCC \ No newline at end of file diff --git a/docs/example-api/module/github.com/grafana/xk6-disruptor/extension.json b/docs/example-api/module/github.com/grafana/xk6-disruptor/extension.json new file mode 100644 index 0000000..8935d0f --- /dev/null +++ b/docs/example-api/module/github.com/grafana/xk6-disruptor/extension.json @@ -0,0 +1,59 @@ +{ + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" +} \ No newline at end of file diff --git a/docs/example-api/module/github.com/grafana/xk6-sql/badge.svg b/docs/example-api/module/github.com/grafana/xk6-sql/badge.svg new file mode 100644 index 0000000..f24dfbf --- /dev/null +++ b/docs/example-api/module/github.com/grafana/xk6-sql/badge.svg @@ -0,0 +1 @@ +k6 registryk6 registryAA \ No newline at end of file diff --git a/docs/example-api/module/github.com/grafana/xk6-sql/extension.json b/docs/example-api/module/github.com/grafana/xk6-sql/extension.json new file mode 100644 index 0000000..d71eae4 --- /dev/null +++ b/docs/example-api/module/github.com/grafana/xk6-sql/extension.json @@ -0,0 +1,45 @@ +{ + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" +} \ No newline at end of file diff --git a/docs/example-api/module/github.com/szkiba/xk6-faker/badge.svg b/docs/example-api/module/github.com/szkiba/xk6-faker/badge.svg new file mode 100644 index 0000000..f24dfbf --- /dev/null +++ b/docs/example-api/module/github.com/szkiba/xk6-faker/badge.svg @@ -0,0 +1 @@ +k6 registryk6 registryAA \ No newline at end of file diff --git a/docs/example-api/module/github.com/szkiba/xk6-faker/extension.json b/docs/example-api/module/github.com/szkiba/xk6-faker/extension.json new file mode 100644 index 0000000..6efc919 --- /dev/null +++ b/docs/example-api/module/github.com/szkiba/xk6-faker/extension.json @@ -0,0 +1,42 @@ +{ + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" +} \ No newline at end of file diff --git a/docs/example-api/module/gitlab.com/szkiba/xk6-banner/badge.svg b/docs/example-api/module/gitlab.com/szkiba/xk6-banner/badge.svg new file mode 100644 index 0000000..f24dfbf --- /dev/null +++ b/docs/example-api/module/gitlab.com/szkiba/xk6-banner/badge.svg @@ -0,0 +1 @@ +k6 registryk6 registryAA \ No newline at end of file diff --git a/docs/example-api/module/gitlab.com/szkiba/xk6-banner/extension.json b/docs/example-api/module/gitlab.com/szkiba/xk6-banner/extension.json new file mode 100644 index 0000000..0d2c8c6 --- /dev/null +++ b/docs/example-api/module/gitlab.com/szkiba/xk6-banner/extension.json @@ -0,0 +1,35 @@ +{ + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" +} \ No newline at end of file diff --git a/docs/example-api/module/go.k6.io/k6/extension.json b/docs/example-api/module/go.k6.io/k6/extension.json new file mode 100644 index 0000000..3f7a163 --- /dev/null +++ b/docs/example-api/module/go.k6.io/k6/extension.json @@ -0,0 +1,123 @@ +{ + "categories": [ + "misc" + ], + "description": "A modern load testing tool, using Go and JavaScript", + "module": "go.k6.io/k6", + "products": [ + "cloud", + "oss" + ], + "repo": { + "description": "A modern load testing tool, using Go and JavaScript - https://k6.io", + "homepage": "https://github.com/grafana/k6", + "license": "AGPL-3.0", + "name": "k6", + "owner": "grafana", + "public": true, + "topics": [ + "es6", + "go", + "golang", + "hacktoberfest", + "javascript", + "load-generator", + "load-testing", + "performance" + ], + "url": "https://github.com/grafana/k6", + "versions": [ + "v0.53.0", + "v0.52.0", + "v0.51.0", + "v0.50.0", + "v0.49.0", + "v0.48.0", + "v0.47.0", + "v0.46.0", + "v0.45.1", + "v0.45.0", + "v0.44.1", + "v0.44.0", + "v0.43.1", + "v0.43.0", + "v0.42.0", + "v0.41.0", + "v0.40.0", + "v0.39.0", + "v0.38.3", + "v0.38.2", + "v0.38.1", + "v0.38.0", + "v0.37.0", + "v0.36.0", + "v0.35.0", + "v0.34.1", + "v0.34.0", + "v0.33.0", + "v0.32.0", + "v0.31.1", + "v0.31.0", + "v0.30.0", + "v0.29.0", + "v0.28.0", + "v0.27.1", + "v0.27.0", + "v0.26.2", + "v0.26.1", + "v0.26.0", + "v0.25.1", + "v0.25.0", + "v0.24.0", + "v0.23.1", + "v0.23.0", + "v0.22.1", + "v0.22.0", + "v0.21.1", + "v0.21.0", + "v0.20.0", + "v0.19.0", + "v0.18.2", + "v0.18.1", + "v0.18.0", + "v0.17.2", + "v0.17.1", + "v0.17.0", + "v0.16.0", + "v0.15.0", + "v0.14.0", + "v0.13.0", + "v0.12.2", + "v0.12.1", + "v0.11.0", + "v0.10.0", + "v0.9.3", + "v0.9.2", + "v0.9.1", + "v0.9.0", + "v0.8.5", + "v0.8.4", + "v0.8.3", + "v0.8.2", + "v0.8.1", + "v0.8.0", + "v0.7.0", + "v0.6.0", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.5", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.0.2", + "v0.0.1" + ] + }, + "tier": "official" +} \ No newline at end of file diff --git a/docs/example-api/product/cloud.json b/docs/example-api/product/cloud.json new file mode 100644 index 0000000..a2e0bd6 --- /dev/null +++ b/docs/example-api/product/cloud.json @@ -0,0 +1,170 @@ +[ + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "misc" + ], + "description": "A modern load testing tool, using Go and JavaScript", + "module": "go.k6.io/k6", + "products": [ + "cloud", + "oss" + ], + "repo": { + "description": "A modern load testing tool, using Go and JavaScript - https://k6.io", + "homepage": "https://github.com/grafana/k6", + "license": "AGPL-3.0", + "name": "k6", + "owner": "grafana", + "public": true, + "topics": [ + "es6", + "go", + "golang", + "hacktoberfest", + "javascript", + "load-generator", + "load-testing", + "performance" + ], + "url": "https://github.com/grafana/k6", + "versions": [ + "v0.53.0", + "v0.52.0", + "v0.51.0", + "v0.50.0", + "v0.49.0", + "v0.48.0", + "v0.47.0", + "v0.46.0", + "v0.45.1", + "v0.45.0", + "v0.44.1", + "v0.44.0", + "v0.43.1", + "v0.43.0", + "v0.42.0", + "v0.41.0", + "v0.40.0", + "v0.39.0", + "v0.38.3", + "v0.38.2", + "v0.38.1", + "v0.38.0", + "v0.37.0", + "v0.36.0", + "v0.35.0", + "v0.34.1", + "v0.34.0", + "v0.33.0", + "v0.32.0", + "v0.31.1", + "v0.31.0", + "v0.30.0", + "v0.29.0", + "v0.28.0", + "v0.27.1", + "v0.27.0", + "v0.26.2", + "v0.26.1", + "v0.26.0", + "v0.25.1", + "v0.25.0", + "v0.24.0", + "v0.23.1", + "v0.23.0", + "v0.22.1", + "v0.22.0", + "v0.21.1", + "v0.21.0", + "v0.20.0", + "v0.19.0", + "v0.18.2", + "v0.18.1", + "v0.18.0", + "v0.17.2", + "v0.17.1", + "v0.17.0", + "v0.16.0", + "v0.15.0", + "v0.14.0", + "v0.13.0", + "v0.12.2", + "v0.12.1", + "v0.11.0", + "v0.10.0", + "v0.9.3", + "v0.9.2", + "v0.9.1", + "v0.9.0", + "v0.8.5", + "v0.8.4", + "v0.8.3", + "v0.8.2", + "v0.8.1", + "v0.8.0", + "v0.7.0", + "v0.6.0", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.5", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.0.2", + "v0.0.1" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example-api/product/oss.json b/docs/example-api/product/oss.json new file mode 100644 index 0000000..b5b7b21 --- /dev/null +++ b/docs/example-api/product/oss.json @@ -0,0 +1,378 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "description": "A modern load testing tool, using Go and JavaScript", + "module": "go.k6.io/k6", + "products": [ + "cloud", + "oss" + ], + "repo": { + "description": "A modern load testing tool, using Go and JavaScript - https://k6.io", + "homepage": "https://github.com/grafana/k6", + "license": "AGPL-3.0", + "name": "k6", + "owner": "grafana", + "public": true, + "topics": [ + "es6", + "go", + "golang", + "hacktoberfest", + "javascript", + "load-generator", + "load-testing", + "performance" + ], + "url": "https://github.com/grafana/k6", + "versions": [ + "v0.53.0", + "v0.52.0", + "v0.51.0", + "v0.50.0", + "v0.49.0", + "v0.48.0", + "v0.47.0", + "v0.46.0", + "v0.45.1", + "v0.45.0", + "v0.44.1", + "v0.44.0", + "v0.43.1", + "v0.43.0", + "v0.42.0", + "v0.41.0", + "v0.40.0", + "v0.39.0", + "v0.38.3", + "v0.38.2", + "v0.38.1", + "v0.38.0", + "v0.37.0", + "v0.36.0", + "v0.35.0", + "v0.34.1", + "v0.34.0", + "v0.33.0", + "v0.32.0", + "v0.31.1", + "v0.31.0", + "v0.30.0", + "v0.29.0", + "v0.28.0", + "v0.27.1", + "v0.27.0", + "v0.26.2", + "v0.26.1", + "v0.26.0", + "v0.25.1", + "v0.25.0", + "v0.24.0", + "v0.23.1", + "v0.23.0", + "v0.22.1", + "v0.22.0", + "v0.21.1", + "v0.21.0", + "v0.20.0", + "v0.19.0", + "v0.18.2", + "v0.18.1", + "v0.18.0", + "v0.17.2", + "v0.17.1", + "v0.17.0", + "v0.16.0", + "v0.15.0", + "v0.14.0", + "v0.13.0", + "v0.12.2", + "v0.12.1", + "v0.11.0", + "v0.10.0", + "v0.9.3", + "v0.9.2", + "v0.9.1", + "v0.9.0", + "v0.8.5", + "v0.8.4", + "v0.8.3", + "v0.8.2", + "v0.8.1", + "v0.8.0", + "v0.7.0", + "v0.6.0", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.5", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.0.2", + "v0.0.1" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example-api/registry.json b/docs/example-api/registry.json new file mode 100644 index 0000000..70fb3e1 --- /dev/null +++ b/docs/example-api/registry.json @@ -0,0 +1,378 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "description": "A modern load testing tool, using Go and JavaScript", + "module": "go.k6.io/k6", + "products": [ + "cloud", + "oss" + ], + "repo": { + "description": "A modern load testing tool, using Go and JavaScript - https://k6.io", + "homepage": "https://github.com/grafana/k6", + "license": "AGPL-3.0", + "name": "k6", + "owner": "grafana", + "public": true, + "topics": [ + "es6", + "go", + "golang", + "hacktoberfest", + "javascript", + "load-generator", + "load-testing", + "performance" + ], + "url": "https://github.com/grafana/k6", + "versions": [ + "v0.53.0", + "v0.52.0", + "v0.51.0", + "v0.50.0", + "v0.49.0", + "v0.48.0", + "v0.47.0", + "v0.46.0", + "v0.45.1", + "v0.45.0", + "v0.44.1", + "v0.44.0", + "v0.43.1", + "v0.43.0", + "v0.42.0", + "v0.41.0", + "v0.40.0", + "v0.39.0", + "v0.38.3", + "v0.38.2", + "v0.38.1", + "v0.38.0", + "v0.37.0", + "v0.36.0", + "v0.35.0", + "v0.34.1", + "v0.34.0", + "v0.33.0", + "v0.32.0", + "v0.31.1", + "v0.31.0", + "v0.30.0", + "v0.29.0", + "v0.28.0", + "v0.27.1", + "v0.27.0", + "v0.26.2", + "v0.26.1", + "v0.26.0", + "v0.25.1", + "v0.25.0", + "v0.24.0", + "v0.23.1", + "v0.23.0", + "v0.22.1", + "v0.22.0", + "v0.21.1", + "v0.21.0", + "v0.20.0", + "v0.19.0", + "v0.18.2", + "v0.18.1", + "v0.18.0", + "v0.17.2", + "v0.17.1", + "v0.17.0", + "v0.16.0", + "v0.15.0", + "v0.14.0", + "v0.13.0", + "v0.12.2", + "v0.12.1", + "v0.11.0", + "v0.10.0", + "v0.9.3", + "v0.9.2", + "v0.9.1", + "v0.9.0", + "v0.8.5", + "v0.8.4", + "v0.8.3", + "v0.8.2", + "v0.8.1", + "v0.8.0", + "v0.7.0", + "v0.6.0", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.5", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.0.2", + "v0.0.1" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example-api/registry.schema.json b/docs/example-api/registry.schema.json new file mode 100644 index 0000000..7222b81 --- /dev/null +++ b/docs/example-api/registry.schema.json @@ -0,0 +1,239 @@ +{ + "$id": "https://grafana.github.io/k6registry/registry.schema.json", + "$ref": "#/$defs/registry", + "$defs": { + "registry": { + "description": "k6 Extension Registry.\n\nThe k6 extension registry contains the most important properties of registered extensions.\n", + "type": "array", + "items": { + "$ref": "#/$defs/extension" + }, + "additionalProperties": false + }, + "extension": { + "type": "object", + "description": "Properties of the registered k6 extension.\n\nOnly those properties of the extensions are registered, which either cannot be detected automatically, or delegation to the extension is not allowed.\n\nProperties that are available using the repository manager API are intentionally not registered.\n\nThe string like properties that are included in the generated Grafana documentation are intentionally not accessed via the API of the repository manager. It is not allowed to inject arbitrary text into the Grafana documentation site without approval. Therefore, these properties are registered (eg `description`)\n", + "properties": { + "module": { + "type": "string", + "description": "The extension's go module path.\n\nThis is the unique identifier of the extension.\nMore info about module paths: https://go.dev/ref/mod#module-path\n\nThe extension has no name property, the module path or part of it can be used as the extension name. For example, using the first two elements of the module path after the host name, the name `grafana/xk6-dashboard` can be formed from the module path `github.com/grafana/xk6-dashboard`. This is typically the repository owner name and the repository name in the repository manager.\n\nThe extension has no URL property, a URL can be created from the module path that refers to the extension within the repository manager.\n", + "examples": [ + "github.com/grafana/xk6-dashboard", + "github.com/szkiba/xk6-top" + ] + }, + "imports": { + "type": "array", + "items": { + "type": "string", + "pattern": "^k6/x/" + }, + "description": "List of JavaScript import paths registered by the extension.\n\nCurrently, paths must start with the prefix `k6/x/`.\n\nThe extensions used by k6 scripts are automatically detected based on the values specified here, therefore it is important that the values used here are consistent with the values registered by the extension at runtime.\n", + "examples": [ + [ + "k6/x/csv", + "k6/x/csv/stream" + ], + [ + "k6/x/toml" + ] + ] + }, + "outputs": { + "type": "array", + "items": { + "type": "string" + }, + "example": null, + "description": "List of output names registered by the extension.\n\nThe extensions used by k6 scripts are automatically detected based on the values specified here, therefore it is important that the values used here are consistent with the values registered by the extension at runtime.\n", + "examples": [ + [ + "dashboard" + ], + [ + "plugin" + ] + ] + }, + "description": { + "type": "string", + "description": "Brief description of the extension.\n" + }, + "repo": { + "$ref": "#/$defs/repository", + "description": "Repository metadata.\n\nMetadata provided by the extension's git repository manager. Repository metadata are not registered, they are queried at runtime using the repository manager API.\n" + }, + "tier": { + "$ref": "#/$defs/tier", + "default": "community", + "description": "Maintainer of the extension.\n\nPossible values:\n\n - official: Extensions owned, maintained, and designated by Grafana as \"official\"\n - partner: Extensions written, maintained, validated, and published by third-party companies against their own projects.\n - community: Extensions are listed on the Registry by individual maintainers, groups of maintainers, or other members of the k6 community.\n\nExtensions owned by the `grafana` GitHub organization are not officially supported by Grafana by default.\nThere are several k6 extensions owned by the `grafana` GitHub organization, which were created for experimental or example purposes only.\nThe `official` tier value is needed so that officially supported extensions can be distinguished from them.\n\nIf it is missing from the registry source, it will be set with the default \"community\" value during generation.\n" + }, + "products": { + "type": "array", + "items": { + "$ref": "#/$defs/product" + }, + "description": "Products in which the extension can be used.\n\nSome extensions are not available in all k6 products.\nThis may be for a technological or business reason, or the functionality of the extension may not make sense in the given product.\n\nPossible values:\n\n - oss: Extensions are available in k6 OSS\n - cloud: Extensions are available in Grafana Cloud k6\n\nIf the property is missing or empty in the source of the registry, it means that the extension is only available in the k6 OSS product.\nIn this case, the registry will be filled in accordingly during generation.\n" + }, + "categories": { + "type": "array", + "items": { + "$ref": "#/$defs/category" + }, + "description": "The categories to which the extension belongs.\n\nIf the property is missing or empty in the registry source, the default value is \"misc\".\n\nPossible values:\n\n - authentication\n - browser\n - data\n - kubernetes\n - messaging\n - misc\n - observability\n - protocol\n - reporting\n" + }, + "compliance": { + "$ref": "#/$defs/compliance", + "description": "The result of the extension's k6 compliance checks.\n" + } + }, + "required": [ + "module", + "description" + ], + "additionalProperties": false + }, + "compliance": { + "description": "The result of the extension's k6 compliance checks.\n", + "type": "object", + "required": [ + "grade", + "level" + ], + "properties": { + "level": { + "description": "Compliance expressed as a percentage.\n\nThe `level` property contains a percentage of how well the extension complies with best practices.\nThe value of the `level` can be between `0-100` and is determined by the weighted and normalized sum of the scores of the compliance checks.\n" + }, + "grade": { + "$ref": "#/$defs/grade", + "description": "Compliance expressed as a grade.\n\nThe `grade` property contains a grade (A-F) of how well the extension complies with best practices.\nThe value of the `grade` can be `A`,`B`,`C`,`D`,`E`,`F` and is calculated from the `level` property.\n", + "type": "integer" + } + }, + "additionalProperties": false + }, + "grade": { + "description": "The results of the checks are in the form of a grade.\n", + "type": "string", + "enum": [ + "A", + "B", + "C", + "D", + "E", + "F", + "G" + ] + }, + "repository": { + "type": "object", + "description": "Repository metadata.\n\nMetadata provided by the extension's git repository manager. Repository metadata are not registered, they are queried at runtime using the repository manager API.\n", + "required": [ + "name", + "owner", + "url" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the repository.\n" + }, + "owner": { + "type": "string", + "description": "The owner of the repository.\n" + }, + "url": { + "type": "string", + "description": "URL of the repository.\n\nThe URL is provided by the repository manager and can be displayed in a browser.\n" + }, + "homepage": { + "type": "string", + "default": "", + "description": "The URL to the project homepage.\n\nIf no homepage is set, the value is the same as the url property.\n" + }, + "description": { + "type": "string", + "default": "", + "description": "Repository description.\n" + }, + "stars": { + "type": "integer", + "default": "0", + "description": "The number of stars in the extension's repository.\n\nThe extension's popularity is indicated by how many users have starred the extension's repository.\n" + }, + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Repository topics.\n\nTopics make it easier to find the repository. It is recommended to set the xk6 topic to the extensions repository.\n" + }, + "versions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of supported versions.\n\nVersions are tags whose format meets the requirements of semantic versioning. Version tags often start with the letter `v`, which is not part of the semantic version.\n" + }, + "public": { + "type": "boolean", + "default": "false", + "description": "Public repository flag.\n\nA `true` value indicates that the repository is public, available to anyone.\n" + }, + "license": { + "type": "string", + "default": "", + "description": "The SPDX ID of the extension's license.\n\nFor more information about SPDX, visit https://spdx.org/licenses/\n" + }, + "archived": { + "type": "boolean", + "default": "false", + "description": "Archived repository flag.\n\nA `true` value indicates that the repository is archived, read only.\n\nIf a repository is archived, it usually means that the owner has no intention of maintaining it. Such extensions should be removed from the registry.\n" + }, + "timestamp": { + "type": "number", + "default": 0, + "description": "Last modification timestamp.\n\nThe timestamp property contains the timestamp of the last modification of the repository in UNIX time format (the number of non-leap seconds that have elapsed since 00:00:00 UTC on 1st January 1970).\nIts value depends on the repository manager, in the case of GitHub it contains the time of the last push operation, in the case of GitLab the time of the last repository activity.\n" + }, + "clone_url": { + "type": "string", + "format": "uri", + "default": "", + "description": "URL for the git clone operation.\n\nThe clone_url property contains a (typically HTTP) URL, which is used to clone the repository.\n" + } + } + }, + "tier": { + "type": "string", + "enum": [ + "official", + "partner", + "community" + ], + "description": "Maintainer of the extension.\n\nExtensions can be classified according to who maintains the extension.\nThis usually also specifies who the user can get support from.\n\nPossible values:\n\n - official: Extensions owned, maintained, and designated by Grafana as \"official\"\n - partner: Extensions written, maintained, validated, and published by third-party companies against their own projects.\n - community: Extensions are listed on the Registry by individual maintainers, groups of maintainers, or other members of the k6 community.\n\nExtensions owned by the `grafana` GitHub organization are not officially supported by Grafana by default.\nThere are several k6 extensions owned by the `grafana` GitHub organization, which were created for experimental or example purposes only.\nThe `official` tier value is needed so that officially supported extensions can be distinguished from them.\n\nIf it is missing from the registry source, it will be set with the default \"community\" value during generation.\n" + }, + "product": { + "type": "string", + "enum": [ + "oss", + "cloud" + ], + "description": "Products in which the extension can be used.\n\nSome extensions are not available in all k6 products.\nThis may be for a technological or business reason, or the functionality of the extension may not make sense in the given product.\n\nPossible values:\n\n - oss: Extensions are available in k6 OSS\n - cloud: Extensions are available in Grafana Cloud k6\n\nIf the property is missing or empty in the source of the registry, it means that the extension is only available in the k6 OSS product.\nIn this case, the registry will be filled in accordingly during generation.\n" + }, + "category": { + "type": "string", + "enum": [ + "authentication", + "browser", + "data", + "kubernetes", + "messaging", + "misc", + "observability", + "protocol", + "reporting" + ], + "description": "The categories to which the extension belongs.\n\nIf the property is missing or empty in the registry source, the default value is \"misc\".\n\nPossible values:\n\n - authentication\n - browser\n - data\n - kubernetes\n - messaging\n - misc\n - observability\n - protocol\n - reporting\n" + } + } +} diff --git a/docs/example-api/tier/community.json b/docs/example-api/tier/community.json new file mode 100644 index 0000000..0d08fa9 --- /dev/null +++ b/docs/example-api/tier/community.json @@ -0,0 +1,79 @@ +[ + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Generate random fake data", + "imports": [ + "k6/x/faker" + ], + "module": "github.com/szkiba/xk6-faker", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/szkiba/xk6-faker.git", + "description": "Random fake data generator for k6.", + "homepage": "http://ivan.szkiba.hu/xk6-faker/", + "license": "AGPL-3.0", + "name": "xk6-faker", + "owner": "szkiba", + "public": true, + "stars": 49, + "timestamp": 1719935566, + "topics": [ + "xk6", + "xk6-javascript-k6-x-faker" + ], + "url": "https://github.com/szkiba/xk6-faker", + "versions": [ + "v0.3.0", + "v0.3.0-alpha.1", + "v0.2.2", + "v0.2.1", + "v0.2.0", + "v0.1.0" + ] + }, + "tier": "community" + }, + { + "categories": [ + "misc" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Print ASCII art banner from k6 test", + "imports": [ + "k6/x/banner" + ], + "module": "gitlab.com/szkiba/xk6-banner", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", + "description": "Print ASCII art banner from k6 test.", + "homepage": "https://gitlab.com/szkiba/xk6-banner", + "license": "MIT", + "name": "xk6-banner", + "owner": "szkiba", + "public": true, + "timestamp": 1724312566, + "topics": [ + "xk6" + ], + "url": "https://gitlab.com/szkiba/xk6-banner", + "versions": [ + "v0.1.0" + ] + }, + "tier": "community" + } +] \ No newline at end of file diff --git a/docs/example-api/tier/official.json b/docs/example-api/tier/official.json new file mode 100644 index 0000000..afad1a0 --- /dev/null +++ b/docs/example-api/tier/official.json @@ -0,0 +1,301 @@ +[ + { + "categories": [ + "reporting", + "observability" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Web-based metrics dashboard for k6", + "module": "github.com/grafana/xk6-dashboard", + "outputs": [ + "dashboard" + ], + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-dashboard.git", + "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", + "homepage": "https://github.com/grafana/xk6-dashboard", + "license": "AGPL-3.0", + "name": "xk6-dashboard", + "owner": "grafana", + "public": true, + "stars": 327, + "timestamp": 1719907965, + "topics": [ + "xk6", + "xk6-official", + "xk6-output-dashboard" + ], + "url": "https://github.com/grafana/xk6-dashboard", + "versions": [ + "v0.7.5", + "v0.7.4", + "v0.7.3", + "v0.7.3-alpha.1", + "v0.7.2", + "v0.7.1", + "v0.7.0", + "v0.7.0-apha.3", + "v0.7.0-alpha.5", + "v0.7.0-alpha.4", + "v0.7.0-alpha.3", + "v0.7.0-alpha.2", + "v0.7.0-alpha.1", + "v0.6.1", + "v0.6.0", + "v0.5.5", + "v0.5.4", + "v0.5.3", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "data" + ], + "compliance": { + "grade": "A", + "level": 100 + }, + "description": "Load test SQL Servers", + "imports": [ + "k6/x/sql" + ], + "module": "github.com/grafana/xk6-sql", + "products": [ + "cloud", + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-sql.git", + "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", + "homepage": "https://github.com/grafana/xk6-sql", + "license": "Apache-2.0", + "name": "xk6-sql", + "owner": "grafana", + "public": true, + "stars": 106, + "timestamp": 1721400602, + "topics": [ + "k6", + "sql", + "xk6" + ], + "url": "https://github.com/grafana/xk6-sql", + "versions": [ + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.1", + "v0.1.0", + "v0.0.1" + ] + }, + "tier": "official" + }, + { + "categories": [ + "kubernetes" + ], + "compliance": { + "grade": "C", + "level": 80 + }, + "description": "Inject faults to test", + "imports": [ + "k6/x/disruptor" + ], + "module": "github.com/grafana/xk6-disruptor", + "products": [ + "oss" + ], + "repo": { + "clone_url": "https://github.com/grafana/xk6-disruptor.git", + "description": "Extension for injecting faults into k6 tests", + "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", + "license": "AGPL-3.0", + "name": "xk6-disruptor", + "owner": "grafana", + "public": true, + "stars": 88, + "timestamp": 1724358828, + "topics": [ + "chaos-engineering", + "fault-injection", + "k6", + "testing", + "xk6" + ], + "url": "https://github.com/grafana/xk6-disruptor", + "versions": [ + "v0.3.11", + "v0.3.10", + "v0.3.9", + "v0.3.8", + "v0.3.7", + "v0.3.6", + "v0.3.5", + "v0.3.5-rc2", + "v0.3.5-rc1", + "v0.3.4", + "v0.3.3", + "v0.3.2", + "v0.3.1", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.1.3", + "v0.1.2", + "v0.1.1", + "v0.1.0" + ] + }, + "tier": "official" + }, + { + "categories": [ + "misc" + ], + "description": "A modern load testing tool, using Go and JavaScript", + "module": "go.k6.io/k6", + "products": [ + "cloud", + "oss" + ], + "repo": { + "description": "A modern load testing tool, using Go and JavaScript - https://k6.io", + "homepage": "https://github.com/grafana/k6", + "license": "AGPL-3.0", + "name": "k6", + "owner": "grafana", + "public": true, + "topics": [ + "es6", + "go", + "golang", + "hacktoberfest", + "javascript", + "load-generator", + "load-testing", + "performance" + ], + "url": "https://github.com/grafana/k6", + "versions": [ + "v0.53.0", + "v0.52.0", + "v0.51.0", + "v0.50.0", + "v0.49.0", + "v0.48.0", + "v0.47.0", + "v0.46.0", + "v0.45.1", + "v0.45.0", + "v0.44.1", + "v0.44.0", + "v0.43.1", + "v0.43.0", + "v0.42.0", + "v0.41.0", + "v0.40.0", + "v0.39.0", + "v0.38.3", + "v0.38.2", + "v0.38.1", + "v0.38.0", + "v0.37.0", + "v0.36.0", + "v0.35.0", + "v0.34.1", + "v0.34.0", + "v0.33.0", + "v0.32.0", + "v0.31.1", + "v0.31.0", + "v0.30.0", + "v0.29.0", + "v0.28.0", + "v0.27.1", + "v0.27.0", + "v0.26.2", + "v0.26.1", + "v0.26.0", + "v0.25.1", + "v0.25.0", + "v0.24.0", + "v0.23.1", + "v0.23.0", + "v0.22.1", + "v0.22.0", + "v0.21.1", + "v0.21.0", + "v0.20.0", + "v0.19.0", + "v0.18.2", + "v0.18.1", + "v0.18.0", + "v0.17.2", + "v0.17.1", + "v0.17.0", + "v0.16.0", + "v0.15.0", + "v0.14.0", + "v0.13.0", + "v0.12.2", + "v0.12.1", + "v0.11.0", + "v0.10.0", + "v0.9.3", + "v0.9.2", + "v0.9.1", + "v0.9.0", + "v0.8.5", + "v0.8.4", + "v0.8.3", + "v0.8.2", + "v0.8.1", + "v0.8.0", + "v0.7.0", + "v0.6.0", + "v0.5.2", + "v0.5.1", + "v0.5.0", + "v0.4.5", + "v0.4.4", + "v0.4.3", + "v0.4.2", + "v0.4.1", + "v0.4.0", + "v0.3.0", + "v0.2.1", + "v0.2.0", + "v0.0.2", + "v0.0.1" + ] + }, + "tier": "official" + } +] \ No newline at end of file diff --git a/docs/example.json b/docs/example.json index 86a253b..e69de29 100644 --- a/docs/example.json +++ b/docs/example.json @@ -1,359 +0,0 @@ -[ - { - "categories": [ - "reporting", - "observability" - ], - "description": "Web-based metrics dashboard for k6", - "module": "github.com/grafana/xk6-dashboard", - "outputs": [ - "dashboard" - ], - "products": [ - "oss" - ], - "repo": { - "clone_url": "https://github.com/grafana/xk6-dashboard.git", - "description": "A k6 extension that makes k6 metrics available on a web-based dashboard.", - "homepage": "https://github.com/grafana/xk6-dashboard", - "license": "AGPL-3.0", - "name": "xk6-dashboard", - "owner": "grafana", - "public": true, - "stars": 325, - "timestamp": 1719907965, - "topics": [ - "xk6", - "xk6-official", - "xk6-output-dashboard" - ], - "url": "https://github.com/grafana/xk6-dashboard", - "versions": [ - "v0.7.5", - "v0.7.4", - "v0.7.3", - "v0.7.3-alpha.1", - "v0.7.2", - "v0.7.1", - "v0.7.0", - "v0.7.0-apha.3", - "v0.7.0-alpha.5", - "v0.7.0-alpha.4", - "v0.7.0-alpha.3", - "v0.7.0-alpha.2", - "v0.7.0-alpha.1", - "v0.6.1", - "v0.6.0", - "v0.5.5", - "v0.5.4", - "v0.5.3", - "v0.5.2", - "v0.5.1", - "v0.5.0", - "v0.4.4", - "v0.4.3", - "v0.4.2", - "v0.4.1", - "v0.4.0", - "v0.3.2", - "v0.3.1", - "v0.3.0", - "v0.2.0", - "v0.1.3", - "v0.1.2", - "v0.1.1", - "v0.1.0" - ] - }, - "tier": "official" - }, - { - "categories": [ - "data" - ], - "description": "Load test SQL Servers", - "imports": [ - "k6/x/sql" - ], - "module": "github.com/grafana/xk6-sql", - "products": [ - "cloud", - "oss" - ], - "repo": { - "clone_url": "https://github.com/grafana/xk6-sql.git", - "description": "k6 extension to load test RDBMSs (PostgreSQL, MySQL, MS SQL and SQLite3)", - "homepage": "https://github.com/grafana/xk6-sql", - "license": "Apache-2.0", - "name": "xk6-sql", - "owner": "grafana", - "public": true, - "stars": 104, - "timestamp": 1721400602, - "topics": [ - "k6", - "sql", - "xk6" - ], - "url": "https://github.com/grafana/xk6-sql", - "versions": [ - "v0.4.0", - "v0.3.0", - "v0.2.1", - "v0.2.0", - "v0.1.1", - "v0.1.0", - "v0.0.1" - ] - }, - "tier": "official" - }, - { - "categories": [ - "kubernetes" - ], - "description": "Inject faults to test", - "imports": [ - "k6/x/disruptor" - ], - "module": "github.com/grafana/xk6-disruptor", - "products": [ - "oss" - ], - "repo": { - "clone_url": "https://github.com/grafana/xk6-disruptor.git", - "description": "Extension for injecting faults into k6 tests", - "homepage": "https://k6.io/docs/javascript-api/xk6-disruptor/", - "license": "AGPL-3.0", - "name": "xk6-disruptor", - "owner": "grafana", - "public": true, - "stars": 88, - "timestamp": 1724358828, - "topics": [ - "chaos-engineering", - "fault-injection", - "k6", - "testing", - "xk6" - ], - "url": "https://github.com/grafana/xk6-disruptor", - "versions": [ - "v0.3.11", - "v0.3.10", - "v0.3.9", - "v0.3.8", - "v0.3.7", - "v0.3.6", - "v0.3.5", - "v0.3.5-rc2", - "v0.3.5-rc1", - "v0.3.4", - "v0.3.3", - "v0.3.2", - "v0.3.1", - "v0.3.0", - "v0.2.1", - "v0.2.0", - "v0.1.3", - "v0.1.2", - "v0.1.1", - "v0.1.0" - ] - }, - "tier": "official" - }, - { - "categories": [ - "data" - ], - "description": "Generate random fake data", - "imports": [ - "k6/x/faker" - ], - "module": "github.com/szkiba/xk6-faker", - "products": [ - "oss" - ], - "repo": { - "clone_url": "https://github.com/szkiba/xk6-faker.git", - "description": "Random fake data generator for k6.", - "homepage": "http://ivan.szkiba.hu/xk6-faker/", - "license": "AGPL-3.0", - "name": "xk6-faker", - "owner": "szkiba", - "public": true, - "stars": 49, - "timestamp": 1719935566, - "topics": [ - "xk6", - "xk6-javascript-k6-x-faker" - ], - "url": "https://github.com/szkiba/xk6-faker", - "versions": [ - "v0.3.0", - "v0.3.0-alpha.1", - "v0.2.2", - "v0.2.1", - "v0.2.0", - "v0.1.0" - ] - }, - "tier": "community" - }, - { - "categories": [ - "misc" - ], - "description": "Print ASCII art banner from k6 test", - "imports": [ - "k6/x/banner" - ], - "module": "gitlab.com/szkiba/xk6-banner", - "products": [ - "oss" - ], - "repo": { - "clone_url": "https://gitlab.com/szkiba/xk6-banner.git", - "description": "Print ASCII art banner from k6 test.", - "homepage": "https://gitlab.com/szkiba/xk6-banner", - "license": "MIT", - "name": "xk6-banner", - "owner": "szkiba", - "public": true, - "timestamp": 1724312566, - "topics": [ - "xk6" - ], - "url": "https://gitlab.com/szkiba/xk6-banner", - "versions": [ - "v0.1.0" - ] - }, - "tier": "community" - }, - { - "categories": [ - "misc" - ], - "description": "A modern load testing tool, using Go and JavaScript", - "module": "go.k6.io/k6", - "products": [ - "cloud", - "oss" - ], - "repo": { - "clone_url": "https://github.com/grafana/k6.git", - "description": "A modern load testing tool, using Go and JavaScript - https://k6.io", - "homepage": "https://github.com/grafana/k6", - "license": "AGPL-3.0", - "name": "k6", - "owner": "grafana", - "public": true, - "topics": [ - "es6", - "go", - "golang", - "hacktoberfest", - "javascript", - "load-generator", - "load-testing", - "performance" - ], - "url": "https://github.com/grafana/k6", - "versions": [ - "v0.53.0", - "v0.52.0", - "v0.51.0", - "v0.50.0", - "v0.49.0", - "v0.48.0", - "v0.47.0", - "v0.46.0", - "v0.45.1", - "v0.45.0", - "v0.44.1", - "v0.44.0", - "v0.43.1", - "v0.43.0", - "v0.42.0", - "v0.41.0", - "v0.40.0", - "v0.39.0", - "v0.38.3", - "v0.38.2", - "v0.38.1", - "v0.38.0", - "v0.37.0", - "v0.36.0", - "v0.35.0", - "v0.34.1", - "v0.34.0", - "v0.33.0", - "v0.32.0", - "v0.31.1", - "v0.31.0", - "v0.30.0", - "v0.29.0", - "v0.28.0", - "v0.27.1", - "v0.27.0", - "v0.26.2", - "v0.26.1", - "v0.26.0", - "v0.25.1", - "v0.25.0", - "v0.24.0", - "v0.23.1", - "v0.23.0", - "v0.22.1", - "v0.22.0", - "v0.21.1", - "v0.21.0", - "v0.20.0", - "v0.19.0", - "v0.18.2", - "v0.18.1", - "v0.18.0", - "v0.17.2", - "v0.17.1", - "v0.17.0", - "v0.16.0", - "v0.15.0", - "v0.14.0", - "v0.13.0", - "v0.12.2", - "v0.12.1", - "v0.11.0", - "v0.10.0", - "v0.9.3", - "v0.9.2", - "v0.9.1", - "v0.9.0", - "v0.8.5", - "v0.8.4", - "v0.8.3", - "v0.8.2", - "v0.8.1", - "v0.8.0", - "v0.7.0", - "v0.6.0", - "v0.5.2", - "v0.5.1", - "v0.5.0", - "v0.4.5", - "v0.4.4", - "v0.4.3", - "v0.4.2", - "v0.4.1", - "v0.4.0", - "v0.3.0", - "v0.2.1", - "v0.2.0", - "v0.0.2", - "v0.0.1" - ] - }, - "tier": "official" - } -] diff --git a/docs/registry.md b/docs/registry.md index 270b787..57c70d1 100644 --- a/docs/registry.md +++ b/docs/registry.md @@ -128,6 +128,24 @@ Possible values: - **protocol** - **reporting** +### Compliance Checks + +Compliance checks are run after every repository modification and their results are stored in the `compliance` property. The registry contains up-to-date information on how well the extensions meet the requirements. + +#### Level + +Compliance expressed as a percentage. + +The `level` property contains a percentage of how well the extension complies with best practices. +The value of the `level` can be between `0-100` and is determined by the weighted and normalized sum of the scores of the compliance checks. + +#### Grade + +Compliance expressed as a grade. + +The `grade` property contains a grade (A-F) of how well the extension complies with best practices. +The value of the `grade` can be `A`,`B`,`C`,`D`,`E`,`F` and is calculated from the `level` property. + ### Repository Metadata Repository metadata provided by the extension's git repository manager. Repository metadata are not registered, they are queried at processing time using the repository manager API. diff --git a/docs/registry.schema.json b/docs/registry.schema.json index 52aff50..7222b81 100644 --- a/docs/registry.schema.json +++ b/docs/registry.schema.json @@ -81,6 +81,10 @@ "$ref": "#/$defs/category" }, "description": "The categories to which the extension belongs.\n\nIf the property is missing or empty in the registry source, the default value is \"misc\".\n\nPossible values:\n\n - authentication\n - browser\n - data\n - kubernetes\n - messaging\n - misc\n - observability\n - protocol\n - reporting\n" + }, + "compliance": { + "$ref": "#/$defs/compliance", + "description": "The result of the extension's k6 compliance checks.\n" } }, "required": [ @@ -89,6 +93,38 @@ ], "additionalProperties": false }, + "compliance": { + "description": "The result of the extension's k6 compliance checks.\n", + "type": "object", + "required": [ + "grade", + "level" + ], + "properties": { + "level": { + "description": "Compliance expressed as a percentage.\n\nThe `level` property contains a percentage of how well the extension complies with best practices.\nThe value of the `level` can be between `0-100` and is determined by the weighted and normalized sum of the scores of the compliance checks.\n" + }, + "grade": { + "$ref": "#/$defs/grade", + "description": "Compliance expressed as a grade.\n\nThe `grade` property contains a grade (A-F) of how well the extension complies with best practices.\nThe value of the `grade` can be `A`,`B`,`C`,`D`,`E`,`F` and is calculated from the `level` property.\n", + "type": "integer" + } + }, + "additionalProperties": false + }, + "grade": { + "description": "The results of the checks are in the form of a grade.\n", + "type": "string", + "enum": [ + "A", + "B", + "C", + "D", + "E", + "F", + "G" + ] + }, "repository": { "type": "object", "description": "Repository metadata.\n\nMetadata provided by the extension's git repository manager. Repository metadata are not registered, they are queried at runtime using the repository manager API.\n", diff --git a/docs/registry.schema.yaml b/docs/registry.schema.yaml index 93578b6..527b603 100644 --- a/docs/registry.schema.yaml +++ b/docs/registry.schema.yaml @@ -127,11 +127,43 @@ $defs: - observability - protocol - reporting - + compliance: + $ref: "#/$defs/compliance" + description: | + The result of the extension's k6 compliance checks. required: - module - description additionalProperties: false + compliance: + description: | + The result of the extension's k6 compliance checks. + type: object + required: + - grade + - level + properties: + level: + description: | + Compliance expressed as a percentage. + + The `level` property contains a percentage of how well the extension complies with best practices. + The value of the `level` can be between `0-100` and is determined by the weighted and normalized sum of the scores of the compliance checks. + grade: + $ref: "#/$defs/grade" + description: | + Compliance expressed as a grade. + + The `grade` property contains a grade (A-F) of how well the extension complies with best practices. + The value of the `grade` can be `A`,`B`,`C`,`D`,`E`,`F` and is calculated from the `level` property. + type: integer + additionalProperties: false + grade: + description: | + The results of the checks are in the form of a grade. + type: string + enum: ["A", "B", "C", "D", "E", "F", "G"] + repository: type: object description: | diff --git a/go.mod b/go.mod index a895ee6..fb030e2 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,16 @@ module github.com/grafana/k6registry -go 1.22 +go 1.22.4 require ( - github.com/Masterminds/semver v1.5.0 + github.com/Masterminds/semver/v3 v3.3.0 + github.com/adrg/xdg v0.5.0 github.com/cli/go-gh/v2 v2.9.0 + github.com/go-git/go-git/v5 v5.12.0 github.com/google/go-github/v62 v62.0.0 github.com/grafana/clireadme v0.1.0 + github.com/grafana/k6lint v0.1.0 + github.com/narqo/go-badge v0.0.0-20230821190521-c9a75c019a59 github.com/spf13/cobra v1.8.1 github.com/xanzy/go-gitlab v0.107.0 github.com/xeipuuv/gojsonschema v1.2.0 @@ -15,30 +19,63 @@ require ( ) require ( + dario.cat/mergo v1.0.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/cli/safeexec v1.0.0 // indirect github.com/cli/shurcooL-graphql v0.0.4 // indirect + github.com/cloudflare/circl v1.3.7 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect + github.com/dgryski/go-minhash v0.0.0-20190315135803-ad340ca03076 // indirect + github.com/ekzhu/minhash-lsh v0.0.0-20190924033628-faac2c6342f8 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-enry/go-license-detector/v4 v4.3.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/henvic/httpretty v0.0.6 // indirect + github.com/hhatto/gorst v0.0.0-20181029133204-ca9f730cac5b // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/kr/text v0.2.0 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/jdkato/prose v1.2.1 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/montanaflynn/stats v0.6.6 // indirect github.com/muesli/termenv v0.15.2 // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/rivo/uniseg v0.4.7 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect + github.com/shogo82148/go-shuffle v1.0.1 // indirect + github.com/skeema/knownhosts v1.2.2 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20221006183845-316c7553db56 // indirect + golang.org/x/image v0.18.0 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.25.0 // indirect golang.org/x/oauth2 v0.6.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.23.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + gonum.org/v1/gonum v0.8.2 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.29.1 // indirect + gopkg.in/neurosnap/sentences.v1 v1.0.7 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/go.sum b/go.sum index 5ab6c0f..a66eeb0 100644 --- a/go.sum +++ b/go.sum @@ -1,20 +1,68 @@ -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= +github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/adrg/xdg v0.5.0 h1:dDaZvhMXatArP1NPHhnfaQUqWBLBsmx1h1HXQdMoFCY= +github.com/adrg/xdg v0.5.0/go.mod h1:dDdY4M4DF9Rjy4kHPeNL+ilVF+p2lK8IdM9/rTSGcI4= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cli/go-gh/v2 v2.9.0 h1:D3lTjEneMYl54M+WjZ+kRPrR5CEJ5BHS05isBPOV3LI= github.com/cli/go-gh/v2 v2.9.0/go.mod h1:MeRoKzXff3ygHu7zP+NVTT+imcHW6p3tpuxHAzRM2xE= github.com/cli/safeexec v1.0.0 h1:0VngyaIyqACHdcMNWfo6+KdUYnqEr2Sg+bSP1pdF+dI= github.com/cli/safeexec v1.0.0/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q= github.com/cli/shurcooL-graphql v0.0.4 h1:6MogPnQJLjKkaXPyGqPRXOI2qCsQdqNfUY1QSJu2GuY= github.com/cli/shurcooL-graphql v0.0.4/go.mod h1:3waN4u02FiZivIV+p1y4d0Jo1jc6BViMA73C+sZo2fk= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc h1:8WFBn63wegobsYAX0YjD+8suexZDga5CctH4CCTx2+8= +github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= +github.com/dgryski/go-minhash v0.0.0-20190315135803-ad340ca03076 h1:EB7M2v8Svo3kvIDy+P1YDE22XskDQP+TEYGzeDwPAN4= +github.com/dgryski/go-minhash v0.0.0-20190315135803-ad340ca03076/go.mod h1:VBi0XHpFy0xiMySf6YpVbRqrupW4RprJ5QTyN+XvGSM= +github.com/dgryski/go-spooky v0.0.0-20170606183049-ed3d087f40e2 h1:lx1ZQgST/imDhmLpYDma1O3Cx9L+4Ie4E8S2RjFPQ30= +github.com/dgryski/go-spooky v0.0.0-20170606183049-ed3d087f40e2/go.mod h1:hgHYKsoIw7S/hlWtP7wD1wZ7SX1jPTtKko5X9jrOgPQ= +github.com/ekzhu/minhash-lsh v0.0.0-20190924033628-faac2c6342f8 h1:+Tje+xk1lmGKSJjYNtgCFsU1HtQzz0kCm1DFbKlvFBo= +github.com/ekzhu/minhash-lsh v0.0.0-20190924033628-faac2c6342f8/go.mod h1:yEtCVi+QamvzjEH4U/m6ZGkALIkF2xfQnFp0BcKmIOk= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= +github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= +github.com/go-enry/go-license-detector/v4 v4.3.1 h1:BajEVdTffFcs8RACmblySVhfEIuT58TmXx27RgVfUdc= +github.com/go-enry/go-license-detector/v4 v4.3.1/go.mod h1:YVJKPE01WQNjN/bdM6V0I/9KxvwEAAv0Ef9pi92K6w0= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= +github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= @@ -29,6 +77,8 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/grafana/clireadme v0.1.0 h1:KYEYSnYdSzmHf3bufaK6fQZ5j4dzvM/T+G6Ba+qNnAM= github.com/grafana/clireadme v0.1.0/go.mod h1:Wy4KIG2ZBGMYAYyF9l7qAy+yoJVasqk/txsRgoRI3gc= +github.com/grafana/k6lint v0.1.0 h1:egUuy8Dmc1Wi5eXBnbGC2QkZIt71KTrOnMr/B5bgkzk= +github.com/grafana/k6lint v0.1.0/go.mod h1:/KU+Ws4QIlNN50cxkRHM7h6dIw7c9nXrFvqzQqq29hY= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= @@ -39,10 +89,22 @@ github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISH github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/henvic/httpretty v0.0.6 h1:JdzGzKZBajBfnvlMALXXMVQWxWMF/ofTy8C3/OSUTxs= github.com/henvic/httpretty v0.0.6/go.mod h1:X38wLjWXHkXT7r2+uK8LjCMne9rsuNaBLJ+5cU2/Pmo= +github.com/hhatto/gorst v0.0.0-20181029133204-ca9f730cac5b h1:Jdu2tbAxkRouSILp2EbposIb8h4gO+2QuZEn3d9sKAc= +github.com/hhatto/gorst v0.0.0-20181029133204-ca9f730cac5b/go.mod h1:HmaZGXHdSwQh1jnUlBGN2BeEYOHACLVGzYOXCbsLvxY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jdkato/prose v1.2.1 h1:Fp3UnJmLVISmlc57BgKUzdjr0lOtjqTZicL3PaYy6cU= +github.com/jdkato/prose v1.2.1/go.mod h1:AiRHgVagnEx2JbQRQowVBKjG0bcs/vtkGCH1dYAL1rA= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= @@ -53,53 +115,149 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/montanaflynn/stats v0.6.3/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/montanaflynn/stats v0.6.6 h1:Duep6KMIDpY4Yo11iFsvyqJDyfzLF9+sndUKT+v64GQ= +github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= +github.com/narqo/go-badge v0.0.0-20230821190521-c9a75c019a59 h1:kbREB9muGo4sHLoZJD/E/IV8yK3Y15eEA9mYi/ztRsk= +github.com/narqo/go-badge v0.0.0-20230821190521-c9a75c019a59/go.mod h1:m9BzkaxwU4IfPQi9ko23cmuFltayFe8iS0dlRlnEWiM= +github.com/neurosnap/sentences v1.0.6 h1:iBVUivNtlwGkYsJblWV8GGVFmXzZzak907Ci8aA0VTE= +github.com/neurosnap/sentences v1.0.6/go.mod h1:pg1IapvYpWCJJm/Etxeh0+gtMf1rI1STY9S7eUCPbDc= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/shogo82148/go-shuffle v0.0.0-20180218125048-27e6095f230d/go.mod h1:2htx6lmL0NGLHlO8ZCf+lQBGBHIbEujyywxJArf+2Yc= +github.com/shogo82148/go-shuffle v1.0.1 h1:4swIpHXLMAz14DE4YTgakgadpRN0n1wE1dieGnOTVFU= +github.com/shogo82148/go-shuffle v1.0.1/go.mod h1:HQPjVgUUZ9TNgm4/K/iXRuAdhPsQrXnAGgtk/9kqbBY= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= +github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e h1:BuzhfgfWQbX0dWzYzT1zsORLnHRv3bcRcsaUk0VmXA8= github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e/go.mod h1:/Tnicc6m/lsJE0irFMA0LfIwTBo4QP7A8IfyIv4zZKI= github.com/xanzy/go-gitlab v0.107.0 h1:P2CT9Uy9yN9lJo3FLxpMZ4xj6uWcpnigXsjvqJ6nd2Y= github.com/xanzy/go-gitlab v0.107.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20221006183845-316c7553db56 h1:BrYbdKcCNjLyrN6aKqXy4hPw9qGI8IATkj4EWv9Q+kQ= +golang.org/x/exp v0.0.0-20221006183845-316c7553db56/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= +golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= @@ -107,9 +265,19 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= +gopkg.in/neurosnap/sentences.v1 v1.0.6/go.mod h1:YlK+SN+fLQZj+kY3r8DkGDhDr91+S3JmTb5LSxFRQo0= +gopkg.in/neurosnap/sentences.v1 v1.0.7 h1:gpTUYnqthem4+o8kyTLiYIB05W+IvdQFYR29erfe8uU= +gopkg.in/neurosnap/sentences.v1 v1.0.7/go.mod h1:YlK+SN+fLQZj+kY3r8DkGDhDr91+S3JmTb5LSxFRQo0= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/registry.go b/registry.go index 582773a..e68bf30 100644 --- a/registry.go +++ b/registry.go @@ -9,3 +9,28 @@ import ( // //go:embed docs/registry.schema.json var Schema []byte + +//nolint:gochecknoglobals +var ( + // Categories contains possible values for Category + Categories = []Category{ + CategoryAuthentication, + CategoryBrowser, + CategoryData, + CategoryKubernetes, + CategoryMessaging, + CategoryMisc, + CategoryObservability, + CategoryProtocol, + CategoryReporting, + } + + // Products contains possible values for Product + Products = []Product{ProductCloud, ProductOSS} + + // Grades contains possible values for Grade + Grades = []Grade{GradeA, GradeB, GradeC, GradeD, GradeE, GradeF} + + // Tiers contains possible values for Tier + Tiers = []Tier{TierOfficial, TierPartner, TierCommunity} +) diff --git a/registry_gen.go b/registry_gen.go index abed043..859180e 100644 --- a/registry_gen.go +++ b/registry_gen.go @@ -14,6 +14,27 @@ const CategoryObservability Category = "observability" const CategoryProtocol Category = "protocol" const CategoryReporting Category = "reporting" +// The result of the extension's k6 compliance checks. +type Compliance struct { + // Compliance expressed as a grade. + // + // The `grade` property contains a grade (A-F) of how well the extension complies + // with best practices. + // The value of the `grade` can be `A`,`B`,`C`,`D`,`E`,`F` and is calculated from + // the `level` property. + // + Grade Grade `json:"grade" yaml:"grade" mapstructure:"grade"` + + // Compliance expressed as a percentage. + // + // The `level` property contains a percentage of how well the extension complies + // with best practices. + // The value of the `level` can be between `0-100` and is determined by the + // weighted and normalized sum of the scores of the compliance checks. + // + Level interface{} `json:"level" yaml:"level" mapstructure:"level"` +} + // Properties of the registered k6 extension. // // Only those properties of the extensions are registered, which either cannot be @@ -45,9 +66,12 @@ type Extension struct { // - protocol // - reporting // - // Categories []Category `json:"categories,omitempty" yaml:"categories,omitempty" mapstructure:"categories,omitempty"` + // The result of the extension's k6 compliance checks. + // + Compliance *Compliance `json:"compliance,omitempty" yaml:"compliance,omitempty" mapstructure:"compliance,omitempty"` + // Brief description of the extension. // Description string `json:"description" yaml:"description" mapstructure:"description"` @@ -137,10 +161,20 @@ type Extension struct { Tier Tier `json:"tier,omitempty" yaml:"tier,omitempty" mapstructure:"tier,omitempty"` } +type Grade string + +const GradeA Grade = "A" +const GradeB Grade = "B" +const GradeC Grade = "C" +const GradeD Grade = "D" +const GradeE Grade = "E" +const GradeF Grade = "F" +const GradeG Grade = "G" + type Product string const ProductCloud Product = "cloud" -const ProductOss Product = "oss" +const ProductOSS Product = "oss" // k6 Extension Registry. // diff --git a/releases/v0.1.14.md b/releases/v0.1.14.md new file mode 100644 index 0000000..fd8a38d --- /dev/null +++ b/releases/v0.1.14.md @@ -0,0 +1,77 @@ +k6registry `v0.1.14` is here 🎉! + +This is an internal maintenance release. + +## Compliance checks + +Compliance checks can be performed after each change. When the `--lint` flag is used, not only the internal linter runs but also the integrated `k6lint` library. + +As a result of the compliance checks, a badge can be generated for each extension based on the compliance grade. + +## API in the filesystem + +By using the `--api` flag, files are created with relative paths in a base directory with a kind of REST API logic: +- in the `module` directory, a directory with the same name as the path of the extension module + - `badge.svg` badge generated based on the compliance grade + - `extension.json` extension data in a separate file +- the subdirectories of the base directory contain subsets of the registry broken down according to different properties (`tier`, `product`, `category`, `grade`) + + ```ascii file=docs/example-api.txt + docs/example-api + ├── registry.json + ├── registry.schema.json + ├── category + │   ├── authentication.json + │   ├── browser.json + │   ├── data.json + │   ├── kubernetes.json + │   ├── messaging.json + │   ├── misc.json + │   ├── observability.json + │   ├── protocol.json + │   └── reporting.json + ├── grade + │   ├── A.json + │   ├── B.json + │   ├── C.json + │   ├── D.json + │   ├── E.json + │   ├── F.json + │   └── passing + │   ├── A.json + │   ├── B.json + │   ├── C.json + │   ├── D.json + │   ├── E.json + │   └── F.json + ├── module + │   ├── github.com + │   │   ├── grafana + │   │   │   ├── xk6-dashboard + │   │   │   │   ├── badge.svg + │   │   │   │   └── extension.json + │   │   │   ├── xk6-disruptor + │   │   │   │   ├── badge.svg + │   │   │   │   └── extension.json + │   │   │   └── xk6-sql + │   │   │   ├── badge.svg + │   │   │   └── extension.json + │   │   └── szkiba + │   │   └── xk6-faker + │   │   ├── badge.svg + │   │   └── extension.json + │   ├── gitlab.com + │   │   └── szkiba + │   │   └── xk6-banner + │   │   ├── badge.svg + │   │   └── extension.json + │   └── go.k6.io + │   └── k6 + │   └── extension.json + ├── product + │   ├── cloud.json + │   └── oss.json + └── tier + ├── community.json + └── official.json + ```