@intentius/chant-lexicon-prometheus 0.124.31 → 0.124.32

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.
Files changed (114) hide show
  1. package/dist/alertmanager.js +61 -0
  2. package/dist/api/alertmanager.js +98 -0
  3. package/dist/api/apply.js +306 -0
  4. package/dist/api/bind.js +66 -0
  5. package/dist/api/client.js +110 -0
  6. package/dist/api/evaluated.js +86 -0
  7. package/dist/api/fake-servers.js +165 -0
  8. package/dist/api/index.js +17 -0
  9. package/dist/api/ruler.js +122 -0
  10. package/dist/build.js +240 -0
  11. package/dist/catalog.js +66 -0
  12. package/dist/codegen/docs-cli.js +3 -0
  13. package/dist/codegen/docs.js +105 -0
  14. package/dist/codegen/generate-cli.js +7 -0
  15. package/dist/codegen/generate.js +42 -0
  16. package/dist/codegen/package.js +28 -0
  17. package/dist/collector-metrics.js +225 -0
  18. package/dist/composites/alert-routing.js +210 -0
  19. package/dist/composites/catalog.js +344 -0
  20. package/dist/composites/genai.js +454 -0
  21. package/dist/composites/index.js +8 -0
  22. package/dist/composites/red-alerts.js +135 -0
  23. package/dist/composites/slo.js +353 -0
  24. package/dist/composites/watchdog.js +110 -0
  25. package/dist/config-model.js +52 -0
  26. package/dist/config.js +225 -0
  27. package/dist/describe-resources.js +299 -0
  28. package/dist/detect.js +12 -0
  29. package/dist/duration.js +54 -0
  30. package/dist/export-resources.js +163 -0
  31. package/dist/import/alertmanager-live.js +309 -0
  32. package/dist/import/embedded.js +100 -0
  33. package/dist/import/generator.js +683 -0
  34. package/dist/import/parser.js +428 -0
  35. package/dist/import/slo.js +207 -0
  36. package/dist/index.js +33 -0
  37. package/dist/init-templates.js +119 -0
  38. package/dist/integrations.js +33 -0
  39. package/dist/integrity.json +2 -2
  40. package/dist/lint/audit-catalog.js +60 -0
  41. package/dist/lint/audit-lineage.js +42 -0
  42. package/dist/lint/post-synth/index.js +68 -0
  43. package/dist/lint/post-synth/prom-helpers.js +157 -0
  44. package/dist/lint/post-synth/prom101.js +13 -0
  45. package/dist/lint/post-synth/prom102.js +13 -0
  46. package/dist/lint/post-synth/prom103.js +13 -0
  47. package/dist/lint/post-synth/prom104.js +13 -0
  48. package/dist/lint/post-synth/prom105.js +13 -0
  49. package/dist/lint/post-synth/prom106.js +13 -0
  50. package/dist/lint/post-synth/prom107.js +13 -0
  51. package/dist/lint/post-synth/prom201.js +13 -0
  52. package/dist/lint/post-synth/prom202.js +13 -0
  53. package/dist/lint/post-synth/prom203.js +13 -0
  54. package/dist/lint/post-synth/prom204.js +13 -0
  55. package/dist/lint/post-synth/prom205.js +13 -0
  56. package/dist/lint/post-synth/prom206.js +13 -0
  57. package/dist/lint/post-synth/prom207.js +13 -0
  58. package/dist/lint/post-synth/prom208.js +13 -0
  59. package/dist/lint/post-synth/prom209.js +13 -0
  60. package/dist/lint/post-synth/prom210.js +13 -0
  61. package/dist/lint/post-synth/prom211.js +17 -0
  62. package/dist/lint/post-synth/prom212.js +14 -0
  63. package/dist/lint/post-synth/prom213.js +16 -0
  64. package/dist/lint/post-synth/prom214.js +14 -0
  65. package/dist/lint/post-synth/prom215.js +14 -0
  66. package/dist/lint/post-synth/prom216.js +15 -0
  67. package/dist/lint/post-synth/prom217.js +14 -0
  68. package/dist/lint/post-synth/prom218.js +15 -0
  69. package/dist/lint/post-synth/prom219.js +14 -0
  70. package/dist/lint/post-synth/prom220.js +14 -0
  71. package/dist/lint/post-synth/prom221.js +15 -0
  72. package/dist/lint/post-synth/prom222.js +14 -0
  73. package/dist/lint/post-synth/prom223.js +15 -0
  74. package/dist/lint/post-synth/prom224.js +14 -0
  75. package/dist/lint/post-synth/prom225.js +15 -0
  76. package/dist/lint/post-synth/prom301.js +19 -0
  77. package/dist/lint/rules/index.js +8 -0
  78. package/dist/lint/rules/literal-credential.js +127 -0
  79. package/dist/lint/rules/prom-ast.js +65 -0
  80. package/dist/lint/rules/promql-literal.js +65 -0
  81. package/dist/lint/rules/slo-literal.js +79 -0
  82. package/dist/lsp/completions.js +11 -0
  83. package/dist/lsp/hover.js +21 -0
  84. package/dist/manifest.json +1 -1
  85. package/dist/matchers.js +131 -0
  86. package/dist/model.js +108 -0
  87. package/dist/op/activities/index.js +20 -0
  88. package/dist/op/activities/promtool.js +87 -0
  89. package/dist/op/activities/rule-audit.js +128 -0
  90. package/dist/op/activities/rules-loaded.js +73 -0
  91. package/dist/op/activities/silence.js +123 -0
  92. package/dist/op/activity-contracts.js +51 -0
  93. package/dist/op/audit-op.js +28 -0
  94. package/dist/op/builders.js +57 -0
  95. package/dist/op/slo-rule-tests.js +148 -0
  96. package/dist/package-cli.js +14 -0
  97. package/dist/pin.js +13 -0
  98. package/dist/plugin.js +143 -0
  99. package/dist/prometheus-config.js +38 -0
  100. package/dist/promql-analysis.js +343 -0
  101. package/dist/promql.js +44 -0
  102. package/dist/rule-eval.js +466 -0
  103. package/dist/rules.js +97 -0
  104. package/dist/serializer.js +59 -0
  105. package/dist/skill-defs.js +41 -0
  106. package/dist/tools.js +85 -0
  107. package/dist/validate-cli.js +7 -0
  108. package/dist/validate-config.js +556 -0
  109. package/dist/validate-integrations.js +388 -0
  110. package/dist/validate-relabel.js +52 -0
  111. package/dist/validate-security.js +135 -0
  112. package/dist/validate.js +69 -0
  113. package/package.json +10 -10
  114. package/src/codegen/package.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-prometheus",
3
- "version": "0.124.31",
3
+ "version": "0.124.32",
4
4
  "description": "Prometheus lexicon for chant — typed recording and alerting rule groups and Alertmanager routing, serialized to a rule file and alertmanager.yml",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -34,32 +34,32 @@
34
34
  ".": {
35
35
  "development": "./src/index.ts",
36
36
  "types": "./dist/index.d.ts",
37
- "default": "./src/index.ts"
37
+ "default": "./dist/index.js"
38
38
  },
39
39
  "./*": {
40
40
  "development": "./src/*.ts",
41
41
  "types": "./dist/*.d.ts",
42
- "default": "./src/*.ts"
42
+ "default": "./dist/*.js"
43
43
  },
44
44
  "./api": {
45
45
  "development": "./src/api/index.ts",
46
46
  "types": "./dist/api/index.d.ts",
47
- "default": "./src/api/index.ts"
47
+ "default": "./dist/api/index.js"
48
48
  },
49
49
  "./op/activities": {
50
50
  "development": "./src/op/activities/index.ts",
51
51
  "types": "./dist/op/activities/index.d.ts",
52
- "default": "./src/op/activities/index.ts"
52
+ "default": "./dist/op/activities/index.js"
53
53
  },
54
54
  "./op/activity-contracts": {
55
55
  "development": "./src/op/activity-contracts.ts",
56
56
  "types": "./dist/op/activity-contracts.d.ts",
57
- "default": "./src/op/activity-contracts.ts"
57
+ "default": "./dist/op/activity-contracts.js"
58
58
  },
59
59
  "./lint/post-synth": {
60
60
  "development": "./src/lint/post-synth/index.ts",
61
61
  "types": "./dist/lint/post-synth/index.d.ts",
62
- "default": "./src/lint/post-synth/index.ts"
62
+ "default": "./dist/lint/post-synth/index.js"
63
63
  },
64
64
  "./manifest": "./dist/manifest.json",
65
65
  "./meta": "./dist/meta.json",
@@ -71,10 +71,10 @@
71
71
  "validate": "tsx src/validate-cli.ts",
72
72
  "docs": "tsx src/codegen/docs-cli.ts",
73
73
  "prepack": "npm run generate && npm run bundle && npm run validate && npm run build",
74
- "build": "../../scripts/tsc7.sh -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name \"*.js\" -o -name \"*.js.map\" \\) -delete"
74
+ "build": "../../scripts/tsc7.sh -p tsconfig.build.json --sourceMap false && tsc-alias -p tsconfig.build.json"
75
75
  },
76
76
  "dependencies": {
77
- "@intentius/chant-lexicon-otel": "^0.124.31",
77
+ "@intentius/chant-lexicon-otel": "^0.124.32",
78
78
  "@lezer/highlight": "^1.2.4",
79
79
  "@lezer/lr": "^1.4.10",
80
80
  "@prometheus-io/lezer-promql": "0.315.0",
@@ -88,6 +88,6 @@
88
88
  "typescript": "^5.9.3"
89
89
  },
90
90
  "peerDependencies": {
91
- "@intentius/chant": "^0.124.31"
91
+ "@intentius/chant": "^0.124.32"
92
92
  }
93
93
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { readFileSync } from "fs";
6
6
  import { join, dirname } from "path";
7
- import { fileURLToPath } from "url";
7
+ import { moduleSourceDir } from "@intentius/chant/module-source";
8
8
  import {
9
9
  packagePipeline,
10
10
  collectSkills,
@@ -17,7 +17,7 @@ import { prometheusSkills } from "../skill-defs";
17
17
  export type { PackageOptions, PackageResult };
18
18
 
19
19
  // src/codegen/package.ts -> src/
20
- const srcDir = dirname(dirname(fileURLToPath(import.meta.url)));
20
+ const srcDir = dirname(moduleSourceDir(import.meta.url));
21
21
 
22
22
  export async function packageLexicon(opts: PackageOptions = {}): Promise<PackageResult> {
23
23
  const pkgJson = JSON.parse(readFileSync(join(srcDir, "..", "package.json"), "utf-8"));