@theholocron/cli 3.66.0 → 4.0.1
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 +13 -13
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +11 -9
- package/dist/index.mjs +5 -5
- package/package.json +8 -8
package/dist/cli.mjs
CHANGED
|
@@ -279,7 +279,7 @@ function resolveConfig(raw) {
|
|
|
279
279
|
org: raw.org,
|
|
280
280
|
domain: raw.domain,
|
|
281
281
|
repo: raw.repo,
|
|
282
|
-
|
|
282
|
+
tasks: raw.tasks,
|
|
283
283
|
providers,
|
|
284
284
|
apps: raw.apps ?? [],
|
|
285
285
|
doctor: raw.doctor ?? {},
|
|
@@ -4593,7 +4593,7 @@ async function runSetup(input) {
|
|
|
4593
4593
|
}, { skipCodes: SECURITY_SKIP_CODES[method] }));
|
|
4594
4594
|
print(formatStep(steps[steps.length - 1]));
|
|
4595
4595
|
}
|
|
4596
|
-
const usesAdvancedCodeQL = (config.
|
|
4596
|
+
const usesAdvancedCodeQL = (config.tasks ?? []).map((e) => typeof e === "string" ? e : e.name).includes("codeql");
|
|
4597
4597
|
steps.push(await runStep("source", usesAdvancedCodeQL ? "disableDefaultCodeScanning" : "enableCodeScanning", dryRun, async () => {
|
|
4598
4598
|
if (usesAdvancedCodeQL) await source.disableDefaultCodeScanning();
|
|
4599
4599
|
else return await source.enableCodeScanning();
|
|
@@ -4604,7 +4604,7 @@ async function runSetup(input) {
|
|
|
4604
4604
|
await source.updateRepoSettings(BALANCED_REPO_SETTINGS);
|
|
4605
4605
|
}));
|
|
4606
4606
|
print(formatStep(steps[steps.length - 1]));
|
|
4607
|
-
const configuredWorkflowNames = [...new Set((config.
|
|
4607
|
+
const configuredWorkflowNames = [...new Set((config.tasks ?? []).map((entry) => typeof entry === "string" ? entry : entry.name))];
|
|
4608
4608
|
const requiredChecks = effectivePreset === "strict" ? [
|
|
4609
4609
|
"DCO",
|
|
4610
4610
|
...configuredWorkflowNames.flatMap((name) => {
|
|
@@ -4617,11 +4617,11 @@ async function runSetup(input) {
|
|
|
4617
4617
|
print(formatStep(steps[steps.length - 1]));
|
|
4618
4618
|
}
|
|
4619
4619
|
}
|
|
4620
|
-
const
|
|
4621
|
-
if (loader.has("source") &&
|
|
4620
|
+
const tasks = config.tasks;
|
|
4621
|
+
if (loader.has("source") && tasks && tasks.length > 0) {
|
|
4622
4622
|
const source = loader.get("source");
|
|
4623
4623
|
print(style.step("workflows"));
|
|
4624
|
-
for (const entry of
|
|
4624
|
+
for (const entry of tasks) {
|
|
4625
4625
|
const name = typeof entry === "string" ? entry : entry.name;
|
|
4626
4626
|
const rawWith = typeof entry === "object" ? entry.with : void 0;
|
|
4627
4627
|
const normalized = rawWith ? normalizeWorkflowWith(rawWith) : void 0;
|
|
@@ -4665,7 +4665,7 @@ async function runSetup(input) {
|
|
|
4665
4665
|
print(formatStep(steps[steps.length - 1]));
|
|
4666
4666
|
}
|
|
4667
4667
|
}
|
|
4668
|
-
if (loader.has("source") && (config.
|
|
4668
|
+
if (loader.has("source") && (config.tasks ?? []).map((e) => typeof e === "string" ? e : e.name).includes("bookkeeping")) {
|
|
4669
4669
|
const source = loader.get("source");
|
|
4670
4670
|
steps.push(await runStep("source", "write .github/labeler.yml", dryRun, async () => {
|
|
4671
4671
|
await source.writeRepoFile(".github/labeler.yml", `${workflowHeader$2()}${labeler_default}`);
|
|
@@ -4714,7 +4714,7 @@ async function runSetup(input) {
|
|
|
4714
4714
|
}));
|
|
4715
4715
|
print(formatStep(steps[steps.length - 1]));
|
|
4716
4716
|
{
|
|
4717
|
-
const hasTestWorkflow = (config.
|
|
4717
|
+
const hasTestWorkflow = (config.tasks ?? []).map((e) => typeof e === "string" ? e : e.name).includes("test");
|
|
4718
4718
|
const packages = await readWorkspacePackages(input.context.repoRoot);
|
|
4719
4719
|
const existing = await readFile(join(input.context.repoRoot, "codecov.yml"), "utf8").catch(() => null);
|
|
4720
4720
|
if (!hasTestWorkflow && existing == null) steps.push({
|
|
@@ -4868,7 +4868,7 @@ async function runSetup(input) {
|
|
|
4868
4868
|
if (loader.has("deployment")) {
|
|
4869
4869
|
const deploy = loader.get("deployment");
|
|
4870
4870
|
print(style.step("deployment"));
|
|
4871
|
-
const deployEntry = (config.
|
|
4871
|
+
const deployEntry = (config.tasks ?? []).map((e) => typeof e === "string" ? { name: e } : e).find((e) => e.name === "deploy");
|
|
4872
4872
|
const previewCfg = deployEntry?.with ? extractPreviewConfig(deployEntry.with, {
|
|
4873
4873
|
org: config.org,
|
|
4874
4874
|
domain: config.domain
|
|
@@ -5818,16 +5818,16 @@ async function runSync(input) {
|
|
|
5818
5818
|
print(formatSyncStep(steps[steps.length - 1]));
|
|
5819
5819
|
}
|
|
5820
5820
|
if (stepName === "workflows") {
|
|
5821
|
-
const
|
|
5822
|
-
if (
|
|
5821
|
+
const taskEntries = config.tasks ?? [];
|
|
5822
|
+
if (taskEntries.length === 0) {
|
|
5823
5823
|
steps.push({
|
|
5824
5824
|
capability: "local",
|
|
5825
5825
|
step: "sync workflows",
|
|
5826
5826
|
status: "skip",
|
|
5827
|
-
message: "no
|
|
5827
|
+
message: "no tasks configured"
|
|
5828
5828
|
});
|
|
5829
5829
|
print(formatSyncStep(steps[steps.length - 1]));
|
|
5830
|
-
} else for (const entry of
|
|
5830
|
+
} else for (const entry of taskEntries) {
|
|
5831
5831
|
const name = typeof entry === "string" ? entry : entry.name;
|
|
5832
5832
|
const rawWith = typeof entry === "object" ? entry.with : void 0;
|
|
5833
5833
|
const normalized = rawWith ? normalizeWorkflowWith(rawWith) : void 0;
|