devopsplaybook-io/common-utils
Basename is uppercase README.mdContains an unconditional loop header
SHA-2564ea085f04b248df12807c581aa86fd8af77bec84f9fdbfda0bfd645cce7cca45
Evidence
1name: Main Build
2
3on:
4 push:
5 branches: ["main"]
6
7 workflow_dispatch:
8
9# Never cancel an in-flight merge run: two quick merges must publish and
10# promote one after the other, not race each other.
11concurrency:
⋯4 lines
16 npm-merge:
17 permissions:
18 contents: read
19 id-token: write
20 uses: devopsplaybook-io/common-utils/.github/workflows/reusable-npm-merge.yml@main
21 with:
22 npm_package_name: "@devopsplaybook.io/common-utils"
23 node_version: "22"
24 publish_provenance: true
25 secrets:
26 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27 QUALITY_DASHBOARD_URL: ${{ secrets.QUALITY_DASHBOARD_URL }}
28 QUALITY_DASHBOARD_TOKEN: ${{ secrets.QUALITY_DASHBOARD_TOKEN }}
1import { ConfigOTelInterface } from "@devopsplaybook.io/otel-utils";
2import * as fse from "fs-extra";
3import path from "path";
4
5/**
6 * Configuration field descriptor used by {@link ConfigBase.addConfigField}.
7 */
8export interface ConfigFieldDef {
9 /** Property name on the config instance. */
10 field: string;
11 /** When `true` the value is masked in log output. */
12 sensitive?: boolean;
13 /**
14 * Alternative environment variable names to check when the primary field
15 * name is not found in `process.env`. Aliases are tried in order and the
16 * first match wins. Only checked in the environment layer, never in the
17 * config-file layer.
18 *
19 * @example
20 * ```ts
21 * // Look for DATABASE_POSTGRES_HOST first, then fall back to POSTGRES_HOST
22 * { field: "DATABASE_POSTGRES_ …
77:44… window (`<= 0` disables). */
78 AUTH_RATE_LIMIT_LOGIN_MAX: number;
79 /** Per-IP login attempts allowed per rate-limit window (`<= 0` disables). */
80 AUTH_RATE_LIMIT_LOGIN_IP_MAX: number;
81 /** Session refreshes allowed per rate-limit window (`<= 0` disables). */
⋯4 lines
86 AUTH_RATE_LIMIT_WINDOW_SECONDS: number;
87 /** Minimum password length (`0` = only non-empty passwords). */
88 PASSWORD_MIN_LENGTH: number;
89 /**
90 * bcrypt cost factor applied to new password hashes. Default 10; the users
91 * module clamps it to 10-15. Each increment doubles the CP …
137:95…
138 );
139 }
140 case "object": {
141 try {
142 return JSON.parse(value);
143 } catch {
144 throw new Error(`Invalid JSON value for ${field}: "${value}"`);
⋯4 lines
393:34… ined) {
394 return detectedVersion;
395 }
396 for (const candidate of [
397 path.resolve(__dirname, "../../package.json"),
398 path.resolve(__dirname, "../package.json"),
399 ]) {
400 try {
401 const pkg = fse.readJson …
No evidence locations were recorded for this file. Raw result