pepr 0.42.0 → 0.42.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.
- package/dist/cli/build.d.ts +1 -0
- package/dist/cli/build.d.ts.map +1 -1
- package/dist/cli/build.helpers.d.ts +66 -0
- package/dist/cli/build.helpers.d.ts.map +1 -1
- package/dist/cli/monitor.d.ts +23 -0
- package/dist/cli/monitor.d.ts.map +1 -1
- package/dist/cli.js +341 -283
- package/dist/controller.js +1 -1
- package/dist/lib/assets/destroy.d.ts.map +1 -1
- package/dist/lib/assets/helm.d.ts +1 -1
- package/dist/lib/assets/helm.d.ts.map +1 -1
- package/dist/lib/assets/index.d.ts.map +1 -1
- package/dist/lib/assets/pods.d.ts +5 -19
- package/dist/lib/assets/pods.d.ts.map +1 -1
- package/dist/lib/assets/webhooks.d.ts.map +1 -1
- package/dist/lib/assets/yaml.d.ts.map +1 -1
- package/dist/lib/capability.d.ts.map +1 -1
- package/dist/lib/controller/index.d.ts.map +1 -1
- package/dist/lib/controller/store.d.ts +0 -1
- package/dist/lib/controller/store.d.ts.map +1 -1
- package/dist/lib/controller/storeCache.d.ts +1 -0
- package/dist/lib/controller/storeCache.d.ts.map +1 -1
- package/dist/lib/mutate-request.d.ts +2 -2
- package/dist/lib/mutate-request.d.ts.map +1 -1
- package/dist/lib/queue.d.ts.map +1 -1
- package/dist/lib/storage.d.ts +4 -4
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/validate-processor.d.ts +4 -1
- package/dist/lib/validate-processor.d.ts.map +1 -1
- package/dist/lib/watch-processor.d.ts.map +1 -1
- package/dist/lib.js +136 -109
- package/dist/lib.js.map +3 -3
- package/package.json +1 -1
- package/src/cli/build.helpers.ts +180 -0
- package/src/cli/build.ts +85 -133
- package/src/cli/monitor.ts +108 -65
- package/src/lib/assets/deploy.ts +6 -6
- package/src/lib/assets/destroy.ts +1 -1
- package/src/lib/assets/helm.ts +6 -6
- package/src/lib/assets/index.ts +22 -22
- package/src/lib/assets/pods.ts +10 -5
- package/src/lib/assets/webhooks.ts +1 -1
- package/src/lib/assets/yaml.ts +12 -9
- package/src/lib/capability.ts +21 -10
- package/src/lib/controller/index.ts +9 -7
- package/src/lib/controller/store.ts +23 -10
- package/src/lib/controller/storeCache.ts +10 -1
- package/src/lib/mutate-request.ts +11 -11
- package/src/lib/queue.ts +12 -4
- package/src/lib/storage.ts +33 -24
- package/src/lib/utils.ts +5 -5
- package/src/lib/validate-processor.ts +47 -39
- package/src/lib/watch-processor.ts +11 -7
- package/src/sdk/cosign.ts +4 -4
package/dist/cli/build.d.ts
CHANGED
package/dist/cli/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAmB,MAAM,SAAS,CAAC;AAKrE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAmBjC,MAAM,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAEjF,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,OAAO,GAAG,IAAI,CAqH/C;AAWD,wBAAsB,UAAU,CAAC,UAAU,SAAS;;;;;;;GAuCnD;AAED,wBAAsB,WAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,UAAU,SAAS,EAAE,KAAK,UAAO;;;;;eAwEvF;AA6CD,wBAAsB,WAAW,kBAShC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { CapabilityExport } from "../lib/types";
|
|
2
|
+
import { BuildOptions, BuildResult, BuildContext } from "esbuild";
|
|
3
|
+
import { Assets } from "../lib/assets";
|
|
4
|
+
export type Reloader = (opts: BuildResult<BuildOptions>) => void | Promise<void>;
|
|
1
5
|
/**
|
|
2
6
|
* Determine the RBAC mode based on the CLI options and the module's config
|
|
3
7
|
* @param opts CLI options
|
|
@@ -16,4 +20,66 @@ export declare function determineRbacMode(opts: {
|
|
|
16
20
|
rbacMode?: string;
|
|
17
21
|
};
|
|
18
22
|
}): string;
|
|
23
|
+
/**
|
|
24
|
+
* Handle the custom output directory
|
|
25
|
+
* @param outputDir the desired output directory
|
|
26
|
+
* @returns The desired output directory or the default one
|
|
27
|
+
*/
|
|
28
|
+
export declare function handleCustomOutputDir(outputDir: string): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Check if the image is from Iron Bank and return the correct image
|
|
31
|
+
* @param registry The registry of the image
|
|
32
|
+
* @param image The image to check
|
|
33
|
+
* @param peprVersion The version of the PEPR controller
|
|
34
|
+
* @returns The image string
|
|
35
|
+
* @example
|
|
36
|
+
*/
|
|
37
|
+
export declare function checkIronBankImage(registry: string, image: string, peprVersion: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Check if the image pull secret is a valid Kubernetes name
|
|
40
|
+
* @param imagePullSecret
|
|
41
|
+
* @returns boolean
|
|
42
|
+
*/
|
|
43
|
+
export declare function validImagePullSecret(imagePullSecretName: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* Constraint to majke sure customImage and registry are not both used
|
|
46
|
+
* @param customImage
|
|
47
|
+
* @param registry
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
export declare function handleCustomImage(customImage: string, registry: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Creates and pushes a custom image for WASM or any other included files
|
|
53
|
+
* @param includedFiles
|
|
54
|
+
* @param peprVersion
|
|
55
|
+
* @param description
|
|
56
|
+
* @param image
|
|
57
|
+
*/
|
|
58
|
+
export declare function handleCustomImageBuild(includedFiles: string[], peprVersion: string, description: string, image: string): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Disables embedding of deployment files into output module
|
|
61
|
+
* @param embed
|
|
62
|
+
* @param path
|
|
63
|
+
* @returns
|
|
64
|
+
*/
|
|
65
|
+
export declare function handleEmbedding(embed: boolean, path: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Check if the capability names are valid
|
|
68
|
+
* @param capabilities The capabilities to check
|
|
69
|
+
*/
|
|
70
|
+
export declare function handleValidCapabilityNames(capabilities: CapabilityExport[]): void;
|
|
71
|
+
/**
|
|
72
|
+
* Watch for changes in the module
|
|
73
|
+
* @param ctxCfg The build options
|
|
74
|
+
* @param reloader The reloader function
|
|
75
|
+
* @returns The build context
|
|
76
|
+
*/
|
|
77
|
+
export declare function watchForChanges(ctxCfg: BuildOptions, reloader: Reloader | undefined): Promise<BuildContext<BuildOptions>>;
|
|
78
|
+
export declare function generateYamlAndWriteToDisk(obj: {
|
|
79
|
+
uuid: string;
|
|
80
|
+
imagePullSecret: string;
|
|
81
|
+
outputDir: string;
|
|
82
|
+
assets: Assets;
|
|
83
|
+
zarf: string;
|
|
84
|
+
}): Promise<void>;
|
|
19
85
|
//# sourceMappingURL=build.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.helpers.d.ts","sourceRoot":"","sources":["../../src/cli/build.helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.helpers.d.ts","sourceRoot":"","sources":["../../src/cli/build.helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAW,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvC,MAAM,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IA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M,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,CAmBhB"}
|
package/dist/cli/monitor.d.ts
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
import { Log as K8sLog } from "@kubernetes/client-node";
|
|
1
2
|
import { RootCmd } from "./root";
|
|
3
|
+
interface LogPayload {
|
|
4
|
+
namespace: string;
|
|
5
|
+
name: string;
|
|
6
|
+
res: {
|
|
7
|
+
uid: string;
|
|
8
|
+
allowed?: boolean;
|
|
9
|
+
patch?: string;
|
|
10
|
+
patchType?: string;
|
|
11
|
+
warnings?: string;
|
|
12
|
+
status?: {
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
2
17
|
export default function (program: RootCmd): void;
|
|
18
|
+
export declare function getLabelsAndErrorMessage(uuid?: string): {
|
|
19
|
+
labels: string[];
|
|
20
|
+
errorMessage: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function getK8sLogFromKubeConfig(): K8sLog;
|
|
23
|
+
export declare function processMutateLog(payload: LogPayload, name: string, uid: string): void;
|
|
24
|
+
export declare function processValidateLog(payload: LogPayload, name: string, uid: string): void;
|
|
25
|
+
export {};
|
|
3
26
|
//# sourceMappingURL=monitor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../../src/cli/monitor.ts"],"names":[],"mappings":"
|
|
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;AAI1F,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,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;AAmCD,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"}
|