@topogram/cli 0.3.62 → 0.3.63
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/package.json +1 -1
- package/src/cli.js +12 -12
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -8543,6 +8543,17 @@ function commandPath(index, fallback = "./topogram") {
|
|
|
8543
8543
|
return value && !value.startsWith("-") ? value : fallback;
|
|
8544
8544
|
}
|
|
8545
8545
|
|
|
8546
|
+
const removedGenerateIndex = args.indexOf("--generate");
|
|
8547
|
+
if (removedGenerateIndex >= 0) {
|
|
8548
|
+
const target = args[removedGenerateIndex + 1];
|
|
8549
|
+
const input = args[0] === "generate" ? commandPath(1) : commandPath(0);
|
|
8550
|
+
const replacement = target && !target.startsWith("-")
|
|
8551
|
+
? `topogram emit ${target} ${input}`
|
|
8552
|
+
: "topogram emit <target> <path>";
|
|
8553
|
+
console.error(`The artifact flag '--generate' was removed. Use '${replacement}' instead.`);
|
|
8554
|
+
process.exit(1);
|
|
8555
|
+
}
|
|
8556
|
+
|
|
8546
8557
|
function commandOperandFrom(index, fallback = ".") {
|
|
8547
8558
|
const valueFlags = new Set([
|
|
8548
8559
|
"--accept-current",
|
|
@@ -8622,8 +8633,6 @@ if (args[0] === "version" || args[0] === "--version") {
|
|
|
8622
8633
|
commandArgs = { validate: true, inputPath: args[1] };
|
|
8623
8634
|
} else if (args[0] === "generate" && args[1] === "app") {
|
|
8624
8635
|
commandArgs = { generateTarget: "app-bundle", write: true, inputPath: commandPath(2), defaultOutDir: "./app" };
|
|
8625
|
-
} else if (args[0] === "generate" && args.indexOf("--generate") >= 0) {
|
|
8626
|
-
commandArgs = { inputPath: commandPath(1), deprecatedGenerateArtifact: true };
|
|
8627
8636
|
} else if (args[0] === "generate" && args[1] !== "journeys") {
|
|
8628
8637
|
commandArgs = { generateTarget: "app-bundle", write: true, inputPath: commandPath(1), defaultOutDir: "./app" };
|
|
8629
8638
|
} else if (args[0] === "trust" && args[1] === "template") {
|
|
@@ -8861,13 +8870,7 @@ const shouldImportStatus = Boolean(commandArgs?.importStatus);
|
|
|
8861
8870
|
const shouldImportHistory = Boolean(commandArgs?.importHistory);
|
|
8862
8871
|
const shouldValidate = Boolean(commandArgs?.validate) || args.includes("--validate");
|
|
8863
8872
|
const shouldResolve = args.includes("--resolve");
|
|
8864
|
-
const
|
|
8865
|
-
const generateTarget = commandArgs?.generateTarget || (generateIndex >= 0 ? args[generateIndex + 1] : null);
|
|
8866
|
-
if (commandArgs?.deprecatedGenerateArtifact && (!generateTarget || generateTarget.startsWith("-"))) {
|
|
8867
|
-
console.error("Missing required --generate <target>.");
|
|
8868
|
-
printUsage();
|
|
8869
|
-
process.exit(1);
|
|
8870
|
-
}
|
|
8873
|
+
const generateTarget = commandArgs?.generateTarget || null;
|
|
8871
8874
|
if (RENAMED_GENERATE_TARGETS.has(generateTarget)) {
|
|
8872
8875
|
console.error(`Artifact target '${generateTarget}' was renamed to '${RENAMED_GENERATE_TARGETS.get(generateTarget)}'.`);
|
|
8873
8876
|
process.exit(1);
|
|
@@ -11602,9 +11605,6 @@ try {
|
|
|
11602
11605
|
const ast = parsePath(inputPath);
|
|
11603
11606
|
|
|
11604
11607
|
if (generateTarget) {
|
|
11605
|
-
if (commandArgs?.deprecatedGenerateArtifact) {
|
|
11606
|
-
console.error(`Deprecated: use \`topogram emit ${generateTarget} ${inputPath || "./topogram"}\` instead of \`topogram generate ${inputPath || "./topogram"} --generate ${generateTarget}\`.`);
|
|
11607
|
-
}
|
|
11608
11608
|
const projectRoot = normalizeProjectRoot(inputPath);
|
|
11609
11609
|
const explicitProjectConfig = loadProjectConfig(projectRoot) || loadProjectConfig(inputPath);
|
|
11610
11610
|
const implementationOptionalTargets = new Set(["app-bundle-plan", "app-bundle", "environment-plan", "environment-bundle", "compile-check-plan", "compile-check-bundle"]);
|