@theholocron/cli 5.0.0-alpha.10 → 5.0.0-alpha.11
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 +29 -7
- package/dist/cli.mjs.map +1 -1
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -5118,20 +5118,31 @@ async function runSetup(input) {
|
|
|
5118
5118
|
print(formatStep(steps[steps.length - 1]));
|
|
5119
5119
|
}
|
|
5120
5120
|
{
|
|
5121
|
-
const
|
|
5121
|
+
const astromechTurbo = createAstromech({
|
|
5122
5122
|
cwd: input.context.repoRoot,
|
|
5123
5123
|
config: { tasks: config.tasks },
|
|
5124
5124
|
logger
|
|
5125
|
-
})
|
|
5125
|
+
});
|
|
5126
|
+
const content = astromechTurbo.turboConfig();
|
|
5126
5127
|
if (content === null) steps.push({
|
|
5127
5128
|
capability: "source",
|
|
5128
5129
|
step: "write turbo.json",
|
|
5129
5130
|
status: "skip",
|
|
5130
5131
|
message: "no fan-out-eligible tasks configured"
|
|
5131
5132
|
});
|
|
5132
|
-
else
|
|
5133
|
-
await
|
|
5134
|
-
|
|
5133
|
+
else {
|
|
5134
|
+
steps.push(await runStep("source", "write turbo.json", dryRun, async () => {
|
|
5135
|
+
await source.writeRepoFile("turbo.json", content);
|
|
5136
|
+
}));
|
|
5137
|
+
print(formatStep(steps[steps.length - 1]));
|
|
5138
|
+
const rootPkg = await readFile(join(input.context.repoRoot, "package.json"), "utf8").then((raw) => JSON.parse(raw)).catch(() => null);
|
|
5139
|
+
const workspaceYaml = await readFile(join(input.context.repoRoot, "pnpm-workspace.yaml"), "utf8").catch(() => "");
|
|
5140
|
+
const rootScripts = Object.keys(rootPkg?.scripts ?? {});
|
|
5141
|
+
const workspaceFix = astromechTurbo.ensureRootWorkspaceMember(workspaceYaml, rootScripts);
|
|
5142
|
+
if (workspaceFix.changed) steps.push(await runStep("source", "fix pnpm-workspace.yaml (root workspace member, #692)", dryRun, async () => {
|
|
5143
|
+
await source.writeRepoFile("pnpm-workspace.yaml", workspaceFix.content);
|
|
5144
|
+
}));
|
|
5145
|
+
}
|
|
5135
5146
|
print(formatStep(steps[steps.length - 1]));
|
|
5136
5147
|
}
|
|
5137
5148
|
if (source.syncLabels) {
|
|
@@ -6321,11 +6332,12 @@ async function runSync(input) {
|
|
|
6321
6332
|
print(formatSyncStep(steps[steps.length - 1]));
|
|
6322
6333
|
}
|
|
6323
6334
|
if (stepName === "turbo") {
|
|
6324
|
-
const
|
|
6335
|
+
const astromechTurbo = createAstromech({
|
|
6325
6336
|
cwd: input.context.repoRoot,
|
|
6326
6337
|
config: { tasks: config.tasks },
|
|
6327
6338
|
logger
|
|
6328
|
-
})
|
|
6339
|
+
});
|
|
6340
|
+
const content = astromechTurbo.turboConfig();
|
|
6329
6341
|
if (content === null) {
|
|
6330
6342
|
steps.push({
|
|
6331
6343
|
capability: "local",
|
|
@@ -6339,6 +6351,16 @@ async function runSync(input) {
|
|
|
6339
6351
|
await writeFile(join(input.context.repoRoot, "turbo.json"), content, "utf8");
|
|
6340
6352
|
}));
|
|
6341
6353
|
print(formatSyncStep(steps[steps.length - 1]));
|
|
6354
|
+
const rootPkg = await readFile(join(input.context.repoRoot, "package.json"), "utf8").then((raw) => JSON.parse(raw)).catch(() => null);
|
|
6355
|
+
const workspaceYaml = await readFile(join(input.context.repoRoot, "pnpm-workspace.yaml"), "utf8").catch(() => "");
|
|
6356
|
+
const rootScripts = Object.keys(rootPkg?.scripts ?? {});
|
|
6357
|
+
const workspaceFix = astromechTurbo.ensureRootWorkspaceMember(workspaceYaml, rootScripts);
|
|
6358
|
+
if (workspaceFix.changed) {
|
|
6359
|
+
steps.push(await runSyncStep("local", "fix pnpm-workspace.yaml (root workspace member, #692)", dryRun, async () => {
|
|
6360
|
+
await writeFile(join(input.context.repoRoot, "pnpm-workspace.yaml"), workspaceFix.content, "utf8");
|
|
6361
|
+
}));
|
|
6362
|
+
print(formatSyncStep(steps[steps.length - 1]));
|
|
6363
|
+
}
|
|
6342
6364
|
}
|
|
6343
6365
|
}
|
|
6344
6366
|
if (stepName === "wiki") {
|