@intentius/chant-lexicon-grafana 0.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -0
- package/dist/build.d.ts +116 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/catalog.d.ts +26 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/codegen/docs-cli.d.ts +3 -0
- package/dist/codegen/docs-cli.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +8 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +3 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +21 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +7 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/schema-types.d.ts +41 -0
- package/dist/codegen/schema-types.d.ts.map +1 -0
- package/dist/composites/agent-dashboard.d.ts +70 -0
- package/dist/composites/agent-dashboard.d.ts.map +1 -0
- package/dist/composites/catalog.d.ts +3 -0
- package/dist/composites/catalog.d.ts.map +1 -0
- package/dist/composites/index.d.ts +12 -0
- package/dist/composites/index.d.ts.map +1 -0
- package/dist/composites/red-dashboard.d.ts +58 -0
- package/dist/composites/red-dashboard.d.ts.map +1 -0
- package/dist/composites/shared.d.ts +68 -0
- package/dist/composites/shared.d.ts.map +1 -0
- package/dist/composites/slo-dashboard.d.ts +62 -0
- package/dist/composites/slo-dashboard.d.ts.map +1 -0
- package/dist/dashboard.d.ts +84 -0
- package/dist/dashboard.d.ts.map +1 -0
- package/dist/datasource.d.ts +67 -0
- package/dist/datasource.d.ts.map +1 -0
- package/dist/detect.d.ts +20 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +22 -0
- package/dist/lint/audit-catalog.d.ts +13 -0
- package/dist/lint/audit-catalog.d.ts.map +1 -0
- package/dist/lint/post-synth/graf101.d.ts +8 -0
- package/dist/lint/post-synth/graf101.d.ts.map +1 -0
- package/dist/lint/post-synth/graf102.d.ts +8 -0
- package/dist/lint/post-synth/graf102.d.ts.map +1 -0
- package/dist/lint/post-synth/graf103.d.ts +8 -0
- package/dist/lint/post-synth/graf103.d.ts.map +1 -0
- package/dist/lint/post-synth/graf104.d.ts +8 -0
- package/dist/lint/post-synth/graf104.d.ts.map +1 -0
- package/dist/lint/post-synth/graf105.d.ts +8 -0
- package/dist/lint/post-synth/graf105.d.ts.map +1 -0
- package/dist/lint/post-synth/graf106.d.ts +8 -0
- package/dist/lint/post-synth/graf106.d.ts.map +1 -0
- package/dist/lint/post-synth/graf107.d.ts +8 -0
- package/dist/lint/post-synth/graf107.d.ts.map +1 -0
- package/dist/lint/post-synth/grafana-helpers.d.ts +16 -0
- package/dist/lint/post-synth/grafana-helpers.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/rules/grafana-ast.d.ts +21 -0
- package/dist/lint/rules/grafana-ast.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +6 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/literal-secret.d.ts +12 -0
- package/dist/lint/rules/literal-secret.d.ts.map +1 -0
- package/dist/lint/rules/uid-syntax.d.ts +12 -0
- package/dist/lint/rules/uid-syntax.d.ts.map +1 -0
- package/dist/lsp/completions.d.ts +4 -0
- package/dist/lsp/completions.d.ts.map +1 -0
- package/dist/lsp/hover.d.ts +4 -0
- package/dist/lsp/hover.d.ts.map +1 -0
- package/dist/manifest.json +8 -0
- package/dist/meta.json +107 -0
- package/dist/okf/index.md +39 -0
- package/dist/okf/rules/GRAF001.md +16 -0
- package/dist/okf/rules/GRAF002.md +15 -0
- package/dist/okf/rules/GRAF101.md +15 -0
- package/dist/okf/rules/GRAF102.md +15 -0
- package/dist/okf/rules/GRAF103.md +11 -0
- package/dist/okf/rules/GRAF104.md +15 -0
- package/dist/okf/rules/GRAF105.md +11 -0
- package/dist/okf/rules/GRAF106.md +11 -0
- package/dist/okf/rules/GRAF107.md +11 -0
- package/dist/okf/types/ConstantVariable.md +9 -0
- package/dist/okf/types/CustomVariable.md +9 -0
- package/dist/okf/types/Dashboard.md +14 -0
- package/dist/okf/types/DashboardProvider.md +9 -0
- package/dist/okf/types/Datasource.md +16 -0
- package/dist/okf/types/DatasourceVariable.md +9 -0
- package/dist/okf/types/GaugePanel.md +9 -0
- package/dist/okf/types/HeatmapPanel.md +9 -0
- package/dist/okf/types/IntervalVariable.md +9 -0
- package/dist/okf/types/LogsPanel.md +9 -0
- package/dist/okf/types/LokiQuery.md +9 -0
- package/dist/okf/types/PromQuery.md +9 -0
- package/dist/okf/types/QueryVariable.md +9 -0
- package/dist/okf/types/Row.md +9 -0
- package/dist/okf/types/StatPanel.md +9 -0
- package/dist/okf/types/TablePanel.md +9 -0
- package/dist/okf/types/TempoQuery.md +9 -0
- package/dist/okf/types/TextPanel.md +9 -0
- package/dist/okf/types/TextboxVariable.md +9 -0
- package/dist/okf/types/TimeSeriesPanel.md +9 -0
- package/dist/okf/types/TracesPanel.md +9 -0
- package/dist/package-cli.d.ts +3 -0
- package/dist/package-cli.d.ts.map +1 -0
- package/dist/panels.d.ts +138 -0
- package/dist/panels.d.ts.map +1 -0
- package/dist/pin.d.ts +32 -0
- package/dist/pin.d.ts.map +1 -0
- package/dist/plugin.d.ts +12 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/query.d.ts +81 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/rules/graf101.ts +17 -0
- package/dist/rules/graf102.ts +17 -0
- package/dist/rules/graf103.ts +17 -0
- package/dist/rules/graf104.ts +17 -0
- package/dist/rules/graf105.ts +17 -0
- package/dist/rules/graf106.ts +17 -0
- package/dist/rules/graf107.ts +17 -0
- package/dist/rules/grafana-ast.ts +70 -0
- package/dist/rules/grafana-helpers.ts +68 -0
- package/dist/rules/literal-secret.ts +48 -0
- package/dist/rules/uid-syntax.ts +56 -0
- package/dist/schema/dashboard.gen.d.ts +1231 -0
- package/dist/schema/dashboard.gen.d.ts.map +1 -0
- package/dist/schema/gauge.gen.d.ts +57 -0
- package/dist/schema/gauge.gen.d.ts.map +1 -0
- package/dist/schema/heatmap.gen.d.ts +295 -0
- package/dist/schema/heatmap.gen.d.ts.map +1 -0
- package/dist/schema/index.d.ts +18 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/logs.gen.d.ts +29 -0
- package/dist/schema/logs.gen.d.ts.map +1 -0
- package/dist/schema/loki.gen.d.ts +69 -0
- package/dist/schema/loki.gen.d.ts.map +1 -0
- package/dist/schema/prometheus.gen.d.ts +169 -0
- package/dist/schema/prometheus.gen.d.ts.map +1 -0
- package/dist/schema/stat.gen.d.ts +75 -0
- package/dist/schema/stat.gen.d.ts.map +1 -0
- package/dist/schema/table.gen.d.ts +295 -0
- package/dist/schema/table.gen.d.ts.map +1 -0
- package/dist/schema/tempo.gen.d.ts +136 -0
- package/dist/schema/tempo.gen.d.ts.map +1 -0
- package/dist/schema/text.gen.d.ts +16 -0
- package/dist/schema/text.gen.d.ts.map +1 -0
- package/dist/schema/timeseries.gen.d.ts +179 -0
- package/dist/schema/timeseries.gen.d.ts.map +1 -0
- package/dist/schema-validate.d.ts +20 -0
- package/dist/schema-validate.d.ts.map +1 -0
- package/dist/serializer.d.ts +22 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/skill-defs.d.ts +3 -0
- package/dist/skill-defs.d.ts.map +1 -0
- package/dist/skills/chant-grafana-provisioning.md +42 -0
- package/dist/skills/chant-grafana.md +93 -0
- package/dist/spec/fetch-cli.d.ts +3 -0
- package/dist/spec/fetch-cli.d.ts.map +1 -0
- package/dist/spec/schemas.d.ts +25 -0
- package/dist/spec/schemas.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/util.d.ts +17 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/validate-cli.d.ts +3 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate-output.d.ts +42 -0
- package/dist/validate-output.d.ts.map +1 -0
- package/dist/validate.d.ts +12 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/variables.d.ts +100 -0
- package/dist/variables.d.ts.map +1 -0
- package/package.json +79 -0
- package/src/build.test.ts +210 -0
- package/src/build.ts +573 -0
- package/src/catalog.ts +116 -0
- package/src/codegen/docs-cli.ts +4 -0
- package/src/codegen/docs.ts +97 -0
- package/src/codegen/generate-cli.ts +8 -0
- package/src/codegen/generate.ts +83 -0
- package/src/codegen/package.ts +41 -0
- package/src/codegen/schema-types.ts +173 -0
- package/src/composites/agent-dashboard.ts +235 -0
- package/src/composites/catalog.test.ts +37 -0
- package/src/composites/catalog.ts +223 -0
- package/src/composites/composites.test.ts +314 -0
- package/src/composites/index.ts +12 -0
- package/src/composites/red-dashboard.ts +159 -0
- package/src/composites/shared.ts +94 -0
- package/src/composites/slo-dashboard.ts +177 -0
- package/src/dashboard.ts +123 -0
- package/src/datasource.ts +93 -0
- package/src/detect.ts +30 -0
- package/src/generated/lexicon-grafana.json +107 -0
- package/src/import.e2e.test.ts +147 -0
- package/src/import.test.ts +45 -0
- package/src/index.ts +178 -0
- package/src/lint/audit-catalog.ts +87 -0
- package/src/lint/post-synth/graf101.ts +17 -0
- package/src/lint/post-synth/graf102.ts +17 -0
- package/src/lint/post-synth/graf103.ts +17 -0
- package/src/lint/post-synth/graf104.ts +17 -0
- package/src/lint/post-synth/graf105.ts +17 -0
- package/src/lint/post-synth/graf106.ts +17 -0
- package/src/lint/post-synth/graf107.ts +17 -0
- package/src/lint/post-synth/grafana-helpers.ts +68 -0
- package/src/lint/post-synth/index.ts +19 -0
- package/src/lint/post-synth/post-synth.test.ts +231 -0
- package/src/lint/rules/grafana-ast.ts +70 -0
- package/src/lint/rules/index.ts +9 -0
- package/src/lint/rules/literal-secret.ts +48 -0
- package/src/lint/rules/rules.test.ts +70 -0
- package/src/lint/rules/uid-syntax.ts +56 -0
- package/src/lsp/completions.test.ts +31 -0
- package/src/lsp/completions.ts +15 -0
- package/src/lsp/hover.test.ts +25 -0
- package/src/lsp/hover.ts +28 -0
- package/src/package-cli.ts +17 -0
- package/src/panels.ts +275 -0
- package/src/pin.ts +68 -0
- package/src/plugin.test.ts +50 -0
- package/src/plugin.ts +116 -0
- package/src/query.ts +160 -0
- package/src/schema/dashboard.gen.ts +1289 -0
- package/src/schema/gauge.gen.ts +64 -0
- package/src/schema/heatmap.gen.ts +321 -0
- package/src/schema/index.ts +17 -0
- package/src/schema/logs.gen.ts +34 -0
- package/src/schema/loki.gen.ts +77 -0
- package/src/schema/prometheus.gen.ts +181 -0
- package/src/schema/stat.gen.ts +86 -0
- package/src/schema/table.gen.ts +334 -0
- package/src/schema/tempo.gen.ts +146 -0
- package/src/schema/text.gen.ts +22 -0
- package/src/schema/timeseries.gen.ts +208 -0
- package/src/schema-validate.ts +143 -0
- package/src/schema.test.ts +76 -0
- package/src/serializer.test.ts +170 -0
- package/src/serializer.ts +37 -0
- package/src/skill-defs.ts +31 -0
- package/src/skills/chant-grafana-provisioning.md +42 -0
- package/src/skills/chant-grafana.md +93 -0
- package/src/spec/fetch-cli.ts +27 -0
- package/src/spec/schemas/dashboard.jsonschema.json +1901 -0
- package/src/spec/schemas/gauge.jsonschema.json +114 -0
- package/src/spec/schemas/heatmap.jsonschema.json +480 -0
- package/src/spec/schemas/logs.jsonschema.json +94 -0
- package/src/spec/schemas/loki.jsonschema.json +118 -0
- package/src/spec/schemas/prometheus.jsonschema.json +276 -0
- package/src/spec/schemas/stat.jsonschema.json +163 -0
- package/src/spec/schemas/table.jsonschema.json +751 -0
- package/src/spec/schemas/tempo.jsonschema.json +225 -0
- package/src/spec/schemas/text.jsonschema.json +72 -0
- package/src/spec/schemas/timeseries.jsonschema.json +471 -0
- package/src/spec/schemas.ts +56 -0
- package/src/util.ts +43 -0
- package/src/validate-cli.ts +7 -0
- package/src/validate-output.ts +380 -0
- package/src/validate.ts +108 -0
- package/src/variables.ts +161 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Dashboard` and `DashboardProvider`.
|
|
3
|
+
*
|
|
4
|
+
* A dashboard is written to `dashboards/<folder>/<uid>.json`, the JSON
|
|
5
|
+
* Grafana imports as it is. A provider is the entry in
|
|
6
|
+
* `provisioning/dashboards/chant.yaml` that points Grafana at those files;
|
|
7
|
+
* a build with dashboards and no declared provider gets a default one.
|
|
8
|
+
*/
|
|
9
|
+
import type { Declarable } from "@intentius/chant/declarable";
|
|
10
|
+
import type { PanelEntity, RowEntity } from "./panels.js";
|
|
11
|
+
import type { VariableEntity } from "./variables.js";
|
|
12
|
+
import type { DashboardLink, TimePickerConfig } from "./schema/dashboard.gen.js";
|
|
13
|
+
/** A dashboard link: `title` and `type` required, the rest defaulted as Grafana's editor would. */
|
|
14
|
+
export type DashboardLinkInput = Partial<DashboardLink> & Pick<DashboardLink, "title" | "type">;
|
|
15
|
+
export interface DashboardProps {
|
|
16
|
+
title: string;
|
|
17
|
+
/**
|
|
18
|
+
* Stable id: links, provisioning and the API address a dashboard by it.
|
|
19
|
+
* Letters, digits, `-` and `_`, at most 40 characters. Defaults to the
|
|
20
|
+
* export name as a uid (`checkoutService` becomes `checkout-service`).
|
|
21
|
+
*/
|
|
22
|
+
uid?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
tags?: string[];
|
|
25
|
+
/** Initial time range. Defaults to the last 6 hours. */
|
|
26
|
+
time?: {
|
|
27
|
+
from: string;
|
|
28
|
+
to: string;
|
|
29
|
+
};
|
|
30
|
+
/** Auto-refresh interval, e.g. `30s`. */
|
|
31
|
+
refresh?: string;
|
|
32
|
+
/** `browser`, `utc` or an IANA zone. Defaults to `browser`. */
|
|
33
|
+
timezone?: string;
|
|
34
|
+
weekStart?: string;
|
|
35
|
+
fiscalYearStartMonth?: number;
|
|
36
|
+
liveNow?: boolean;
|
|
37
|
+
timepicker?: TimePickerConfig;
|
|
38
|
+
/** Shared crosshair or tooltip across panels. */
|
|
39
|
+
graphTooltip?: "default" | "sharedCrosshair" | "sharedTooltip";
|
|
40
|
+
/** Whether users may edit it in the UI. Defaults to true, as in Grafana. */
|
|
41
|
+
editable?: boolean;
|
|
42
|
+
variables?: VariableEntity<any>[];
|
|
43
|
+
/** Panels and rows, top to bottom. A row's own `panels` follow it. */
|
|
44
|
+
panels?: Array<PanelEntity<any, any> | RowEntity>;
|
|
45
|
+
links?: DashboardLinkInput[];
|
|
46
|
+
/**
|
|
47
|
+
* The Grafana folder to provision it into. Written as a subdirectory of
|
|
48
|
+
* `dashboards/`, which the provider maps to folders
|
|
49
|
+
* (`foldersFromFilesStructure`). Leave it out for the General folder.
|
|
50
|
+
*/
|
|
51
|
+
folder?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface DashboardEntity extends Declarable {
|
|
54
|
+
readonly props: DashboardProps;
|
|
55
|
+
}
|
|
56
|
+
export declare const DASHBOARD_TYPE = "Grafana::Dashboard";
|
|
57
|
+
/** A Grafana dashboard. */
|
|
58
|
+
export declare const Dashboard: new (props: DashboardProps) => DashboardEntity;
|
|
59
|
+
export declare function isDashboardEntity(value: unknown): value is DashboardEntity;
|
|
60
|
+
/** Where Grafana finds the dashboard files by default: mount `dashboards/` here. */
|
|
61
|
+
export declare const DEFAULT_DASHBOARDS_PATH = "/var/lib/grafana/dashboards";
|
|
62
|
+
export interface DashboardProviderProps {
|
|
63
|
+
/** Provider name, unique in the provisioning file. */
|
|
64
|
+
name: string;
|
|
65
|
+
orgId?: number;
|
|
66
|
+
/** Folder for dashboards not in a subdirectory. */
|
|
67
|
+
folder?: string;
|
|
68
|
+
folderUid?: string;
|
|
69
|
+
/** Where the `dashboards/` output is mounted in the Grafana container. Defaults to `/var/lib/grafana/dashboards`. */
|
|
70
|
+
path?: string;
|
|
71
|
+
/** Map subdirectories to Grafana folders. Defaults to true, which is what a dashboard's `folder` relies on. */
|
|
72
|
+
foldersFromFilesStructure?: boolean;
|
|
73
|
+
disableDeletion?: boolean;
|
|
74
|
+
allowUiUpdates?: boolean;
|
|
75
|
+
updateIntervalSeconds?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface DashboardProviderEntity extends Declarable {
|
|
78
|
+
readonly props: DashboardProviderProps;
|
|
79
|
+
}
|
|
80
|
+
export declare const DASHBOARD_PROVIDER_TYPE = "Grafana::DashboardProvider";
|
|
81
|
+
/** An entry in the dashboard provisioning file. Optional: a default one is written when none is declared. */
|
|
82
|
+
export declare const DashboardProvider: new (props: DashboardProviderProps) => DashboardProviderEntity;
|
|
83
|
+
export declare function isDashboardProviderEntity(value: unknown): value is DashboardProviderEntity;
|
|
84
|
+
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Datasource`: a Grafana datasource, declared once.
|
|
3
|
+
*
|
|
4
|
+
* A declared datasource is written to the datasource provisioning file, and
|
|
5
|
+
* panels, queries and variables hold the entity itself rather than a uid
|
|
6
|
+
* string. The class is generic in the plugin type, so a `PromQuery` cannot
|
|
7
|
+
* be pointed at a Tempo datasource without a type error.
|
|
8
|
+
*/
|
|
9
|
+
import type { Declarable } from "@intentius/chant/declarable";
|
|
10
|
+
/** Datasource plugin types this lexicon types queries for. Any other plugin id is accepted as a string. */
|
|
11
|
+
export type KnownDatasourceType = "prometheus" | "tempo" | "loki";
|
|
12
|
+
/** How Grafana reaches the datasource: through its backend (`proxy`) or from the browser (`direct`). */
|
|
13
|
+
export type DatasourceAccess = "proxy" | "direct";
|
|
14
|
+
export interface DatasourceProps<T extends string = string> {
|
|
15
|
+
/** Display name, unique within the Grafana organisation. */
|
|
16
|
+
name: string;
|
|
17
|
+
/** The datasource plugin id, e.g. `prometheus`, `tempo`, `loki`. */
|
|
18
|
+
type: T;
|
|
19
|
+
/** Stable id panels refer to. Defaults to the name as a uid (`Prometheus` becomes `prometheus`). */
|
|
20
|
+
uid?: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
access?: DatasourceAccess;
|
|
23
|
+
isDefault?: boolean;
|
|
24
|
+
basicAuth?: boolean;
|
|
25
|
+
basicAuthUser?: string;
|
|
26
|
+
user?: string;
|
|
27
|
+
database?: string;
|
|
28
|
+
withCredentials?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Plugin settings. A declared `Datasource` anywhere in here is written as
|
|
31
|
+
* its uid, so `tracesToLogsV2: { datasourceUid: loki }` links Tempo to a
|
|
32
|
+
* declared Loki.
|
|
33
|
+
*/
|
|
34
|
+
jsonData?: Record<string, unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* Secrets. Write them as Grafana provisioning expands them
|
|
37
|
+
* (`$__env{NAME}`, `$__file{/path}`, `${NAME}`), not as literals: GRAF002
|
|
38
|
+
* flags a literal.
|
|
39
|
+
*/
|
|
40
|
+
secureJsonData?: Record<string, string>;
|
|
41
|
+
/** Whether users may edit the provisioned datasource in the UI. Defaults to false. */
|
|
42
|
+
editable?: boolean;
|
|
43
|
+
orgId?: number;
|
|
44
|
+
version?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface DatasourceEntity<T extends string = string> extends Declarable {
|
|
47
|
+
readonly props: DatasourceProps<T>;
|
|
48
|
+
/** The plugin id. */
|
|
49
|
+
readonly datasourceType: T;
|
|
50
|
+
/** The uid panels will reference. */
|
|
51
|
+
readonly uid: string;
|
|
52
|
+
}
|
|
53
|
+
export declare const DATASOURCE_TYPE = "Grafana::Datasource";
|
|
54
|
+
export interface DatasourceConstructor {
|
|
55
|
+
new <T extends string>(props: DatasourceProps<T>): DatasourceEntity<T>;
|
|
56
|
+
}
|
|
57
|
+
/** A Grafana datasource, provisioned from `provisioning/datasources/chant.yaml`. */
|
|
58
|
+
export declare const Datasource: DatasourceConstructor;
|
|
59
|
+
export declare function isDatasourceEntity(value: unknown): value is DatasourceEntity;
|
|
60
|
+
/** A datasource declared somewhere this build can't see, named by its Grafana ref. */
|
|
61
|
+
export interface DatasourceRef<T extends string = string> {
|
|
62
|
+
type: T;
|
|
63
|
+
uid: string;
|
|
64
|
+
}
|
|
65
|
+
/** Grafana's own pseudo-datasources, which need no declaration. */
|
|
66
|
+
export declare const BUILTIN_DATASOURCE_UIDS: ReadonlySet<string>;
|
|
67
|
+
//# sourceMappingURL=datasource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../src/datasource.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAG9D,2GAA2G;AAC3G,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,OAAO,GAAG,MAAM,CAAC;AAElE,wGAAwG;AACxG,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAElD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACxD,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,IAAI,EAAE,CAAC,CAAC;IACR,oGAAoG;IACpG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,UAAU;IAC7E,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACnC,qBAAqB;IACrB,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAIrD,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;CACxE;AAED,oFAAoF;AACpF,eAAO,MAAM,UAAU,EAIP,qBAAqB,CAAC;AAGtC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAO5E;AAED,sFAAsF;AACtF,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACtD,IAAI,EAAE,CAAC,CAAC;IACR,GAAG,EAAE,MAAM,CAAC;CACb;AAED,mEAAmE;AACnE,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAA2E,CAAC"}
|
package/dist/detect.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a parsed Grafana document looks like. Kept free of the plugin and the
|
|
3
|
+
* TypeScript compiler so it bundles for edge runtimes, like the other
|
|
4
|
+
* lexicons' `detect` modules.
|
|
5
|
+
*/
|
|
6
|
+
/** Dashboard JSON: a `panels` array plus a `schemaVersion` or a `templating` block. */
|
|
7
|
+
export declare function looksLikeDashboard(data: unknown): data is Record<string, unknown>;
|
|
8
|
+
/** A datasource provisioning file: `apiVersion` and a `datasources` list. */
|
|
9
|
+
export declare function looksLikeDatasourceProvisioning(data: unknown): data is {
|
|
10
|
+
apiVersion: unknown;
|
|
11
|
+
datasources: unknown[];
|
|
12
|
+
};
|
|
13
|
+
/** A dashboard provisioning file: `apiVersion` and a `providers` list. */
|
|
14
|
+
export declare function looksLikeDashboardProvisioning(data: unknown): data is {
|
|
15
|
+
apiVersion: unknown;
|
|
16
|
+
providers: unknown[];
|
|
17
|
+
};
|
|
18
|
+
/** Template detection for `chant import` and friends: any of the three. */
|
|
19
|
+
export declare function detectTemplate(data: unknown): boolean;
|
|
20
|
+
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../src/detect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGjF;AAED,6EAA6E;AAC7E,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,OAAO,EAAE,CAAA;CAAE,CAEtH;AAED,0EAA0E;AAC1E,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,EAAE,CAAA;CAAE,CAEnH;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAErD"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { grafanaPlugin } from "./plugin.js";
|
|
2
|
+
export { grafanaSerializer } from "./serializer.js";
|
|
3
|
+
export { Datasource, DATASOURCE_TYPE, BUILTIN_DATASOURCE_UIDS, isDatasourceEntity, type DatasourceProps, type DatasourceEntity, type DatasourceConstructor, type DatasourceRef, type DatasourceAccess, type KnownDatasourceType, } from "./datasource.js";
|
|
4
|
+
export { Dashboard, DashboardProvider, DASHBOARD_TYPE, DASHBOARD_PROVIDER_TYPE, DEFAULT_DASHBOARDS_PATH, isDashboardEntity, isDashboardProviderEntity, type DashboardProps, type DashboardEntity, type DashboardLinkInput, type DashboardProviderProps, type DashboardProviderEntity, } from "./dashboard.js";
|
|
5
|
+
export { TimeSeriesPanel, StatPanel, GaugePanel, TablePanel, LogsPanel, TracesPanel, HeatmapPanel, TextPanel, Row, definePanel, registeredPanels, panelDefinitionFor, isPanelEntity, isRowEntity, PANEL_TYPE_PREFIX, ROW_TYPE, type PanelProps, type PanelFieldConfig, type PanelLink, type PanelDefinition, type PanelEntity, type PanelClass, type RowProps, type RowEntity, } from "./panels.js";
|
|
6
|
+
export { PromQuery, TempoQuery, LokiQuery, defineQuery, registeredQueries, queryDefinitionFor, isQueryEntity, QUERY_TYPE_PREFIX, type DatasourceInput, type QueryModel, type QueryProps, type QueryDefinition, type QueryEntity, type QueryClass, type PromQueryEntity, type TempoQueryEntity, type LokiQueryEntity, } from "./query.js";
|
|
7
|
+
export { QueryVariable, CustomVariable, IntervalVariable, DatasourceVariable, ConstantVariable, TextboxVariable, isVariableEntity, isDatasourceVariable, isBuiltinVariable, VARIABLE_NAME, VARIABLE_TYPE_PREFIX, type VariableKind, type VariableHide, type VariableEntity, type VariableDatasource, type DatasourceVariableEntity, type QueryVariableProps, type CustomVariableProps, type IntervalVariableProps, type DatasourceVariableProps, type ConstantVariableProps, type TextboxVariableProps, } from "./variables.js";
|
|
8
|
+
export * as schema from "./schema/index.js";
|
|
9
|
+
export { DASHBOARD_SCHEMA_VERSION } from "./schema/index.js";
|
|
10
|
+
export { GRAFANA_SCHEMA_PIN, SCHEMA_NAMES, type GrafanaSchemaPin, type SchemaName } from "./pin.js";
|
|
11
|
+
export { buildGrafana, grafanaFiles, renderDashboard, dashboardJson, dashboardUid, panelsJson, targetJson, variableModel, datasourceRef, provisionedDatasource, provisionedProvider, datasourcesYaml, dashboardProvidersYaml, GRID_COLUMNS, DATASOURCES_FILE, DASHBOARD_PROVIDERS_FILE, DASHBOARDS_DIR, type BuiltGrafana, type BuiltDashboard, type GrafanaIndex, type ProvisionedDatasource, type ProvisionedProvider, type DashboardJson, type PanelJson, type RowPanelJson, type VariableModel, type DataSourceRef, } from "./build.js";
|
|
12
|
+
export { validateGrafanaOutput, issuesFor, variableReferences, type GrafanaIssue, type GrafanaIssueCode, type GrafanaArtifacts, type DashboardDoc, } from "./validate-output.js";
|
|
13
|
+
export { validateDashboardSchema, type SchemaProblem } from "./schema-validate.js";
|
|
14
|
+
export { looksLikeDashboard, looksLikeDatasourceProvisioning, looksLikeDashboardProvisioning } from "./detect.js";
|
|
15
|
+
export { slugUid, isValidUid, UID_PATTERN, type DeepPartial } from "./util.js";
|
|
16
|
+
export { RedDashboard, redQueries, SloDashboard, sloQueries, AgentDashboard, agentQueries, type RedDashboardProps, type RedDashboardMembers, type RedDashboardInstance, type SloDashboardProps, type SloDashboardMembers, type SloDashboardInstance, type AgentDashboardProps, type AgentDashboardMembers, type AgentDashboardInstance, type DashboardOptions, } from "./composites/index.js";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"algorithm": "sha256",
|
|
3
|
+
"artifacts": {
|
|
4
|
+
"manifest.json": "8e42c8e215c08777b181d935c832d794d26be2e4a5305db49f4e1beea9f069fb",
|
|
5
|
+
"meta.json": "cc3a6d1fa7baf5fd95c2f454ea1490e15ab88e59194333afb116e9ba0c82b731",
|
|
6
|
+
"types/index.d.ts": "ad385264290f2486f7a54be205684de8415a25b74eee5b809ca625ae19fb08da",
|
|
7
|
+
"rules/grafana-ast.ts": "51f4fac423f7a5c6d6f577074e95b4a70d4ab0a05883a86e04970a50c63d92e8",
|
|
8
|
+
"rules/literal-secret.ts": "c3622ec95fdc485c565f9637de95fd856449531f42060d001d4f9e142a0fe6ad",
|
|
9
|
+
"rules/uid-syntax.ts": "ea6fc0053afcdfb50fd6420d6845cba37352a66411d4f06e7e76876b063e7184",
|
|
10
|
+
"rules/graf101.ts": "e30e6fa3eaa184d59a658de275e5fcc5a3248aa8af2dc7120f0c28f7b0bb2113",
|
|
11
|
+
"rules/graf102.ts": "6186f51b89133464c78a22a7226d6071956a91189b5f1dd79ff81dd9a89d5c33",
|
|
12
|
+
"rules/graf103.ts": "d4a035f9fb2dad5e6f415c3fd684789517b0fa38455965b79e221ef2c4c443cf",
|
|
13
|
+
"rules/graf104.ts": "3a46afbc9afd6840079b5c0053d8b17d878dc6735dcf1d1d09d66971de4bccc8",
|
|
14
|
+
"rules/graf105.ts": "98264894350f1ce21841922dfefc3dc85abc0ec5c9db91afdfa5c180a8c306f1",
|
|
15
|
+
"rules/graf106.ts": "c7f96e236eda49e0b782ef064bb6f21ef93d797d435389fa89e26c697b73d69a",
|
|
16
|
+
"rules/graf107.ts": "f58f8258c596e66b92eba0ef5d48f3a785f84992c6a78d2cb9f6017d6504e3c1",
|
|
17
|
+
"rules/grafana-helpers.ts": "4cf58bcdcfd2c06b8c5c084d77ba780903952487d82773c2f42e6d27c7d3592d",
|
|
18
|
+
"skills/chant-grafana.md": "8976cd1dff9729ca655f31e86fce3fff14c90d7c65358947397ccc12bb61f2a4",
|
|
19
|
+
"skills/chant-grafana-provisioning.md": "8066d58ef6b8b58724b343cd054b9b210ffffcebe2d1587a6702bae33ab0c12e"
|
|
20
|
+
},
|
|
21
|
+
"composite": "5c58872fb14acd7eead441486e56d5cbc8402a604c740103ef1435f09b35a9d8"
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The grafana lexicon's chant audit catalog, contributed via
|
|
3
|
+
* `grafanaPlugin.auditCatalog()` (#687, #1346).
|
|
4
|
+
*
|
|
5
|
+
* GRAF101-GRAF107 read the emitted dashboard JSON and provisioning files, so
|
|
6
|
+
* they fire on an audit of files chant didn't build too, and are
|
|
7
|
+
* `yamlBased`. GRAF001 and GRAF002 read TypeScript source, so they are
|
|
8
|
+
* constructed with `yamlBased: false`; they are listed for a reader who
|
|
9
|
+
* meets them in a lint report.
|
|
10
|
+
*/
|
|
11
|
+
import { type RuleMeta } from "@intentius/chant/audit/catalog";
|
|
12
|
+
export declare const grafanaAuditCatalog: Record<string, RuleMeta>;
|
|
13
|
+
//# sourceMappingURL=audit-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAM1E,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAqExD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GRAF101: A panel, query or variable uses a datasource no Datasource in the build declares
|
|
3
|
+
*
|
|
4
|
+
* Grafana shows "datasource not found" on the panel. Typed references cannot go wrong this way, so it mostly catches a { type, uid } ref or a hand-edited dashboard. A panel with queries and no datasource at all is a warning: Grafana sends them to its default datasource. This check joins dashboards against the Datasource declarations of the same build root, so it goes silent across build roots (chant #1939): with no Datasource declared in the build it reports nothing, and a datasource declared in another build root looks undeclared. Keep datasources and the dashboards that use them in one build root.
|
|
5
|
+
*/
|
|
6
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
|
+
export declare const graf101: PostSynthCheck;
|
|
8
|
+
//# sourceMappingURL=graf101.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graf101.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/graf101.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAOrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GRAF102: A query is sent to a datasource of another plugin type
|
|
3
|
+
*
|
|
4
|
+
* A PromQL query sent to Tempo fails at query time. The typed classes prevent this at compile time; the check catches refs, datasource variables of the wrong plugin type and hand-edited dashboards. Like GRAF101 it joins against the Datasource declarations of the same build root and goes silent across build roots (chant #1939).
|
|
5
|
+
*/
|
|
6
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
|
+
export declare const graf102: PostSynthCheck;
|
|
8
|
+
//# sourceMappingURL=graf102.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graf102.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/graf102.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAOrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GRAF103: A query, title, datasource or repeat uses a variable the dashboard does not declare
|
|
3
|
+
*
|
|
4
|
+
* Grafana leaves an undeclared $name in the query as text, so the query fails or matches nothing. Names Grafana defines itself ($__interval, $__rate_interval, $__range and the rest of $__*) need no declaration.
|
|
5
|
+
*/
|
|
6
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
|
+
export declare const graf103: PostSynthCheck;
|
|
8
|
+
//# sourceMappingURL=graf103.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graf103.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/graf103.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAOrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GRAF104: Two dashboards, datasources, panels, variables or queries share an id
|
|
3
|
+
*
|
|
4
|
+
* Dashboard uids and datasource uids and names must be unique across the build, panel ids and variable names within a dashboard, and refIds within a panel. Grafana keeps one of two dashboards with the same uid and silently drops the other.
|
|
5
|
+
*/
|
|
6
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
|
+
export declare const graf104: PostSynthCheck;
|
|
8
|
+
//# sourceMappingURL=graf104.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graf104.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/graf104.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAOrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GRAF105: A panel does not fit the 24-column grid, or overlaps another panel
|
|
3
|
+
*
|
|
4
|
+
* A panel wider than the grid is an error. An overlap is a warning: Grafana moves one of the panels on load, so the dashboard does not look the way it was declared. Panels without x and y are placed by the dashboard and cannot overlap each other.
|
|
5
|
+
*/
|
|
6
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
|
+
export declare const graf105: PostSynthCheck;
|
|
8
|
+
//# sourceMappingURL=graf105.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graf105.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/graf105.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAOrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GRAF106: A dashboard or datasource uid Grafana rejects, or a dashboard with no title
|
|
3
|
+
*
|
|
4
|
+
* Grafana accepts uids of 1-40 letters, digits, - and _, and refuses to save a dashboard without a title.
|
|
5
|
+
*/
|
|
6
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
|
+
export declare const graf106: PostSynthCheck;
|
|
8
|
+
//# sourceMappingURL=graf106.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graf106.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/graf106.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAOrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GRAF107: A dashboard does not match the pinned Grafana schema
|
|
3
|
+
*
|
|
4
|
+
* The dashboard is validated against the dashboard schema at GRAFANA_SCHEMA_PIN, and each panel's options, fieldConfig.defaults.custom and queries against their plugin's schema with required fields relaxed (Grafana fills those in). What fails is a key the schema does not have or a value it does not allow: the edits Grafana would otherwise need on import.
|
|
5
|
+
*/
|
|
6
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
|
+
export declare const graf107: PostSynthCheck;
|
|
8
|
+
//# sourceMappingURL=graf107.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graf107.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/graf107.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAOrB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared plumbing for the grafana post-synth checks: find the dashboards and
|
|
3
|
+
* provisioned datasources in a build's output, and run the plain-function
|
|
4
|
+
* checks in `validate-output.ts` over them.
|
|
5
|
+
*
|
|
6
|
+
* Any output file shaped like a dashboard or a datasource provisioning file
|
|
7
|
+
* counts, not only the grafana lexicon's own, so a dashboard another lexicon
|
|
8
|
+
* embeds is checked the same way.
|
|
9
|
+
*/
|
|
10
|
+
import type { PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|
|
11
|
+
import { type GrafanaArtifacts, type GrafanaIssueCode } from "../../validate-output.js";
|
|
12
|
+
/** Every dashboard and provisioned datasource in the build's output. */
|
|
13
|
+
export declare function grafanaArtifacts(ctx: PostSynthContext): GrafanaArtifacts;
|
|
14
|
+
/** Diagnostics for one check across the build's output. */
|
|
15
|
+
export declare function grafanaDiagnostics(ctx: PostSynthContext, code: GrafanaIssueCode): PostSynthDiagnostic[];
|
|
16
|
+
//# sourceMappingURL=grafana-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grafana-helpers.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/grafana-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAK9F,OAAO,EAAa,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAiBhG,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,GAAG,gBAAgB,CAuBxE;AAED,2DAA2D;AAC3D,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,GAAG,mBAAmB,EAAE,CAQvG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AASvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAQ3C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as ts from "typescript";
|
|
2
|
+
/** The constructor name of a `new X(...)` or `X(...)` expression, if it is a plain or dotted name. */
|
|
3
|
+
export declare function calleeName(node: ts.CallExpression | ts.NewExpression): string | undefined;
|
|
4
|
+
/** A property's key as text, for identifier and string-literal keys. */
|
|
5
|
+
export declare function propertyName(prop: ts.ObjectLiteralElementLike): string | undefined;
|
|
6
|
+
/** The text of a string literal or substitution-free template, else undefined. */
|
|
7
|
+
export declare function literalText(node: ts.Expression): string | undefined;
|
|
8
|
+
export declare function position(source: ts.SourceFile, node: ts.Node): {
|
|
9
|
+
line: number;
|
|
10
|
+
column: number;
|
|
11
|
+
};
|
|
12
|
+
/** `const name = <init>` declarations in the file, so a value written as a named const can be followed. */
|
|
13
|
+
export declare function constInitializers(source: ts.SourceFile): Map<string, ts.Expression>;
|
|
14
|
+
/** Follow an identifier to the object literal it was declared as, when it is one in this file. */
|
|
15
|
+
export declare function resolveObject(node: ts.Expression, consts: Map<string, ts.Expression>, depth?: number): ts.ObjectLiteralExpression | undefined;
|
|
16
|
+
/** The first object-literal argument of every `new <Name>(...)` or `<Name>(...)` for the names given. */
|
|
17
|
+
export declare function constructorArgs(source: ts.SourceFile, names: (name: string) => boolean): Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
arg: ts.ObjectLiteralExpression;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=grafana-ast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grafana-ast.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/grafana-ast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,sGAAsG;AACtG,wBAAgB,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,GAAG,EAAE,CAAC,aAAa,GAAG,MAAM,GAAG,SAAS,CAKzF;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,wBAAwB,GAAG,MAAM,GAAG,SAAS,CAIlF;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,GAAG,SAAS,CAGnE;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAG/F;AAED,2GAA2G;AAC3G,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,CAQnF;AAED,kGAAkG;AAClG,wBAAgB,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,SAAI,GAAG,EAAE,CAAC,uBAAuB,GAAG,SAAS,CASxI;AAED,yGAAyG;AACzG,wBAAgB,eAAe,CAC7B,MAAM,EAAE,EAAE,CAAC,UAAU,EACrB,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAC/B,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAA;CAAE,CAAC,CAc1D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
2
|
+
export { uidSyntaxRule } from "./uid-syntax.js";
|
|
3
|
+
export { literalSecretRule } from "./literal-secret.js";
|
|
4
|
+
/** All lint rules provided by this lexicon (imported by plugin.ts's lintRules()). */
|
|
5
|
+
export declare const rules: LintRule[];
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAI3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,qFAAqF;AACrF,eAAO,MAAM,KAAK,EAAE,QAAQ,EAAuC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
2
|
+
/**
|
|
3
|
+
* GRAF002: a datasource secret written as a literal.
|
|
4
|
+
*
|
|
5
|
+
* `secureJsonData` holds passwords, tokens and TLS keys. A literal there is a
|
|
6
|
+
* secret in the repository and in the emitted provisioning file. Grafana
|
|
7
|
+
* expands `$__env{NAME}`, `$__file{/path}` and `${NAME}` when it reads the
|
|
8
|
+
* file, so the declaration never needs the value. A value written as a
|
|
9
|
+
* named `const` in the same file is followed.
|
|
10
|
+
*/
|
|
11
|
+
export declare const literalSecretRule: LintRule;
|
|
12
|
+
//# sourceMappingURL=literal-secret.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"literal-secret.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/literal-secret.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAMxF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,EAAE,QA+B/B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
2
|
+
/**
|
|
3
|
+
* GRAF001: a uid Grafana rejects, or a variable name queries cannot reference.
|
|
4
|
+
*
|
|
5
|
+
* A literal `uid` on a `Dashboard` or `Datasource` must be 1-40 letters,
|
|
6
|
+
* digits, `-` and `_`; Grafana refuses anything else on import. A literal
|
|
7
|
+
* `name` on a `*Variable` must be letters, digits and `_`, starting with a
|
|
8
|
+
* letter or `_`, or `$name` in a query cannot refer to it. Caught in source,
|
|
9
|
+
* before a build; GRAF106 checks the emitted uids too.
|
|
10
|
+
*/
|
|
11
|
+
export declare const uidSyntaxRule: LintRule;
|
|
12
|
+
//# sourceMappingURL=uid-syntax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uid-syntax.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/uid-syntax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,4BAA4B,CAAC;AAQxF;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE,QAqC3B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CompletionContext, CompletionItem } from "@intentius/chant/lsp/types";
|
|
2
|
+
/** Completions for the grafana entity classes: dashboards, datasources, panels, queries and variables. */
|
|
3
|
+
export declare function completions(ctx: CompletionContext): CompletionItem[];
|
|
4
|
+
//# sourceMappingURL=completions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/lsp/completions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAWpF,0GAA0G;AAC1G,wBAAgB,WAAW,CAAC,GAAG,EAAE,iBAAiB,GAAG,cAAc,EAAE,CAEpE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HoverContext, HoverInfo } from "@intentius/chant/lsp/types";
|
|
2
|
+
/** Hover for grafana entity classes: what it declares and, for panels and queries, the Grafana plugin id. */
|
|
3
|
+
export declare function hover(ctx: HoverContext): HoverInfo | undefined;
|
|
4
|
+
//# sourceMappingURL=hover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../src/lsp/hover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAY1E,6GAA6G;AAC7G,wBAAgB,KAAK,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,CAE9D"}
|
package/dist/meta.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ConstantVariable": {
|
|
3
|
+
"resourceType": "Grafana::Variable::constant",
|
|
4
|
+
"kind": "resource",
|
|
5
|
+
"lexicon": "grafana"
|
|
6
|
+
},
|
|
7
|
+
"CustomVariable": {
|
|
8
|
+
"resourceType": "Grafana::Variable::custom",
|
|
9
|
+
"kind": "resource",
|
|
10
|
+
"lexicon": "grafana"
|
|
11
|
+
},
|
|
12
|
+
"Dashboard": {
|
|
13
|
+
"resourceType": "Grafana::Dashboard",
|
|
14
|
+
"kind": "resource",
|
|
15
|
+
"lexicon": "grafana"
|
|
16
|
+
},
|
|
17
|
+
"DashboardProvider": {
|
|
18
|
+
"resourceType": "Grafana::DashboardProvider",
|
|
19
|
+
"kind": "resource",
|
|
20
|
+
"lexicon": "grafana"
|
|
21
|
+
},
|
|
22
|
+
"Datasource": {
|
|
23
|
+
"resourceType": "Grafana::Datasource",
|
|
24
|
+
"kind": "resource",
|
|
25
|
+
"lexicon": "grafana"
|
|
26
|
+
},
|
|
27
|
+
"DatasourceVariable": {
|
|
28
|
+
"resourceType": "Grafana::Variable::datasource",
|
|
29
|
+
"kind": "resource",
|
|
30
|
+
"lexicon": "grafana"
|
|
31
|
+
},
|
|
32
|
+
"GaugePanel": {
|
|
33
|
+
"resourceType": "Grafana::Panel::gauge",
|
|
34
|
+
"kind": "resource",
|
|
35
|
+
"lexicon": "grafana"
|
|
36
|
+
},
|
|
37
|
+
"HeatmapPanel": {
|
|
38
|
+
"resourceType": "Grafana::Panel::heatmap",
|
|
39
|
+
"kind": "resource",
|
|
40
|
+
"lexicon": "grafana"
|
|
41
|
+
},
|
|
42
|
+
"IntervalVariable": {
|
|
43
|
+
"resourceType": "Grafana::Variable::interval",
|
|
44
|
+
"kind": "resource",
|
|
45
|
+
"lexicon": "grafana"
|
|
46
|
+
},
|
|
47
|
+
"LogsPanel": {
|
|
48
|
+
"resourceType": "Grafana::Panel::logs",
|
|
49
|
+
"kind": "resource",
|
|
50
|
+
"lexicon": "grafana"
|
|
51
|
+
},
|
|
52
|
+
"LokiQuery": {
|
|
53
|
+
"resourceType": "Grafana::Query::loki",
|
|
54
|
+
"kind": "resource",
|
|
55
|
+
"lexicon": "grafana"
|
|
56
|
+
},
|
|
57
|
+
"PromQuery": {
|
|
58
|
+
"resourceType": "Grafana::Query::prometheus",
|
|
59
|
+
"kind": "resource",
|
|
60
|
+
"lexicon": "grafana"
|
|
61
|
+
},
|
|
62
|
+
"QueryVariable": {
|
|
63
|
+
"resourceType": "Grafana::Variable::query",
|
|
64
|
+
"kind": "resource",
|
|
65
|
+
"lexicon": "grafana"
|
|
66
|
+
},
|
|
67
|
+
"Row": {
|
|
68
|
+
"resourceType": "Grafana::Row",
|
|
69
|
+
"kind": "resource",
|
|
70
|
+
"lexicon": "grafana"
|
|
71
|
+
},
|
|
72
|
+
"StatPanel": {
|
|
73
|
+
"resourceType": "Grafana::Panel::stat",
|
|
74
|
+
"kind": "resource",
|
|
75
|
+
"lexicon": "grafana"
|
|
76
|
+
},
|
|
77
|
+
"TablePanel": {
|
|
78
|
+
"resourceType": "Grafana::Panel::table",
|
|
79
|
+
"kind": "resource",
|
|
80
|
+
"lexicon": "grafana"
|
|
81
|
+
},
|
|
82
|
+
"TempoQuery": {
|
|
83
|
+
"resourceType": "Grafana::Query::tempo",
|
|
84
|
+
"kind": "resource",
|
|
85
|
+
"lexicon": "grafana"
|
|
86
|
+
},
|
|
87
|
+
"TextboxVariable": {
|
|
88
|
+
"resourceType": "Grafana::Variable::textbox",
|
|
89
|
+
"kind": "resource",
|
|
90
|
+
"lexicon": "grafana"
|
|
91
|
+
},
|
|
92
|
+
"TextPanel": {
|
|
93
|
+
"resourceType": "Grafana::Panel::text",
|
|
94
|
+
"kind": "resource",
|
|
95
|
+
"lexicon": "grafana"
|
|
96
|
+
},
|
|
97
|
+
"TimeSeriesPanel": {
|
|
98
|
+
"resourceType": "Grafana::Panel::timeseries",
|
|
99
|
+
"kind": "resource",
|
|
100
|
+
"lexicon": "grafana"
|
|
101
|
+
},
|
|
102
|
+
"TracesPanel": {
|
|
103
|
+
"resourceType": "Grafana::Panel::traces",
|
|
104
|
+
"kind": "resource",
|
|
105
|
+
"lexicon": "grafana"
|
|
106
|
+
}
|
|
107
|
+
}
|