pepr 0.51.0-nightly.0 → 0.51.0-nightly.2

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/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "!dist/**/*.test.d.ts*",
18
18
  "!src/cli/docs/**"
19
19
  ],
20
- "version": "0.51.0-nightly.0",
20
+ "version": "0.51.0-nightly.2",
21
21
  "main": "dist/lib.js",
22
22
  "types": "dist/lib.d.ts",
23
23
  "scripts": {
@@ -45,8 +45,8 @@
45
45
  "test:journey:unicorn": "npm run test:journey:k3d && npm run test:journey:image:unicorn && npm run test:journey:run",
46
46
  "test:journey:upgrade": "npm run test:journey:k3d && npm run test:journey:image && jest --detectOpenHandles journey/pepr-upgrade.test.ts",
47
47
  "test:unit": "npm run gen-data-json && jest src --coverage --detectOpenHandles --coverageDirectory=./coverage --testPathIgnorePatterns=\"build-artifact.test.ts|src/cli/docs/.*\\.test\\.ts\"",
48
- "format:check": "eslint --ignore-pattern src/templates/eslint.config.mjs src && prettier --config .prettierrc src --check",
49
- "format:fix": "eslint --fix --ignore-pattern src/templates/eslint.config.mjs src && prettier --config .prettierrc src --write",
48
+ "format:check": "eslint --ignore-pattern src/templates/eslint.config.mjs src && prettier --config .prettierrc src --check && npx -y markdownlint-cli --ignore adr --ignore integration/testroot --ignore pepr-test-module --ignore pepr-upgrade-test --ignore node_modules \"**/*.md\"",
49
+ "format:fix": "eslint --fix --ignore-pattern src/templates/eslint.config.mjs src && prettier --config .prettierrc src --write && npx -y markdownlint-cli --fix --ignore adr --ignore integration/testroot --ignore pepr-test-module --ignore pepr-upgrade-test --ignore node_modules \"**/*.md\"",
50
50
  "prepare": "if [ \"$NODE_ENV\" != 'production' ]; then husky; fi"
51
51
  },
52
52
  "dependencies": {
package/src/cli/build.ts CHANGED
@@ -82,7 +82,7 @@ export default function (program: RootCmd): void {
82
82
  .addOption(
83
83
  new Option(
84
84
  "-r, --registry-info [<registry>/<username>]",
85
- "Provide the image registry and username for building and pushing a custom WASM container. Requires authentication. Builds and pushes 'registry/username/custom-pepr-controller:<current-version>'.",
85
+ "Provide the image registry and username for building and pushing a custom WASM container. Requires authentication. Builds and pushes `'registry/username/custom-pepr-controller:<current-version>'`.",
86
86
  ).conflicts(["customImage", "registry"]),
87
87
  )
88
88
 
package/src/cli/dev.ts CHANGED
@@ -29,7 +29,8 @@ export default function (program: RootCmd): void {
29
29
 
30
30
  // Exit if the user doesn't confirm
31
31
  if (!confirm.confirm) {
32
- process.exit(0);
32
+ process.exitCode = 0;
33
+ return;
33
34
  }
34
35
  }
35
36
 
@@ -67,8 +68,10 @@ export default function (program: RootCmd): void {
67
68
  try {
68
69
  // wait for capabilities to be loaded and test names
69
70
  validateCapabilityNames(webhook.capabilities);
70
- } catch (e) {
71
- console.error(`Error validating capability names:`, e);
71
+ } catch (error) {
72
+ console.error(
73
+ `CapabilityValidation Error - Unable to valide capability name(s) in: '${webhook.capabilities.map(item => item.name)}'\n${error}`,
74
+ );
72
75
  process.exit(1);
73
76
  }
74
77
 
@@ -249,9 +249,9 @@ export class Capability implements CapabilityExport {
249
249
  ...binding,
250
250
  isValidate: true,
251
251
  validateCallback: async (req, logger = aliasLogger) => {
252
- Log.info(
253
- `Executing validate action with alias: ${binding.alias || "no alias provided"}`,
254
- );
252
+ if (binding.alias) {
253
+ Log.info(`Executing validate action with alias: ${binding.alias}`);
254
+ }
255
255
  return await validateCallback(req, logger);
256
256
  },
257
257
  });
@@ -273,9 +273,9 @@ export class Capability implements CapabilityExport {
273
273
  ...binding,
274
274
  isMutate: true,
275
275
  mutateCallback: async (req, logger = aliasLogger) => {
276
- Log.info(
277
- `Executing mutation action with alias: ${binding.alias || "no alias provided"}`,
278
- );
276
+ if (binding.alias) {
277
+ Log.info(`Executing mutation action with alias: ${binding.alias}`);
278
+ }
279
279
  await mutateCallback(req, logger);
280
280
  },
281
281
  });
@@ -300,7 +300,9 @@ export class Capability implements CapabilityExport {
300
300
  ...binding,
301
301
  isWatch: true,
302
302
  watchCallback: async (update, phase, logger = aliasLogger) => {
303
- Log.info(`Executing watch action with alias: ${binding.alias || "no alias provided"}`);
303
+ if (binding.alias) {
304
+ Log.info(`Executing watch action with alias: ${binding.alias}`);
305
+ }
304
306
  await watchCallback(update, phase, logger);
305
307
  },
306
308
  });
@@ -324,9 +326,9 @@ export class Capability implements CapabilityExport {
324
326
  isWatch: true,
325
327
  isQueue: true,
326
328
  watchCallback: async (update, phase, logger = aliasLogger) => {
327
- Log.info(
328
- `Executing reconcile action with alias: ${binding.alias || "no alias provided"}`,
329
- );
329
+ if (binding.alias) {
330
+ Log.info(`Executing reconcile action with alias: ${binding.alias}`);
331
+ }
330
332
  await reconcileCallback(update, phase, logger);
331
333
  },
332
334
  });
@@ -363,9 +365,9 @@ export class Capability implements CapabilityExport {
363
365
  update: InstanceType<T>,
364
366
  logger = aliasLogger,
365
367
  ): Promise<boolean | void> => {
366
- Log.info(
367
- `Executing finalize action with alias: ${binding.alias || "no alias provided"}`,
368
- );
368
+ if (binding.alias) {
369
+ Log.info(`Executing finalize action with alias: ${binding.alias}`);
370
+ }
369
371
  return await finalizeCallback(update, logger);
370
372
  },
371
373
  };
@@ -10,7 +10,7 @@ per-capability or common logic in shared files or folders.
10
10
 
11
11
  Example Structure:
12
12
 
13
- ```
13
+ ```text
14
14
  Module Root
15
15
  ├── package.json
16
16
  ├── pepr.ts