pepr 0.12.2 → 0.13.1

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 (99) hide show
  1. package/CODE_OF_CONDUCT.md +83 -0
  2. package/CONTRIBUTING.md +70 -0
  3. package/README.md +28 -30
  4. package/dist/cli.js +666 -692
  5. package/dist/controller.js +13 -81
  6. package/dist/lib/assets/deploy.d.ts +3 -0
  7. package/dist/lib/assets/deploy.d.ts.map +1 -0
  8. package/dist/lib/assets/index.d.ts +17 -0
  9. package/dist/lib/assets/index.d.ts.map +1 -0
  10. package/dist/lib/assets/loader.d.ts +8 -0
  11. package/dist/lib/assets/loader.d.ts.map +1 -0
  12. package/dist/lib/assets/networking.d.ts +6 -0
  13. package/dist/lib/assets/networking.d.ts.map +1 -0
  14. package/dist/lib/assets/pods.d.ts +8 -0
  15. package/dist/lib/assets/pods.d.ts.map +1 -0
  16. package/dist/lib/assets/rbac.d.ts +11 -0
  17. package/dist/lib/assets/rbac.d.ts.map +1 -0
  18. package/dist/lib/assets/webhooks.d.ts +6 -0
  19. package/dist/lib/assets/webhooks.d.ts.map +1 -0
  20. package/dist/lib/assets/yaml.d.ts +4 -0
  21. package/dist/lib/assets/yaml.d.ts.map +1 -0
  22. package/dist/lib/capability.d.ts +4 -9
  23. package/dist/lib/capability.d.ts.map +1 -1
  24. package/dist/lib/controller.d.ts +4 -15
  25. package/dist/lib/controller.d.ts.map +1 -1
  26. package/dist/lib/errors.d.ts +12 -0
  27. package/dist/lib/errors.d.ts.map +1 -0
  28. package/dist/lib/filter.d.ts +1 -1
  29. package/dist/lib/filter.d.ts.map +1 -1
  30. package/dist/lib/k8s/index.d.ts +2 -1
  31. package/dist/lib/k8s/index.d.ts.map +1 -1
  32. package/dist/lib/k8s/kinds.d.ts.map +1 -1
  33. package/dist/lib/k8s/types.d.ts +18 -14
  34. package/dist/lib/k8s/types.d.ts.map +1 -1
  35. package/dist/lib/k8s/upstream.d.ts +2 -2
  36. package/dist/lib/k8s/upstream.d.ts.map +1 -1
  37. package/dist/lib/logger.d.ts +8 -54
  38. package/dist/lib/logger.d.ts.map +1 -1
  39. package/dist/lib/metrics.d.ts +10 -9
  40. package/dist/lib/metrics.d.ts.map +1 -1
  41. package/dist/lib/module.d.ts +4 -4
  42. package/dist/lib/module.d.ts.map +1 -1
  43. package/dist/lib/mutate-processor.d.ts +5 -0
  44. package/dist/lib/mutate-processor.d.ts.map +1 -0
  45. package/dist/lib/{request.d.ts → mutate-request.d.ts} +7 -7
  46. package/dist/lib/mutate-request.d.ts.map +1 -0
  47. package/dist/lib/types.d.ts +48 -55
  48. package/dist/lib/types.d.ts.map +1 -1
  49. package/dist/lib/validate-processor.d.ts +4 -0
  50. package/dist/lib/validate-processor.d.ts.map +1 -0
  51. package/dist/lib/validate-request.d.ts +54 -0
  52. package/dist/lib/validate-request.d.ts.map +1 -0
  53. package/dist/lib.d.ts +3 -2
  54. package/dist/lib.d.ts.map +1 -1
  55. package/dist/lib.js +610 -354
  56. package/dist/lib.js.map +4 -4
  57. package/jest.config.json +4 -0
  58. package/journey/before.ts +21 -0
  59. package/journey/k8s.ts +81 -0
  60. package/journey/pepr-build.ts +69 -0
  61. package/journey/pepr-deploy.ts +133 -0
  62. package/journey/pepr-dev.ts +155 -0
  63. package/journey/pepr-format.ts +13 -0
  64. package/journey/pepr-init.ts +12 -0
  65. package/package.json +29 -27
  66. package/src/cli.ts +2 -11
  67. package/src/lib/assets/deploy.ts +179 -0
  68. package/src/lib/assets/index.ts +53 -0
  69. package/src/lib/assets/loader.ts +41 -0
  70. package/src/lib/assets/networking.ts +58 -0
  71. package/src/lib/assets/pods.ts +148 -0
  72. package/src/lib/assets/rbac.ts +57 -0
  73. package/src/lib/assets/webhooks.ts +139 -0
  74. package/src/lib/assets/yaml.ts +75 -0
  75. package/src/lib/capability.ts +80 -68
  76. package/src/lib/controller.ts +199 -99
  77. package/src/lib/errors.ts +20 -0
  78. package/src/lib/fetch.ts +1 -1
  79. package/src/lib/filter.ts +1 -3
  80. package/src/lib/k8s/index.ts +4 -1
  81. package/src/lib/k8s/kinds.ts +40 -0
  82. package/src/lib/k8s/types.ts +21 -15
  83. package/src/lib/k8s/upstream.ts +5 -1
  84. package/src/lib/logger.ts +14 -125
  85. package/src/lib/metrics.ts +86 -29
  86. package/src/lib/module.ts +32 -16
  87. package/src/lib/{processor.ts → mutate-processor.ts} +39 -28
  88. package/src/lib/{request.ts → mutate-request.ts} +26 -13
  89. package/src/lib/types.ts +54 -60
  90. package/src/lib/validate-processor.ts +76 -0
  91. package/src/lib/validate-request.ts +106 -0
  92. package/src/lib.ts +4 -2
  93. package/src/runtime/controller.ts +1 -1
  94. package/dist/lib/k8s/webhook.d.ts +0 -37
  95. package/dist/lib/k8s/webhook.d.ts.map +0 -1
  96. package/dist/lib/processor.d.ts +0 -5
  97. package/dist/lib/processor.d.ts.map +0 -1
  98. package/dist/lib/request.d.ts.map +0 -1
  99. package/src/lib/k8s/webhook.ts +0 -643
@@ -30,93 +30,25 @@ var import_fs = __toESM(require("fs"));
30
30
  var import_zlib = require("zlib");
31
31
 
32
32
  // src/lib/logger.ts
33
- var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
34
- LogLevel2[LogLevel2["debug"] = 0] = "debug";
35
- LogLevel2[LogLevel2["info"] = 1] = "info";
36
- LogLevel2[LogLevel2["warn"] = 2] = "warn";
37
- LogLevel2[LogLevel2["error"] = 3] = "error";
38
- return LogLevel2;
39
- })(LogLevel || {});
40
- var Logger = class {
41
- _logLevel;
42
- /**
43
- * Create a new logger instance.
44
- * @param logLevel - The minimum log level to log messages for.
45
- */
46
- constructor(logLevel) {
47
- this._logLevel = logLevel;
48
- }
49
- /**
50
- * Change the log level of the logger.
51
- * @param logLevel - The log level to log the message at.
52
- */
53
- SetLogLevel(logLevel) {
54
- this._logLevel = LogLevel[logLevel];
55
- this.debug(`Log level set to ${logLevel}`);
56
- }
57
- /**
58
- * Log a debug message.
59
- * @param message - The message to log.
60
- */
61
- debug(message, prefix) {
62
- this.log(0 /* debug */, message, prefix);
63
- }
64
- /**
65
- * Log an info message.
66
- * @param message - The message to log.
67
- */
68
- info(message, prefix) {
69
- this.log(1 /* info */, message, prefix);
70
- }
71
- /**
72
- * Log a warning message.
73
- * @param message - The message to log.
74
- */
75
- warn(message, prefix) {
76
- this.log(2 /* warn */, message, prefix);
77
- }
78
- /**
79
- * Log an error message.
80
- * @param message - The message to log.
81
- */
82
- error(message, prefix) {
83
- this.log(3 /* error */, message, prefix);
84
- }
85
- /**
86
- * Log a message at the specified log level.
87
- * @param logLevel - The log level of the message.
88
- * @param message - The message to log.
89
- */
90
- log(logLevel, message, callerPrefix = "") {
91
- const color = {
92
- [0 /* debug */]: "\x1B[30m" /* FgBlack */,
93
- [1 /* info */]: "\x1B[36m" /* FgCyan */,
94
- [2 /* warn */]: "\x1B[33m" /* FgYellow */,
95
- [3 /* error */]: "\x1B[31m" /* FgRed */
96
- };
97
- if (logLevel >= this._logLevel) {
98
- let prefix = "[" + LogLevel[logLevel] + "] " + callerPrefix;
99
- prefix = this.colorize(prefix, color[logLevel]);
100
- if (typeof message !== "string") {
101
- console.log(prefix);
102
- console.debug("%o", message);
103
- } else {
104
- console.log(prefix + " " + message);
105
- }
106
- }
107
- }
108
- colorize(text, color) {
109
- return color + text + "\x1B[0m" /* Reset */;
33
+ var import_pino = require("pino");
34
+ var isPrettyLog = process.env.PEPR_PRETTY_LOGS === "true";
35
+ var pretty = {
36
+ target: "pino-pretty",
37
+ options: {
38
+ colorize: true
110
39
  }
111
40
  };
112
- var Log = new Logger(1 /* info */);
41
+ var transport = isPrettyLog ? pretty : void 0;
42
+ var Log = (0, import_pino.pino)({
43
+ transport
44
+ });
113
45
  if (process.env.LOG_LEVEL) {
114
- Log.SetLogLevel(process.env.LOG_LEVEL);
46
+ Log.level = process.env.LOG_LEVEL;
115
47
  }
116
48
  var logger_default = Log;
117
49
 
118
50
  // src/cli/init/templates/data.json
119
- var packageJSON = { name: "pepr", description: "Kubernetes application engine", author: "Defense Unicorns", homepage: "https://github.com/defenseunicorns/pepr", license: "Apache-2.0", bin: "dist/cli.js", repository: "defenseunicorns/pepr", engines: { node: ">=18.0.0" }, version: "0.12.2", main: "dist/lib.js", types: "dist/lib.d.ts", scripts: { prebuild: "rm -fr dist/* && node hack/build-template-data.js", build: "tsc && node build.mjs", test: "npm run test:unit && npm run test:e2e", "test:unit": "npm run build && tsc -p tsconfig.tests.json && ava dist/**/*.test.js", "test:e2e": "npm run test:e2e:k3d && npm run test:e2e:build && npm run test:e2e:image && npm run test:e2e:run", "test:e2e:k3d": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev --k3s-arg '--debug@server:0'", "test:e2e:build": "npm run build && npm pack", "test:e2e:image": "docker buildx build --tag pepr:dev . && k3d image import pepr:dev -c pepr-dev", "test:e2e:run": "ava hack/e2e.test.mjs --sequential --timeout=2m", "format:check": "eslint src && prettier src --check", "format:fix": "eslint src --fix && prettier src --write" }, dependencies: { "@kubernetes/client-node": "0.18.1", express: "4.18.2", "fast-json-patch": "3.1.1", "http-status-codes": "2.2.0", "node-fetch": "2.6.12", "prom-client": "^14.2.0", ramda: "0.29.0" }, devDependencies: { "@types/eslint": "8.44.1", "@types/express": "4.17.17", "@types/node-fetch": "2.6.4", "@types/node-forge": "1.3.4", "@types/prettier": "2.7.3", "@types/prompts": "2.4.4", "@types/ramda": "0.29.3", "@types/uuid": "9.0.2", ava: "5.3.1", nock: "13.3.2" }, peerDependencies: { "@typescript-eslint/eslint-plugin": "5.59.7", "@typescript-eslint/parser": "5.59.7", commander: "10.0.1", esbuild: "0.17.19", eslint: "8.41.0", "node-forge": "1.3.1", prettier: "2.8.8", prompts: "2.4.2", typescript: "5.0.4", uuid: "9.0.0" }, ava: { failFast: true, verbose: true } };
51
+ var packageJSON = { name: "pepr", description: "Kubernetes application engine", author: "Defense Unicorns", homepage: "https://github.com/defenseunicorns/pepr", license: "Apache-2.0", bin: "dist/cli.js", repository: "defenseunicorns/pepr", engines: { node: ">=18.0.0" }, version: "0.13.1", main: "dist/lib.js", types: "dist/lib.d.ts", scripts: { "gen-data-json": "node hack/build-template-data.js", prebuild: "rm -fr dist/* && npm run gen-data-json", build: "tsc && node build.mjs", test: "npm run test:unit && npm run test:journey", "test:unit": "npm run gen-data-json && jest src --coverage", "test:journey": "npm run test:journey:k3d && npm run test:journey:build && npm run test:journey:image && npm run test:journey:run", "test:journey:k3d": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev --k3s-arg '--debug@server:0'", "test:journey:build": "npm run build && npm pack", "test:journey:image": "docker buildx build --tag pepr:dev . && k3d image import pepr:dev -c pepr-dev", "test:journey:run": "jest journey/entrypoint.test.ts", "format:check": "eslint src && prettier src --check", "format:fix": "eslint src --fix && prettier src --write" }, dependencies: { "@kubernetes/client-node": "0.18.1", express: "4.18.2", "fast-json-patch": "3.1.1", "http-status-codes": "2.2.0", "node-fetch": "2.7.0", pino: "8.15.0", "pino-pretty": "10.2.0", "prom-client": "14.2.0", ramda: "0.29.0" }, devDependencies: { "@jest/globals": "29.6.4", "@types/eslint": "8.44.2", "@types/express": "4.17.17", "@types/node": "18.x.x", "@types/node-fetch": "2.6.4", "@types/node-forge": "1.3.4", "@types/prettier": "3.0.0", "@types/prompts": "2.4.4", "@types/ramda": "0.29.3", "@types/uuid": "9.0.3", jest: "29.6.4", nock: "13.3.3", "ts-jest": "29.1.1" }, peerDependencies: { "@typescript-eslint/eslint-plugin": "6.5.0", "@typescript-eslint/parser": "6.5.0", commander: "11.0.0", esbuild: "0.19.2", eslint: "8.48.0", "node-forge": "1.3.1", prettier: "3.0.3", prompts: "2.4.2", typescript: "5.2.2", uuid: "9.0.0" } };
120
52
 
121
53
  // src/runtime/controller.ts
122
54
  var { version } = packageJSON;
@@ -129,7 +61,7 @@ function validateHash(expectedHash) {
129
61
  function runModule(expectedHash) {
130
62
  const gzPath = `/app/load/module-${expectedHash}.js.gz`;
131
63
  const jsPath = `/app/module-${expectedHash}.js`;
132
- logger_default.SetLogLevel("debug");
64
+ logger_default.level = "info";
133
65
  if (!import_fs.default.existsSync(gzPath)) {
134
66
  logger_default.error(`File not found: ${gzPath}`);
135
67
  process.exit(1);
@@ -0,0 +1,3 @@
1
+ import { Assets } from ".";
2
+ export declare function deploy(assets: Assets, webhookTimeout?: number): Promise<void>;
3
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/lib/assets/deploy.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAO3B,wBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,iBA6JnE"}
@@ -0,0 +1,17 @@
1
+ import { TLSOut } from "../k8s/tls";
2
+ import { CapabilityExport, ModuleConfig } from "../types";
3
+ export declare class Assets {
4
+ readonly config: ModuleConfig;
5
+ readonly path: string;
6
+ readonly host?: string | undefined;
7
+ readonly name: string;
8
+ readonly tls: TLSOut;
9
+ readonly apiToken: string;
10
+ capabilities: CapabilityExport[];
11
+ image: string;
12
+ constructor(config: ModuleConfig, path: string, host?: string | undefined);
13
+ deploy(webhookTimeout?: number): Promise<void>;
14
+ zarfYaml(path: string): string;
15
+ allYaml(): Promise<string>;
16
+ }
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/assets/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAU,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAK1D,qBAAa,MAAM;IAQf,QAAQ,CAAC,MAAM,EAAE,YAAY;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,IAAI,CAAC;IAThB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAG,gBAAgB,EAAE,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;gBAGH,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,oBAAQ;IAkBlB,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM;IAKpC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAIf,OAAO;CAId"}
@@ -0,0 +1,8 @@
1
+ import { CapabilityExport } from "../types";
2
+ /**
3
+ * Read the capabilities from the module by running it in build mode
4
+ * @param path
5
+ * @returns
6
+ */
7
+ export declare function loadCapabilities(path: string): Promise<CapabilityExport[]>;
8
+ //# sourceMappingURL=loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/lib/assets/loader.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA4B1E"}
@@ -0,0 +1,6 @@
1
+ import { TLSOut } from "../k8s/tls";
2
+ import { Secret, Service } from "../k8s/upstream";
3
+ export declare function apiTokenSecret(name: string, apiToken: string): Secret;
4
+ export declare function tlsSecret(name: string, tls: TLSOut): Secret;
5
+ export declare function service(name: string): Service;
6
+ //# sourceMappingURL=networking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"networking.d.ts","sourceRoot":"","sources":["../../../src/lib/assets/networking.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAarE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAc3D;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAoB7C"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ import { Assets } from ".";
3
+ import { Deployment, Namespace, Secret } from "../k8s/upstream";
4
+ /** Generate the pepr-system namespace */
5
+ export declare const namespace: Namespace;
6
+ export declare function deployment(assets: Assets, hash: string): Deployment;
7
+ export declare function moduleSecret(name: string, data: Buffer, hash: string): Secret;
8
+ //# sourceMappingURL=pods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pods.d.ts","sourceRoot":"","sources":["../../../src/lib/assets/pods.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEhE,yCAAyC;AACzC,eAAO,MAAM,SAAS,EAAE,SAIvB,CAAC;AAEF,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAkHnE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgB7E"}
@@ -0,0 +1,11 @@
1
+ import { ClusterRole, ClusterRoleBinding, ServiceAccount } from "../k8s/upstream";
2
+ /**
3
+ * Grants the controller access to cluster resources beyond the mutating webhook.
4
+ *
5
+ * @todo: should dynamically generate this based on resources used by the module. will also need to explore how this should work for multiple modules.
6
+ * @returns
7
+ */
8
+ export declare function clusterRole(name: string): ClusterRole;
9
+ export declare function clusterRoleBinding(name: string): ClusterRoleBinding;
10
+ export declare function serviceAccount(name: string): ServiceAccount;
11
+ //# sourceMappingURL=rbac.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rbac.d.ts","sourceRoot":"","sources":["../../../src/lib/assets/rbac.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAElF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAcrD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAkBnE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAS3D"}
@@ -0,0 +1,6 @@
1
+ import { V1RuleWithOperations } from "@kubernetes/client-node";
2
+ import { Assets } from ".";
3
+ import { MutatingWebhookConfiguration, ValidatingWebhookConfiguration } from "../k8s/upstream";
4
+ export declare function generateWebhookRules(assets: Assets, isMutateWebhook: boolean): Promise<V1RuleWithOperations[]>;
5
+ export declare function webhookConfig(assets: Assets, mutateOrValidate: "mutate" | "validate", timeoutSeconds?: number): Promise<MutatingWebhookConfiguration | ValidatingWebhookConfiguration | null>;
6
+ //# sourceMappingURL=webhooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../src/lib/assets/webhooks.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAC3B,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAW/F,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,mCA4ClF;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,QAAQ,GAAG,UAAU,EACvC,cAAc,SAAK,GAClB,OAAO,CAAC,4BAA4B,GAAG,8BAA8B,GAAG,IAAI,CAAC,CAkE/E"}
@@ -0,0 +1,4 @@
1
+ import { Assets } from ".";
2
+ export declare function zarfYaml({ name, image, config }: Assets, path: string): string;
3
+ export declare function allYaml(assets: Assets): Promise<string>;
4
+ //# sourceMappingURL=yaml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../../src/lib/assets/yaml.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAM3B,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UA0BrE;AAED,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,mBAiC3C"}
@@ -1,19 +1,14 @@
1
1
  import { GroupVersionKind } from "./k8s/types";
2
- import { Binding, CapabilityCfg, GenericClass, HookPhase, WhenSelector } from "./types";
2
+ import { Binding, CapabilityCfg, CapabilityExport, GenericClass, WhenSelector } from "./types";
3
3
  /**
4
4
  * A capability is a unit of functionality that can be registered with the Pepr runtime.
5
5
  */
6
- export declare class Capability implements CapabilityCfg {
7
- private _name;
8
- private _description;
9
- private _namespaces?;
10
- private _mutateOrValidate;
11
- private _bindings;
6
+ export declare class Capability implements CapabilityExport {
7
+ #private;
12
8
  get bindings(): Binding[];
13
9
  get name(): string;
14
10
  get description(): string;
15
11
  get namespaces(): string[];
16
- get mutateOrValidate(): HookPhase;
17
12
  constructor(cfg: CapabilityCfg);
18
13
  /**
19
14
  * The When method is used to register a capability action to be executed when a Kubernetes resource is
@@ -24,6 +19,6 @@ export declare class Capability implements CapabilityCfg {
24
19
  * @param kind if using a custom KubernetesObject not available in `a.*`, specify the GroupVersionKind
25
20
  * @returns
26
21
  */
27
- When: <T extends GenericClass>(model: T, kind?: GroupVersionKind) => WhenSelector<T>;
22
+ When<T extends GenericClass>(model: T, kind?: GroupVersionKind): WhenSelector<T>;
28
23
  }
29
24
  //# sourceMappingURL=capability.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/lib/capability.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAEL,OAAO,EAIP,aAAa,EAGb,YAAY,EACZ,SAAS,EACT,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,qBAAa,UAAW,YAAW,aAAa;IAC9C,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAuB;IAG3C,OAAO,CAAC,iBAAiB,CAAoB;IAE7C,OAAO,CAAC,SAAS,CAAiB;IAElC,IAAI,QAAQ,IAAI,OAAO,EAAE,CAExB;IAED,IAAI,IAAI,WAEP;IAED,IAAI,WAAW,WAEd;IAED,IAAI,UAAU,aAEb;IAED,IAAI,gBAAgB,cAEnB;gBAEW,GAAG,EAAE,aAAa;IAQ9B;;;;;;;;OAQG;IACH,IAAI,4CAA6C,gBAAgB,qBAwF/D;CACH"}
1
+ {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/lib/capability.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EACL,OAAO,EAGP,aAAa,EACb,gBAAgB,EAEhB,YAAY,EAIZ,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,qBAAa,UAAW,YAAW,gBAAgB;;IAMjD,IAAI,QAAQ,cAEX;IAED,IAAI,IAAI,WAEP;IAED,IAAI,WAAW,WAEd;IAED,IAAI,UAAU,aAEb;gBAEW,GAAG,EAAE,aAAa;IAY9B;;;;;;;;OAQG;IACH,IAAI,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC;CAuGjF"}
@@ -1,21 +1,10 @@
1
1
  import { Capability } from "./capability";
2
- import { Request, Response } from "./k8s/types";
2
+ import { MutateResponse, Request } from "./k8s/types";
3
3
  import { ModuleConfig } from "./types";
4
4
  export declare class Controller {
5
- private readonly config;
6
- private readonly capabilities;
7
- private readonly beforeHook?;
8
- private readonly afterHook?;
9
- private readonly app;
10
- private running;
11
- private metricsCollector;
12
- private token;
13
- constructor(config: ModuleConfig, capabilities: Capability[], beforeHook?: ((req: Request) => void) | undefined, afterHook?: ((res: Response) => void) | undefined);
5
+ #private;
6
+ constructor(config: ModuleConfig, capabilities: Capability[], beforeHook?: (req: Request) => void, afterHook?: (res: MutateResponse) => void);
14
7
  /** Start the webhook server */
15
- startServer: (port: number) => void;
16
- private logger;
17
- private healthz;
18
- private metrics;
19
- private mutate;
8
+ startServer(port: number): void;
20
9
  }
21
10
  //# sourceMappingURL=controller.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/lib/controller.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,qBAAa,UAAU;IASnB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IAX7B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IACjC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,gBAAgB,CAAgC;IAGxD,OAAO,CAAC,KAAK,CAAM;gBAGA,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,UAAU,EAAE,EAC1B,UAAU,CAAC,SAAQ,OAAO,KAAK,IAAI,aAAA,EACnC,SAAS,CAAC,SAAQ,QAAQ,KAAK,IAAI,aAAA;IA0BtD,+BAA+B;IACxB,WAAW,SAAU,MAAM,UAkDhC;IAEF,OAAO,CAAC,MAAM,CAYZ;IAEF,OAAO,CAAC,OAAO,CAOb;IAEF,OAAO,CAAC,OAAO,CAOb;IAEF,OAAO,CAAC,MAAM,CA+CZ;CACH"}
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/lib/controller.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,OAAO,EAAoB,MAAM,aAAa,CAAC;AAIxE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,qBAAa,UAAU;;gBAoBnB,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,UAAU,EAAE,EAC1B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,EACnC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI;IA4B3C,+BAA+B;IAC/B,WAAW,CAAC,IAAI,EAAE,MAAM;CAyNzB"}
@@ -0,0 +1,12 @@
1
+ export declare const Errors: {
2
+ audit: string;
3
+ ignore: string;
4
+ reject: string;
5
+ };
6
+ export declare const ErrorList: string[];
7
+ /**
8
+ * Validate the error or throw an error
9
+ * @param error
10
+ */
11
+ export declare function ValidateError(error?: string): void;
12
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;CAIlB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAwB,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,SAAK,QAIvC"}
@@ -3,7 +3,7 @@ import { Binding } from "./types";
3
3
  /**
4
4
  * shouldSkipRequest determines if a request should be skipped based on the binding filters.
5
5
  *
6
- * @param binding the capability action binding
6
+ * @param binding the action binding
7
7
  * @param req the incoming request
8
8
  * @returns
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/lib/filter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,OAAO,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAS,MAAM,SAAS,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,WA6E/D"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/lib/filter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,OAAO,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAS,MAAM,SAAS,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,WA2E/D"}
@@ -1,6 +1,7 @@
1
1
  import * as kind from "./upstream";
2
- /** a is a collection of K8s types to be used within a CapabilityAction: `When(a.Configmap)` */
2
+ /** a is a collection of K8s types to be used within a action: `When(a.Configmap)` */
3
3
  export { kind as a };
4
4
  export { modelToGroupVersionKind, gvkMap, RegisterKind } from "./kinds";
5
+ export declare const isWatchMode: boolean;
5
6
  export * from "./types";
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/k8s/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,+FAA+F;AAC/F,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;AAErB,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAExE,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/k8s/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,qFAAqF;AACrF,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;AAErB,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGxE,eAAO,MAAM,WAAW,SAAyC,CAAC;AAElE,cAAc,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../../src/lib/k8s/kinds.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA8cnD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAErE;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,oBAAoB,gBAAgB,SAUnF,CAAC"}
1
+ {"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../../src/lib/k8s/kinds.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAsfnD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAErE;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,oBAAoB,gBAAgB,SAUnF,CAAC"}
@@ -1,21 +1,11 @@
1
- import { V1ListMeta, V1ObjectMeta } from "@kubernetes/client-node";
1
+ import { KubernetesListObject, KubernetesObject, V1ObjectMeta } from "@kubernetes/client-node";
2
+ export { KubernetesListObject, KubernetesObject };
2
3
  export declare enum Operation {
3
4
  CREATE = "CREATE",
4
5
  UPDATE = "UPDATE",
5
6
  DELETE = "DELETE",
6
7
  CONNECT = "CONNECT"
7
8
  }
8
- export interface KubernetesObject {
9
- apiVersion?: string;
10
- kind?: string;
11
- metadata?: V1ObjectMeta;
12
- }
13
- export interface KubernetesListObject<T extends KubernetesObject> {
14
- apiVersion?: string;
15
- kind?: string;
16
- metadata?: V1ListMeta;
17
- items: T[];
18
- }
19
9
  /**
20
10
  * GenericKind is a generic Kubernetes object that can be used to represent any Kubernetes object
21
11
  * that is not explicitly supported by Pepr. This can be used on its own or as a base class for
@@ -109,7 +99,7 @@ export interface Request<T = KubernetesObject> {
109
99
  */
110
100
  readonly options?: any;
111
101
  }
112
- export interface Response {
102
+ export interface MutateResponse {
113
103
  /** UID is an identifier for the individual request/response. This must be copied over from the corresponding AdmissionRequest. */
114
104
  uid: string;
115
105
  /** Allowed indicates whether or not the admission request was permitted. */
@@ -120,13 +110,27 @@ export interface Response {
120
110
  patch?: string;
121
111
  /** The type of Patch. Currently we only allow "JSONPatch". */
122
112
  patchType?: "JSONPatch";
123
- /** AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). */
113
+ /**
114
+ * AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
115
+ *
116
+ * See https://kubernetes.io/docs/reference/labels-annotations-taints/audit-annotations/ for more information
117
+ */
124
118
  auditAnnotations?: {
125
119
  [key: string]: string;
126
120
  };
127
121
  /** warnings is a list of warning messages to return to the requesting API client. */
128
122
  warnings?: string[];
129
123
  }
124
+ export interface ValidateResponse extends MutateResponse {
125
+ /** Status contains extra details into why an admission request was denied. This field IS NOT consulted in any way if "Allowed" is "true". */
126
+ status?: {
127
+ /** A machine-readable description of why this operation is in the
128
+ "Failure" status. If this value is empty there is no information available. */
129
+ code: number;
130
+ /** A human-readable description of the status of this operation. */
131
+ message: string;
132
+ };
133
+ }
130
134
  export type WebhookIgnore = {
131
135
  /**
132
136
  * List of Kubernetes namespaces to always ignore.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/k8s/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AACD,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,gBAAgB;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,KAAK,EAAE,CAAC,EAAE,CAAC;CACZ;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;IAGI;AACJ,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,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E,CAAC;IACtB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CACnC,CAAC"}
@@ -1,4 +1,4 @@
1
- /** a is a collection of K8s types to be used within a CapabilityAction: `When(a.Configmap)` */
2
- export { V1APIService as APIService, V1CertificateSigningRequest as CertificateSigningRequest, V1ConfigMap as ConfigMap, V1ControllerRevision as ControllerRevision, V1CronJob as CronJob, V1CSIDriver as CSIDriver, V1CSIStorageCapacity as CSIStorageCapacity, V1CustomResourceDefinition as CustomResourceDefinition, V1DaemonSet as DaemonSet, V1Deployment as Deployment, V1EndpointSlice as EndpointSlice, V1HorizontalPodAutoscaler as HorizontalPodAutoscaler, V1Ingress as Ingress, V1IngressClass as IngressClass, V1Job as Job, V1LimitRange as LimitRange, V1LocalSubjectAccessReview as LocalSubjectAccessReview, V1MutatingWebhookConfiguration as MutatingWebhookConfiguration, V1Namespace as Namespace, V1NetworkPolicy as NetworkPolicy, V1Node as Node, V1PersistentVolume as PersistentVolume, V1PersistentVolumeClaim as PersistentVolumeClaim, V1Pod as Pod, V1PodDisruptionBudget as PodDisruptionBudget, V1PodTemplate as PodTemplate, V1ReplicaSet as ReplicaSet, V1ReplicationController as ReplicationController, V1ResourceQuota as ResourceQuota, V1RuntimeClass as RuntimeClass, V1Secret as Secret, V1SelfSubjectAccessReview as SelfSubjectAccessReview, V1SelfSubjectRulesReview as SelfSubjectRulesReview, V1Service as Service, V1ServiceAccount as ServiceAccount, V1StatefulSet as StatefulSet, V1StorageClass as StorageClass, V1SubjectAccessReview as SubjectAccessReview, V1TokenReview as TokenReview, V1ValidatingWebhookConfiguration as ValidatingWebhookConfiguration, V1VolumeAttachment as VolumeAttachment, } from "@kubernetes/client-node";
1
+ /** a is a collection of K8s types to be used within an action: `When(a.Configmap)` */
2
+ export { V1APIService as APIService, V1CertificateSigningRequest as CertificateSigningRequest, V1ClusterRole as ClusterRole, V1ClusterRoleBinding as ClusterRoleBinding, V1ConfigMap as ConfigMap, V1ControllerRevision as ControllerRevision, V1CronJob as CronJob, V1CSIDriver as CSIDriver, V1CSIStorageCapacity as CSIStorageCapacity, V1CustomResourceDefinition as CustomResourceDefinition, V1DaemonSet as DaemonSet, V1Deployment as Deployment, V1EndpointSlice as EndpointSlice, V1HorizontalPodAutoscaler as HorizontalPodAutoscaler, V1Ingress as Ingress, V1IngressClass as IngressClass, V1Job as Job, V1LimitRange as LimitRange, V1LocalSubjectAccessReview as LocalSubjectAccessReview, V1MutatingWebhookConfiguration as MutatingWebhookConfiguration, V1Namespace as Namespace, V1NetworkPolicy as NetworkPolicy, V1Node as Node, V1PersistentVolume as PersistentVolume, V1PersistentVolumeClaim as PersistentVolumeClaim, V1Pod as Pod, V1PodDisruptionBudget as PodDisruptionBudget, V1PodTemplate as PodTemplate, V1ReplicaSet as ReplicaSet, V1ReplicationController as ReplicationController, V1ResourceQuota as ResourceQuota, V1Role as Role, V1RoleBinding as RoleBinding, V1RuntimeClass as RuntimeClass, V1Secret as Secret, V1SelfSubjectAccessReview as SelfSubjectAccessReview, V1SelfSubjectRulesReview as SelfSubjectRulesReview, V1Service as Service, V1ServiceAccount as ServiceAccount, V1StatefulSet as StatefulSet, V1StorageClass as StorageClass, V1SubjectAccessReview as SubjectAccessReview, V1TokenReview as TokenReview, V1ValidatingWebhookConfiguration as ValidatingWebhookConfiguration, V1VolumeAttachment as VolumeAttachment, } from "@kubernetes/client-node";
3
3
  export { GenericKind } from "./types";
4
4
  //# sourceMappingURL=upstream.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upstream.d.ts","sourceRoot":"","sources":["../../../src/lib/k8s/upstream.ts"],"names":[],"mappings":"AAGA,+FAA+F;AAC/F,OAAO,EACL,YAAY,IAAI,UAAU,EAC1B,2BAA2B,IAAI,yBAAyB,EACxD,WAAW,IAAI,SAAS,EACxB,oBAAoB,IAAI,kBAAkB,EAC1C,SAAS,IAAI,OAAO,EACpB,WAAW,IAAI,SAAS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
- info = 1,
7
- warn = 2,
8
- error = 3
9
- }
10
- /**
11
- * Simple logger class that logs messages at different log levels.
12
- */
13
- export declare class Logger {
14
- private _logLevel;
15
- /**
16
- * Create a new logger instance.
17
- * @param logLevel - The minimum log level to log messages for.
18
- */
19
- constructor(logLevel: LogLevel);
20
- /**
21
- * Change the log level of the logger.
22
- * @param logLevel - The log level to log the message at.
23
- */
24
- SetLogLevel(logLevel: string): void;
25
- /**
26
- * Log a debug message.
27
- * @param message - The message to log.
28
- */
29
- debug<T>(message: T, prefix?: string): void;
30
- /**
31
- * Log an info message.
32
- * @param message - The message to log.
33
- */
34
- info<T>(message: T, prefix?: string): void;
35
- /**
36
- * Log a warning message.
37
- * @param message - The message to log.
38
- */
39
- warn<T>(message: T, prefix?: string): void;
40
- /**
41
- * Log an error message.
42
- * @param message - The message to log.
43
- */
44
- error<T>(message: T, prefix?: string): void;
45
- /**
46
- * Log a message at the specified log level.
47
- * @param logLevel - The log level of the message.
48
- * @param message - The message to log.
49
- */
50
- private log;
51
- private colorize;
52
- }
53
- /** Log is an instance of Logger used to generate log entries. */
54
- declare const Log: Logger;
1
+ declare const Log: import("pino").Logger<{
2
+ transport: {
3
+ target: string;
4
+ options: {
5
+ colorize: boolean;
6
+ };
7
+ } | undefined;
8
+ }>;
55
9
  export default Log;
56
10
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;CACV;AA8BD;;GAEG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,SAAS,CAAW;IAE5B;;;OAGG;gBACS,QAAQ,EAAE,QAAQ;IAI9B;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAK1C;;;OAGG;IACI,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAIlD;;;OAGG;IACI,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAIjD;;;OAGG;IACI,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAIjD;;;OAGG;IACI,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAIlD;;;;OAIG;IACH,OAAO,CAAC,GAAG;IAwBX,OAAO,CAAC,QAAQ;CAGjB;AAED,iEAAiE;AACjE,QAAA,MAAM,GAAG,QAA4B,CAAC;AAItC,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAgBA,QAAA,MAAM,GAAG;;;;;;;EAEP,CAAC;AAMH,eAAe,GAAG,CAAC"}
@@ -2,15 +2,15 @@
2
2
  * MetricsCollector class handles metrics collection using prom-client and performance hooks.
3
3
  */
4
4
  export declare class MetricsCollector {
5
- private _registry;
6
- private _errors;
7
- private _alerts;
8
- private _summary;
5
+ #private;
9
6
  /**
10
7
  * Creates a MetricsCollector instance with prefixed metrics.
11
- * @param {string} [prefix='pepr'] - The prefix for the metric names.
8
+ * @param [prefix='pepr'] - The prefix for the metric names.
12
9
  */
13
10
  constructor(prefix?: string);
11
+ addCounter(name: string, help: string): void;
12
+ addSummary(name: string, help: string): void;
13
+ incCounter(name: string): void;
14
14
  /**
15
15
  * Increments the error counter.
16
16
  */
@@ -21,17 +21,18 @@ export declare class MetricsCollector {
21
21
  alert(): void;
22
22
  /**
23
23
  * Returns the current timestamp from performance.now() method. Useful for start timing an operation.
24
- * @returns {number} The timestamp.
24
+ * @returns The timestamp.
25
25
  */
26
26
  observeStart(): number;
27
27
  /**
28
28
  * Observes the duration since the provided start time and updates the summary.
29
- * @param {number} startTime - The start time.
29
+ * @param startTime - The start time.
30
+ * @param name - The metrics summary to increment.
30
31
  */
31
- observeEnd(startTime: number): void;
32
+ observeEnd(startTime: number, name?: string): void;
32
33
  /**
33
34
  * Fetches the current metrics from the registry.
34
- * @returns {Promise<string>} The metrics.
35
+ * @returns The metrics.
35
36
  */
36
37
  getMetrics(): Promise<string>;
37
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/lib/metrics.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,QAAQ,CAA6B;IAE7C;;;OAGG;gBACS,MAAM,SAAS;IAsB3B;;OAEG;IACH,KAAK;IAIL;;OAEG;IACH,KAAK;IAIL;;;OAGG;IACH,YAAY;IAIZ;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM;IAI5B;;;OAGG;IACG,UAAU;CAGjB"}
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/lib/metrics.ts"],"names":[],"mappings":"AAwBA;;GAEG;AACH,qBAAa,gBAAgB;;IAa3B;;;OAGG;gBACS,MAAM,SAAS;IAyC3B,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAIrC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAIrC,UAAU,CAAC,IAAI,EAAE,MAAM;IAIvB;;OAEG;IACH,KAAK;IAIL;;OAEG;IACH,KAAK;IAIL;;;OAGG;IACH,YAAY;IAIZ;;;;OAIG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,GAAE,MAAiC;IAIrE;;;OAGG;IACG,UAAU;CAGjB"}
@@ -1,5 +1,5 @@
1
1
  import { Capability } from "./capability";
2
- import { Request, Response } from "./k8s/types";
2
+ import { MutateResponse, Request, ValidateResponse } from "./k8s/types";
3
3
  import { ModuleConfig } from "./types";
4
4
  export type PackageJSON = {
5
5
  description: string;
@@ -10,16 +10,16 @@ export type PeprModuleOptions = {
10
10
  /** A user-defined callback to pre-process or intercept a Pepr request from K8s immediately before it is processed */
11
11
  beforeHook?: (req: Request) => void;
12
12
  /** A user-defined callback to post-process or intercept a Pepr response just before it is returned to K8s */
13
- afterHook?: (res: Response) => void;
13
+ afterHook?: (res: MutateResponse | ValidateResponse) => void;
14
14
  };
15
15
  export declare class PeprModule {
16
- private _controller;
16
+ #private;
17
17
  /**
18
18
  * Create a new Pepr runtime
19
19
  *
20
20
  * @param config The configuration for the Pepr runtime
21
21
  * @param capabilities The capabilities to be loaded into the Pepr runtime
22
- * @param _deferStart (optional) If set to `true`, the Pepr runtime will not be started automatically. This can be used to start the Pepr runtime manually with `start()`.
22
+ * @param opts Options for the Pepr runtime
23
23
  */
24
24
  constructor({ description, pepr }: PackageJSON, capabilities?: Capability[], opts?: PeprModuleOptions);
25
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,qHAAqH;IACrH,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAEpC,6GAA6G;I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