//#region lib/config/global.ts
var GlobalConfig = class GlobalConfig {
	static OPTIONS = [
		"allowCustomCrateRegistries",
		"allowPlugins",
		"allowScripts",
		"allowShellExecutorForPostUpgradeCommands",
		"allowedCommands",
		"allowedEnv",
		"allowedHeaders",
		"allowedUnsafeExecutions",
		"autodiscoverRepoOrder",
		"autodiscoverRepoSort",
		"bbUseDevelopmentBranch",
		"binarySource",
		"cacheDir",
		"cacheHardTtlMinutes",
		"cachePrivatePackages",
		"cacheTtlOverride",
		"configFileNames",
		"containerbaseDir",
		"customEnvVariables",
		"dockerChildPrefix",
		"dockerCliOptions",
		"dockerMaxPages",
		"dockerSidecarImage",
		"dockerUser",
		"dryRun",
		"encryptedWarning",
		"endpoint",
		"executionTimeout",
		"exposeAllEnv",
		"gitTimeout",
		"githubTokenWarn",
		"httpCacheTtlDays",
		"ignorePrAuthor",
		"includeMirrors",
		"localDir",
		"migratePresets",
		"onboarding",
		"onboardingAutoCloseAge",
		"onboardingBranch",
		"onboardingNoDeps",
		"onboardingPrTitle",
		"platform",
		"presetCachePersistence",
		"repositoryCacheForceLocal",
		"s3Endpoint",
		"s3PathStyle",
		"toolSettings",
		"userAgent"
	];
	static config = {};
	static get(key, defaultValue) {
		return key ? GlobalConfig.config[key] ?? defaultValue : GlobalConfig.config;
	}
	static set(config) {
		GlobalConfig.reset();
		const result = { ...config };
		for (const option of GlobalConfig.OPTIONS) {
			GlobalConfig.config[option] = config[option];
			delete result[option];
		}
		return result;
	}
	static reset() {
		GlobalConfig.config = {};
	}
};

//#endregion
export { GlobalConfig };
//# sourceMappingURL=global.js.map