pepr 0.53.1-nightly.9 → 0.54.0-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/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "!src/fixtures/**",
17
17
  "!dist/**/*.test.d.ts*"
18
18
  ],
19
- "version": "0.53.1-nightly.9",
19
+ "version": "0.54.0-nightly.0",
20
20
  "main": "dist/lib.js",
21
21
  "types": "dist/lib.d.ts",
22
22
  "scripts": {
@@ -95,10 +95,10 @@
95
95
  },
96
96
  "peerDependencies": {
97
97
  "@types/prompts": "2.4.9",
98
- "@typescript-eslint/eslint-plugin": "8.38.0",
99
- "@typescript-eslint/parser": "8.38.0",
100
- "esbuild": "0.25.8",
101
- "eslint": "9.32.0",
98
+ "@typescript-eslint/eslint-plugin": "8.42.0",
99
+ "@typescript-eslint/parser": "8.42.0",
100
+ "esbuild": "0.25.9",
101
+ "eslint": "9.34.0",
102
102
  "node-forge": "1.3.1",
103
103
  "prettier": "3.6.2",
104
104
  "prompts": "2.4.2",
@@ -23,8 +23,9 @@ export default function (program: Command): void {
23
23
  .command("update")
24
24
  .description("Update this Pepr module. Not recommended for prod as it may change files.")
25
25
  .option("-s, --skip-template-update", "Do not update template files")
26
+ .option("-y, --yes", "Skip confirmation prompt")
26
27
  .action(async opts => {
27
- if (!opts.skipTemplateUpdate) {
28
+ if (!opts.skipTemplateUpdate && !opts.yes) {
28
29
  const { confirm } = await prompt({
29
30
  type: "confirm",
30
31
  name: "confirm",
@@ -94,7 +94,7 @@ export class Controller {
94
94
  // Initialize feature store
95
95
  try {
96
96
  featureFlagStore.initialize();
97
- Log.info(featureFlagStore.getAll(), "Feature flags store initialized");
97
+ Log.info(`Feature flag store initialized: ${JSON.stringify(featureFlagStore.getAll())}`);
98
98
  } catch (error) {
99
99
  Log.warn(error, "Could not initialize feature flags");
100
100
  }
@@ -227,16 +227,17 @@ export function secretOverLimit(str: string): boolean {
227
227
  }
228
228
 
229
229
  export const parseTimeout = (value: string): number => {
230
- const parsedValue = parseInt(value, 10);
231
- const floatValue = parseFloat(value);
232
- if (isNaN(parsedValue)) {
233
- throw new Error("Not a number.");
234
- } else if (parsedValue !== floatValue) {
230
+ const num = Number(value);
231
+
232
+ if (!Number.isInteger(num) || value.includes(".")) {
235
233
  throw new Error("Value must be an integer.");
236
- } else if (parsedValue < 1 || parsedValue > 30) {
234
+ }
235
+
236
+ if (num < 1 || num > 30) {
237
237
  throw new Error("Number must be between 1 and 30.");
238
238
  }
239
- return parsedValue;
239
+
240
+ return num;
240
241
  };
241
242
 
242
243
  // Remove leading whitespace while keeping format of file