Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
di-sukharev committed Sep 7, 2024
1 parent 2c07d5b commit 3493cbb
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
29 changes: 27 additions & 2 deletions out/cli.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30186,14 +30186,34 @@ var mergeConfigs = (main, fallback) => {
return acc;
}, {});
};
var cleanUndefinedValues = (config7) => {
return Object.fromEntries(
Object.entries(config7).map(([_7, v5]) => {
try {
if (typeof v5 === "string") {
if (v5 === "undefined")
return [_7, void 0];
if (v5 === "null")
return [_7, null];
const parsedValue = JSON.parse(v5);
return [_7, parsedValue];
}
return [_7, v5];
} catch (error) {
return [_7, v5];
}
})
);
};
var getConfig = ({
envPath = defaultEnvPath,
globalPath = defaultConfigPath
} = {}) => {
const envConfig = getEnvConfig(envPath);
const globalConfig = getGlobalConfig(globalPath);
const config7 = mergeConfigs(envConfig, globalConfig);
return config7;
const cleanConfig = cleanUndefinedValues(config7);
return cleanConfig;
};
var setConfig = (keyValues, globalConfigPath = defaultConfigPath) => {
const config7 = getConfig({
Expand Down Expand Up @@ -44508,6 +44528,7 @@ var GroqEngine = class extends OpenAiEngine {
function getEngine() {
const config7 = getConfig();
const provider = config7.OCO_AI_PROVIDER;
console.log(123123, { config: config7 });
const DEFAULT_CONFIG2 = {
model: config7.OCO_MODEL,
maxTokensOutput: config7.OCO_TOKENS_MAX_OUTPUT,
Expand Down Expand Up @@ -45373,7 +45394,10 @@ ${source_default.grey("\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2
}
}
} catch (error) {
commitGenerationSpinner.stop("\u{1F4DD} Commit message generated");
commitGenerationSpinner.stop(
`${source_default.red("\u2716")} Failed to generate the commit message`
);
console.log(error);
const err = error;
ce(`${source_default.red("\u2716")} ${err?.message || err}`);
process.exit(1);
Expand Down Expand Up @@ -45713,6 +45737,7 @@ function set_missing_default_values_default() {
}
if (entriesToSet.length > 0)
setConfig(entriesToSet);
console.log(entriesToSet);
};
setDefaultConfigValues(getGlobalConfig());
}
Expand Down
23 changes: 22 additions & 1 deletion out/github-action.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -48987,14 +48987,34 @@ var mergeConfigs = (main, fallback) => {
return acc;
}, {});
};
var cleanUndefinedValues = (config6) => {
return Object.fromEntries(
Object.entries(config6).map(([_3, v2]) => {
try {
if (typeof v2 === "string") {
if (v2 === "undefined")
return [_3, void 0];
if (v2 === "null")
return [_3, null];
const parsedValue = JSON.parse(v2);
return [_3, parsedValue];
}
return [_3, v2];
} catch (error) {
return [_3, v2];
}
})
);
};
var getConfig = ({
envPath = defaultEnvPath,
globalPath = defaultConfigPath
} = {}) => {
const envConfig = getEnvConfig(envPath);
const globalConfig = getGlobalConfig(globalPath);
const config6 = mergeConfigs(envConfig, globalConfig);
return config6;
const cleanConfig = cleanUndefinedValues(config6);
return cleanConfig;
};
var setConfig = (keyValues, globalConfigPath = defaultConfigPath) => {
const config6 = getConfig({
Expand Down Expand Up @@ -63309,6 +63329,7 @@ var GroqEngine = class extends OpenAiEngine {
function getEngine() {
const config6 = getConfig();
const provider = config6.OCO_AI_PROVIDER;
console.log(123123, { config: config6 });
const DEFAULT_CONFIG2 = {
model: config6.OCO_MODEL,
maxTokensOutput: config6.OCO_TOKENS_MAX_OUTPUT,
Expand Down

0 comments on commit 3493cbb

Please sign in to comment.