@theholocron/cli 5.0.0-alpha.148 → 5.0.0-alpha.149
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/dist/cli.mjs +5 -4
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +5 -4
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -8335,12 +8335,13 @@ async function loadConfig(cwd) {
|
|
|
8335
8335
|
});
|
|
8336
8336
|
if (!found) throw new ConfigFileError(`no holocron.config.{ts,js,mjs,cjs,json} found in ${cwd}. Create one — see the README for the schema.`);
|
|
8337
8337
|
return {
|
|
8338
|
-
resolved: resolveConfig(await deriveDefaults(
|
|
8338
|
+
resolved: resolveConfig(await deriveDefaults(found)),
|
|
8339
8339
|
filepath: found.filepath
|
|
8340
8340
|
};
|
|
8341
8341
|
}
|
|
8342
|
-
async function deriveDefaults(
|
|
8343
|
-
const
|
|
8342
|
+
async function deriveDefaults(found) {
|
|
8343
|
+
const configDir = dirname(found.filepath);
|
|
8344
|
+
const result = { ...found.config };
|
|
8344
8345
|
if (!result.name) result.name = await readPackageJsonName(configDir) ?? basename(configDir);
|
|
8345
8346
|
if (result.repo && !result.repo.name) {
|
|
8346
8347
|
const remote = await readGitRemote(configDir);
|
|
@@ -8349,7 +8350,7 @@ async function deriveDefaults(configDir, raw) {
|
|
|
8349
8350
|
name: remote.slug
|
|
8350
8351
|
};
|
|
8351
8352
|
}
|
|
8352
|
-
const manifest = await loadTasksConfig(configDir);
|
|
8353
|
+
const manifest = await loadTasksConfig(configDir, { holocron: found });
|
|
8353
8354
|
if (manifest.tasks) result.tasks = manifest.tasks;
|
|
8354
8355
|
if (manifest.syncScripts !== void 0) result.syncScripts = manifest.syncScripts;
|
|
8355
8356
|
if (manifest.holocronScript !== void 0) result.holocronScript = manifest.holocronScript;
|