Initial commit
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
export declare function enableDebugging(): void;
|
||||
export declare const log: import("debug").Debugger;
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.log = exports.enableDebugging = void 0;
|
||||
const debug_1 = require("debug");
|
||||
function enableDebugging() {
|
||||
debug_1.debug.enable('electron-windows-sign');
|
||||
}
|
||||
exports.enableDebugging = enableDebugging;
|
||||
exports.log = (0, debug_1.debug)('electron-windows-sign');
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Tries to parse an process.env string to a boolean.
|
||||
* Will understand undefined as the default value
|
||||
* Will understand "false", "False", "fAlse", or "0" as `false`
|
||||
* Will understand everything else as true
|
||||
*
|
||||
* @export
|
||||
* @param {string} name
|
||||
* @return {*} {boolean}
|
||||
*/
|
||||
export declare function booleanFromEnv(name: string): boolean | undefined;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.booleanFromEnv = void 0;
|
||||
/**
|
||||
* Tries to parse an process.env string to a boolean.
|
||||
* Will understand undefined as the default value
|
||||
* Will understand "false", "False", "fAlse", or "0" as `false`
|
||||
* Will understand everything else as true
|
||||
*
|
||||
* @export
|
||||
* @param {string} name
|
||||
* @return {*} {boolean}
|
||||
*/
|
||||
function booleanFromEnv(name) {
|
||||
const value = process.env[name];
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value.toLowerCase() === 'false' || value === '0') {
|
||||
return false;
|
||||
}
|
||||
return !!value;
|
||||
}
|
||||
exports.booleanFromEnv = booleanFromEnv;
|
||||
Reference in New Issue
Block a user