@koda-sl/baker-cli 0.343.0-dev.c28f2e0b3 → 0.343.0

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.js CHANGED
@@ -67,7 +67,7 @@ import {
67
67
  validateCanvasDeep,
68
68
  withoutCastName,
69
69
  ytDlpBlockSignal
70
- } from "./chunk-D5P4COPD.js";
70
+ } from "./chunk-FFOURYP5.js";
71
71
  import {
72
72
  csvOrJson,
73
73
  daysAgoIso,
@@ -17114,9 +17114,21 @@ function parseCopyList(value, flag) {
17114
17114
  function copyListFlag(value, flag) {
17115
17115
  return parseCopyList(value, flag)?.map((item) => item.text);
17116
17116
  }
17117
+ function refuseDashLedValue(rawArgs, flag) {
17118
+ for (let i = 0; i < rawArgs.length - 1; i++) {
17119
+ if (rawArgs[i] === "--") return;
17120
+ const value = rawArgs[i + 1];
17121
+ if (rawArgs[i] === `--${flag}` && value?.startsWith("-")) {
17122
+ failWriteValidation(
17123
+ `--${flag} is followed by "${value}", which starts with a dash and is read as another flag, not as copy. Join copy that starts with a dash to its flag with =: --${flag}="${value}"`
17124
+ );
17125
+ }
17126
+ }
17127
+ }
17117
17128
  function withRepeatedCopyFlags(args5, rawArgs) {
17118
17129
  const out = { ...args5 };
17119
17130
  for (const flag of AD_COPY_LIST_FLAGS) {
17131
+ refuseDashLedValue(rawArgs ?? [], flag);
17120
17132
  const values = repeatedFlagValues(rawArgs ?? [], flag);
17121
17133
  if (values.length > 1) {
17122
17134
  out[flag] = values;