pepr 0.48.1-nightly.9 → 0.49.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.d.ts.map +1 -1
- package/dist/cli/crd/create.d.ts +11 -0
- package/dist/cli/crd/create.d.ts.map +1 -0
- package/dist/cli/crd/generate.d.ts +49 -0
- package/dist/cli/crd/generate.d.ts.map +1 -0
- package/dist/cli/crd/index.d.ts +3 -0
- package/dist/cli/crd/index.d.ts.map +1 -0
- package/dist/cli/init/templates.d.ts +1 -0
- package/dist/cli/init/templates.d.ts.map +1 -1
- package/dist/cli.js +7694 -53
- package/dist/controller.js +1 -1
- package/dist/lib/assets/assets.d.ts.map +1 -1
- package/dist/lib/assets/helm.d.ts +3 -1
- package/dist/lib/assets/helm.d.ts.map +1 -1
- package/dist/lib/assets/yaml/generateZarfYaml.d.ts.map +1 -1
- package/dist/lib/controller/createHooks.d.ts +13 -0
- package/dist/lib/controller/createHooks.d.ts.map +1 -0
- package/dist/lib/core/module.d.ts.map +1 -1
- package/dist/lib.js +25 -17
- package/dist/lib.js.map +3 -3
- package/package.json +4 -3
- package/src/cli/build.ts +13 -2
- package/src/cli/crd/create.ts +134 -0
- package/src/cli/crd/generate.ts +317 -0
- package/src/cli/crd/index.ts +15 -0
- package/src/cli.ts +3 -0
- package/src/lib/assets/assets.ts +16 -2
- package/src/lib/assets/helm.ts +7 -6
- package/src/lib/assets/yaml/generateZarfYaml.ts +4 -3
- package/src/lib/controller/createHooks.ts +34 -0
- package/src/lib/controller/index.ts +3 -3
- package/src/lib/core/module.ts +8 -20
package/src/lib/core/module.ts
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
// SPDX-FileCopyrightText: 2023-Present The Pepr Authors
|
|
3
3
|
import { clone } from "ramda";
|
|
4
4
|
import { Capability } from "./capability";
|
|
5
|
-
import { Controller
|
|
5
|
+
import { Controller } from "../controller";
|
|
6
6
|
import { ValidateError } from "../errors";
|
|
7
7
|
import { CapabilityExport } from "../types";
|
|
8
|
-
import {
|
|
9
|
-
import Log from "../../lib/telemetry/logger";
|
|
10
|
-
import { resolveIgnoreNamespaces } from "../assets/webhooks";
|
|
11
|
-
import { isBuildMode, isDevMode, isWatchMode } from "./envChecks";
|
|
8
|
+
import { isBuildMode } from "./envChecks";
|
|
12
9
|
import { PackageJSON, PeprModuleOptions, ModuleConfig } from "../types";
|
|
10
|
+
import { createControllerHooks } from "../controller/createHooks";
|
|
13
11
|
|
|
14
12
|
export class PeprModule {
|
|
15
13
|
#controller!: Controller;
|
|
@@ -59,21 +57,11 @@ export class PeprModule {
|
|
|
59
57
|
return;
|
|
60
58
|
}
|
|
61
59
|
|
|
62
|
-
const controllerHooks
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (isWatchMode() || isDevMode()) {
|
|
68
|
-
try {
|
|
69
|
-
setupWatch(capabilities, resolveIgnoreNamespaces(pepr?.alwaysIgnore?.namespaces));
|
|
70
|
-
} catch (e) {
|
|
71
|
-
Log.error(e, "Error setting up watch");
|
|
72
|
-
process.exit(1);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
};
|
|
60
|
+
const controllerHooks = createControllerHooks(
|
|
61
|
+
opts,
|
|
62
|
+
capabilities,
|
|
63
|
+
pepr?.alwaysIgnore?.namespaces,
|
|
64
|
+
);
|
|
77
65
|
|
|
78
66
|
this.#controller = new Controller(config, capabilities, controllerHooks);
|
|
79
67
|
|