pepr 0.52.2 → 0.52.3-nightly.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/dist/cli/{build.helpers.d.ts → build/build.helpers.d.ts} +4 -4
- package/dist/cli/build/build.helpers.d.ts.map +1 -0
- package/dist/cli/build/buildModule.d.ts +12 -0
- package/dist/cli/build/buildModule.d.ts.map +1 -0
- package/dist/cli/build/index.d.ts +3 -0
- package/dist/cli/build/index.d.ts.map +1 -0
- package/dist/cli/build/loadModule.d.ts +11 -0
- package/dist/cli/build/loadModule.d.ts.map +1 -0
- package/dist/cli/crd/generate/generators.d.ts +1 -28
- package/dist/cli/crd/generate/generators.d.ts.map +1 -1
- package/dist/cli/deploy.d.ts +2 -2
- package/dist/cli/deploy.d.ts.map +1 -1
- package/dist/cli/dev.d.ts.map +1 -1
- package/dist/cli/init/templates.d.ts +0 -1
- package/dist/cli/init/templates.d.ts.map +1 -1
- package/dist/cli/monitor.d.ts +3 -0
- package/dist/cli/monitor.d.ts.map +1 -1
- package/dist/cli/types.d.ts +14 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/uuid.d.ts.map +1 -1
- package/dist/cli.js +999 -984
- package/dist/controller.js +24 -11
- package/dist/lib/assets/assets.d.ts.map +1 -1
- package/dist/lib/assets/environment.d.ts +1 -0
- package/dist/lib/assets/environment.d.ts.map +1 -1
- package/dist/lib/assets/loader.d.ts.map +1 -1
- package/dist/lib/assets/webhooks.d.ts.map +1 -1
- package/dist/lib/assets/yaml/generateAllYaml.d.ts +1 -2
- package/dist/lib/assets/yaml/generateAllYaml.d.ts.map +1 -1
- package/dist/lib/core/storage.d.ts +2 -1
- package/dist/lib/core/storage.d.ts.map +1 -1
- package/dist/lib/filter/adjudicators/binding.d.ts +2 -1
- package/dist/lib/filter/adjudicators/binding.d.ts.map +1 -1
- package/dist/lib/filter/adjudicators/kubernetesObject.d.ts +0 -1
- package/dist/lib/filter/adjudicators/kubernetesObject.d.ts.map +1 -1
- package/dist/lib/processors/mutate-processor.d.ts +2 -1
- package/dist/lib/processors/mutate-processor.d.ts.map +1 -1
- package/dist/lib/types.d.ts +0 -4
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib.js +7 -7
- package/dist/lib.js.map +2 -2
- package/dist/runtime/controller.d.ts +1 -1
- package/dist/runtime/controller.d.ts.map +1 -1
- package/package.json +10 -11
- package/src/cli/{build.helpers.ts → build/build.helpers.ts} +12 -12
- package/src/cli/build/buildModule.ts +160 -0
- package/src/cli/build/index.ts +150 -0
- package/src/cli/build/loadModule.ts +54 -0
- package/src/cli/crd/generate/generators.ts +6 -6
- package/src/cli/deploy.ts +5 -4
- package/src/cli/dev.ts +4 -3
- package/src/cli/monitor.ts +2 -2
- package/src/cli/types.ts +26 -0
- package/src/cli/uuid.ts +5 -6
- package/src/lib/assets/assets.ts +5 -1
- package/src/lib/assets/deploy.ts +1 -1
- package/src/lib/assets/environment.ts +8 -1
- package/src/lib/assets/loader.ts +0 -6
- package/src/lib/assets/webhooks.ts +5 -8
- package/src/lib/assets/yaml/generateAllYaml.ts +1 -1
- package/src/lib/controller/index.ts +3 -3
- package/src/lib/controller/store.ts +1 -1
- package/src/lib/core/capability.ts +3 -3
- package/src/lib/core/storage.ts +1 -1
- package/src/lib/filter/adjudicators/binding.ts +2 -1
- package/src/lib/filter/adjudicators/kubernetesObject.ts +1 -1
- package/src/lib/processors/mutate-processor.ts +1 -1
- package/src/lib/types.ts +0 -4
- package/src/runtime/controller.ts +8 -14
- package/dist/cli/build.d.ts +0 -34
- package/dist/cli/build.d.ts.map +0 -1
- package/dist/cli/build.helpers.d.ts.map +0 -1
- package/src/cli/build.ts +0 -375
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CapabilityExport } from "
|
|
2
|
-
import { BuildOptions,
|
|
3
|
-
import { Assets } from "
|
|
1
|
+
import { CapabilityExport } from "../../lib/types";
|
|
2
|
+
import { BuildOptions, BuildContext } from "esbuild";
|
|
3
|
+
import { Assets } from "../../lib/assets/assets";
|
|
4
|
+
import { Reloader } from "../types";
|
|
4
5
|
interface ImageOptions {
|
|
5
6
|
customImage?: string;
|
|
6
7
|
registryInfo?: string;
|
|
@@ -13,7 +14,6 @@ interface ImageOptions {
|
|
|
13
14
|
* @returns image string
|
|
14
15
|
*/
|
|
15
16
|
export declare function assignImage(imageOptions: ImageOptions): string;
|
|
16
|
-
export type Reloader = (opts: BuildResult<BuildOptions>) => void | Promise<void>;
|
|
17
17
|
/**
|
|
18
18
|
* Determine the RBAC mode based on the CLI options and the module's config
|
|
19
19
|
* @param opts CLI options
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.helpers.d.ts","sourceRoot":"","sources":["../../../src/cli/build/build.helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAW,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAajD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,UAAU,YAAY;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAe9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3B,GAAG,EAAE;IAAE,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACnC,MAAM,CAaR;AAED;;;;GAIG;AAEH,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS9E;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAI/F;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAStE;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,MAAM,EAAE,EACvB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAQjF;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAC7B,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAarC;AAED,wBAAsB,0BAA0B,CAAC,GAAG,EAAE;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,IAAI,CAAC,CAiChB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BuildOptions } from "esbuild";
|
|
2
|
+
import { PeprConfig, Reloader } from "../types";
|
|
3
|
+
import { BuildContext } from "esbuild";
|
|
4
|
+
type BuildModuleReturn = {
|
|
5
|
+
ctx: BuildContext<BuildOptions>;
|
|
6
|
+
path: string;
|
|
7
|
+
cfg: PeprConfig;
|
|
8
|
+
uuid: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function buildModule(outputDir: string, reloader?: Reloader, entryPoint?: string, embed?: boolean): Promise<BuildModuleReturn | void>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=buildModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildModule.d.ts","sourceRoot":"","sources":["../../../src/cli/build/buildModule.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAmB,MAAM,SAAS,CAAC;AAKxD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,KAAK,iBAAiB,GAAG;IACvB,GAAG,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAUF,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,QAAQ,EACnB,UAAU,SAAY,EACtB,KAAK,UAAO,GACX,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAwEnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/build/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,OAAO,GAAG,IAAI,CAmI/C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PeprConfig } from "../types";
|
|
2
|
+
export type LoadModuleReturn = {
|
|
3
|
+
cfg: PeprConfig;
|
|
4
|
+
entryPointPath: string;
|
|
5
|
+
modulePath: string;
|
|
6
|
+
name: string;
|
|
7
|
+
path: string;
|
|
8
|
+
uuid: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function loadModule(outputDir: string, entryPoint: string): Promise<LoadModuleReturn>;
|
|
11
|
+
//# sourceMappingURL=loadModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadModule.d.ts","sourceRoot":"","sources":["../../../src/cli/build/loadModule.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,UAAU,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAuCjG"}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { Project,
|
|
2
|
-
import { kind as k } from "kubernetes-fluent-client";
|
|
1
|
+
import { Project, SourceFile } from "ts-morph";
|
|
3
2
|
import { V1JSONSchemaProps } from "@kubernetes/client-node";
|
|
4
|
-
export declare function extractCRDDetails(content: string, sourceFile: SourceFile): {
|
|
5
|
-
kind: string | undefined;
|
|
6
|
-
fqdn: string;
|
|
7
|
-
scope: "Cluster" | "Namespaced";
|
|
8
|
-
plural: string;
|
|
9
|
-
shortNames?: string[];
|
|
10
|
-
};
|
|
11
3
|
export declare function generateCRDs(options: {
|
|
12
4
|
output: string;
|
|
13
5
|
}): Promise<void>;
|
|
@@ -20,28 +12,9 @@ export declare function extractDetails(sourceFile: SourceFile): {
|
|
|
20
12
|
scope: "Cluster" | "Namespaced";
|
|
21
13
|
shortName: string;
|
|
22
14
|
};
|
|
23
|
-
export declare function getJsDocDescription(node: Node): string;
|
|
24
|
-
export declare function getSchemaFromType(decl: InterfaceDeclaration | TypeAliasDeclaration): {
|
|
25
|
-
properties: Record<string, V1JSONSchemaProps>;
|
|
26
|
-
required: string[];
|
|
27
|
-
};
|
|
28
|
-
export declare function mapTypeToSchema(type: Type): V1JSONSchemaProps;
|
|
29
|
-
export declare function buildObjectSchema(type: Type): V1JSONSchemaProps;
|
|
30
15
|
export declare function uncapitalize(str: string): string;
|
|
31
16
|
export declare function emptySchema(): {
|
|
32
17
|
properties: Record<string, V1JSONSchemaProps>;
|
|
33
18
|
required: string[];
|
|
34
19
|
};
|
|
35
|
-
interface CRDConfig {
|
|
36
|
-
kind: string;
|
|
37
|
-
fqdn: string;
|
|
38
|
-
version: string;
|
|
39
|
-
plural: string;
|
|
40
|
-
scope: "Cluster" | "Namespaced";
|
|
41
|
-
shortNames?: string[];
|
|
42
|
-
specSchema: ReturnType<typeof getSchemaFromType>;
|
|
43
|
-
conditionSchema: ReturnType<typeof getSchemaFromType>;
|
|
44
|
-
}
|
|
45
|
-
export declare function buildCRD(config: CRDConfig): k.CustomResourceDefinition;
|
|
46
|
-
export {};
|
|
47
20
|
//# sourceMappingURL=generators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../../src/cli/crd/generate/generators.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../../src/cli/crd/generate/generators.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,OAAO,EAKP,UAAU,EAEX,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AA0B5D,wBAAsB,YAAY,CAAC,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAe7E;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAExD;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,UAAU,EAAE,CAInF;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,IAAI,CAiCN;AAGD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI3F;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,GAAG;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,GAAG,YAAY,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;CACnB,CA2BA;AAoFD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,WAAW,IAAI;IAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC9C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAEA"}
|
package/dist/cli/deploy.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CapabilityExport } from "../lib/types";
|
|
2
2
|
import { Assets } from "../lib/assets/assets";
|
|
3
3
|
import { Command } from "commander";
|
|
4
|
-
|
|
4
|
+
interface ImagePullSecretDetails {
|
|
5
5
|
pullSecret?: string;
|
|
6
6
|
dockerServer?: string;
|
|
7
7
|
dockerUsername?: string;
|
|
@@ -12,10 +12,10 @@ export declare function validateImagePullSecretDetails(details: ImagePullSecretD
|
|
|
12
12
|
valid: boolean;
|
|
13
13
|
error?: string;
|
|
14
14
|
};
|
|
15
|
-
export type ValidatedImagePullSecretDetails = Required<ImagePullSecretDetails>;
|
|
16
15
|
export declare function getUserConfirmation(opts: {
|
|
17
16
|
yes: boolean;
|
|
18
17
|
}): Promise<boolean>;
|
|
19
18
|
export default function (program: Command): void;
|
|
20
19
|
export declare function validateNamespaces(capability: CapabilityExport, webhook: Assets): void;
|
|
20
|
+
export {};
|
|
21
21
|
//# sourceMappingURL=deploy.d.ts.map
|
package/dist/cli/deploy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/cli/deploy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/cli/deploy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,sBAAsB,GAAG;IAC/E,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAmCA;AAoBD,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAalF;AAkCD,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,OAAO,GAAG,IAAI,CA8B/C;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQtF"}
|
package/dist/cli/dev.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/cli/dev.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/cli/dev.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,OAAO,GAAG,IAAI,CA6G/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/cli/init/templates.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,YAAY,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrE,eAAO,MAAQ,YAAY
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/cli/init/templates.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,YAAY,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrE,eAAO,MAAQ,YAAY;;;;;;;;;;;;;;GAAE,eAAe;;;;;;;;;;;;;;;;;;;;GAAE,gBAAgB;;;;;;;;;;;GAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAE,OAAO,QAAgB,CAAC;AAEjG,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;QAC1B,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,EAAE,OAAO,CAAC;YACjB,cAAc,EAAE,MAAM,CAAC;YACvB,YAAY,EAAE,YAAY,CAAC;YAC3B,YAAY,EAAE;gBAAE,UAAU,EAAE,MAAM,EAAE,CAAA;aAAE,CAAC;YACvC,SAAS,EAAE;gBAAE,YAAY,EAAE;oBAAE,UAAU,EAAE,MAAM,EAAE,CAAA;iBAAE,CAAA;aAAE,CAAC;YACtD,KAAK,EAAE;gBAAE,YAAY,EAAE;oBAAE,UAAU,EAAE,MAAM,EAAE,CAAA;iBAAE,CAAA;aAAE,CAAC;YAClD,aAAa,EAAE,MAAM,EAAE,CAAC;YACxB,GAAG,EAAE,MAAM,CAAC;YACZ,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;YACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;SACrB,CAAC;QACF,OAAO,EAAE;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC;QACjC,YAAY,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;QAC/C,eAAe,EAAE;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC;KACzC,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,CA6D7D;AAED,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAEF,eAAO,MAAM,MAAM;;;CAGlB,CAAC;AAEF,eAAO,MAAM,SAAS;;;CAGrB,CAAC;AAEF,eAAO,MAAM,SAAS;;;CAGrB,CAAC;AAEF,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;CAGnB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;CAGxB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;CAGpB,CAAC;AAEF,eAAO,MAAM,MAAM;;;CAgBlB,CAAC"}
|
package/dist/cli/monitor.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Log as K8sLog } from "@kubernetes/client-node";
|
|
2
|
+
import stream from "stream";
|
|
2
3
|
import { Command } from "commander";
|
|
3
4
|
interface LogPayload {
|
|
4
5
|
namespace: string;
|
|
@@ -20,6 +21,8 @@ export declare function getLabelsAndErrorMessage(uuid?: string): {
|
|
|
20
21
|
errorMessage: string;
|
|
21
22
|
};
|
|
22
23
|
export declare function getK8sLogFromKubeConfig(): K8sLog;
|
|
24
|
+
export declare function createLogStream(): stream.PassThrough;
|
|
25
|
+
export declare function processLogLine(line: string): void;
|
|
23
26
|
export declare function processMutateLog(payload: LogPayload, name: string, uid: string): void;
|
|
24
27
|
export declare function processValidateLog(payload: LogPayload, name: string, uid: string): void;
|
|
25
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../../src/cli/monitor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,IAAI,MAAM,EAAoC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../../src/cli/monitor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,IAAI,MAAM,EAAoC,MAAM,yBAAyB,CAAC;AAE1F,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,UAAU,UAAU;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE;YACP,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;CACH;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,OAAO,GAAG,IAAI,CAiC/C;AAED,wBAAgB,wBAAwB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG;IACvD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAaA;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAIhD;AAED,wBAAgB,eAAe,IAAI,MAAM,CAAC,WAAW,CAcpD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAejD;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAYrF;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAWvF"}
|
package/dist/cli/types.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import { BuildResult, BuildOptions } from "esbuild";
|
|
1
2
|
import { Answers } from "prompts";
|
|
3
|
+
import { ModuleConfig } from "../lib/types";
|
|
2
4
|
export type InitOptions = Answers<"name" | "description" | "errorBehavior" | "uuid">;
|
|
5
|
+
export type Reloader = (opts: BuildResult<BuildOptions>) => void | Promise<void>;
|
|
6
|
+
export type PeprConfig = Omit<ModuleConfig, keyof PeprNestedFields> & {
|
|
7
|
+
pepr: PeprNestedFields & {
|
|
8
|
+
includedFiles: string[];
|
|
9
|
+
};
|
|
10
|
+
description: string;
|
|
11
|
+
version: string;
|
|
12
|
+
};
|
|
13
|
+
type PeprNestedFields = Pick<ModuleConfig, "uuid" | "onError" | "webhookTimeout" | "customLabels" | "alwaysIgnore" | "env" | "rbac" | "rbacMode"> & {
|
|
14
|
+
peprVersion: string;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
3
17
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/cli/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cli/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cli/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,aAAa,GAAG,eAAe,GAAG,MAAM,CAAC,CAAC;AAErF,MAAM,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAEjF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,gBAAgB,CAAC,GAAG;IACpE,IAAI,EAAE,gBAAgB,GAAG;QACvB,aAAa,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,gBAAgB,GAAG,IAAI,CAC1B,YAAY,EACV,MAAM,GACN,SAAS,GACT,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,KAAK,GACL,MAAM,GACN,UAAU,CACb,GAAG;IACF,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
package/dist/cli/uuid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/cli/uuid.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAO,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/cli/uuid.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAO,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,OAAO,GAAG,IAAI,CAc/C;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAiBhD;AAED,wBAAgB,cAAc,CAC5B,WAAW,EAAE,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,GACjD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAaxB"}
|