@wraps.dev/cli 3.17.0 → 3.17.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.js CHANGED
@@ -47105,6 +47105,9 @@ async function provisionTrackingHttps(args) {
47105
47105
  init_esm_shims();
47106
47106
  import mri from "mri";
47107
47107
  var STRING_FLAGS = [
47108
+ "name",
47109
+ "max-per-hour",
47110
+ "max-per-day",
47108
47111
  "provider",
47109
47112
  "region",
47110
47113
  "domain",
@@ -47149,6 +47152,8 @@ var STRING_FLAGS = [
47149
47152
  "validation-threshold"
47150
47153
  ];
47151
47154
  var BOOLEAN_FLAGS = [
47155
+ "clear-allowlist",
47156
+ "all",
47152
47157
  "yes",
47153
47158
  "force",
47154
47159
  "preview",
@@ -47195,6 +47200,12 @@ var NEGATED_BOOLEANS = [
47195
47200
  { positive: "example", camelKey: "noExample" },
47196
47201
  { positive: "claude", camelKey: "noClaude" }
47197
47202
  ];
47203
+ var toCamel = (name) => name.replace(/-([a-z])/g, (_, ch) => ch.toUpperCase());
47204
+ var LIST_FLAGS = ["allow-recipient", "allow-domain"];
47205
+ var KNOWN_FLAG_KEYS = /* @__PURE__ */ new Set([
47206
+ ...[...STRING_FLAGS, ...LIST_FLAGS, ...BOOLEAN_FLAGS].map(toCamel),
47207
+ ...NEGATED_BOOLEANS.map((n3) => n3.camelKey)
47208
+ ]);
47198
47209
  var ALIAS = {
47199
47210
  p: "provider",
47200
47211
  r: "region",
@@ -47213,12 +47224,11 @@ function resolveNegatableFlag(value, negatedArg, argv = process.argv) {
47213
47224
  }
47214
47225
  return argv.includes(negatedArg) ? false : void 0;
47215
47226
  }
47216
- var toCamel = (name) => name.replace(/-([a-z])/g, (_, ch) => ch.toUpperCase());
47217
47227
  function parseCliArgs(argv) {
47218
47228
  const userArgs = argv.slice(2);
47219
47229
  const parsed = mri(userArgs, {
47220
47230
  boolean: [...BOOLEAN_FLAGS, ...NEGATED_BOOLEANS.map((n3) => n3.positive)],
47221
- string: [...STRING_FLAGS],
47231
+ string: [...STRING_FLAGS, ...LIST_FLAGS],
47222
47232
  alias: ALIAS
47223
47233
  });
47224
47234
  const flags2 = {};
@@ -47228,6 +47238,15 @@ function parseCliArgs(argv) {
47228
47238
  flags2[toCamel(key)] = value;
47229
47239
  }
47230
47240
  }
47241
+ for (const key of LIST_FLAGS) {
47242
+ const raw = parsed[key];
47243
+ const values = (Array.isArray(raw) ? raw : [raw]).filter(
47244
+ (v) => typeof v === "string" && v.length > 0
47245
+ );
47246
+ if (values.length > 0) {
47247
+ flags2[toCamel(key)] = values;
47248
+ }
47249
+ }
47231
47250
  for (const key of BOOLEAN_FLAGS) {
47232
47251
  if (parsed[key] === true) {
47233
47252
  flags2[toCamel(key)] = true;
@@ -60509,7 +60528,8 @@ async function workflowsPush(options) {
60509
60528
  pushed: pushed.map((r6) => ({
60510
60529
  slug: r6.slug,
60511
60530
  id: r6.id,
60512
- status: r6.status
60531
+ status: r6.status,
60532
+ scheduleError: r6.scheduleError
60513
60533
  })),
60514
60534
  unchanged,
60515
60535
  conflicts: []
@@ -60542,6 +60562,11 @@ async function workflowsPush(options) {
60542
60562
  `${r6.slug} updated but left paused (it was paused in the dashboard). Resume it there.`
60543
60563
  );
60544
60564
  }
60565
+ for (const r6 of pushed.filter((p3) => p3.scheduleError)) {
60566
+ clack46.log.warn(
60567
+ `${r6.slug} was saved as draft: its schedule could not be registered (${r6.scheduleError}). Fix it and push again.`
60568
+ );
60569
+ }
60545
60570
  if (failed.length > 0) {
60546
60571
  clack46.log.error(`${failed.length} workflow(s) failed to sync`);
60547
60572
  }
@@ -60644,6 +60669,7 @@ async function pushToAPI2(workflows, target, progress, options, orgId) {
60644
60669
  slug: r6.slug,
60645
60670
  id: r6.id,
60646
60671
  status: r6.status,
60672
+ scheduleError: r6.scheduleError,
60647
60673
  success: true
60648
60674
  });
60649
60675
  }
@@ -60698,6 +60724,7 @@ async function pushToAPI2(workflows, target, progress, options, orgId) {
60698
60724
  slug: data.slug,
60699
60725
  id: data.id,
60700
60726
  status: data.status,
60727
+ scheduleError: data.scheduleError,
60701
60728
  success: true
60702
60729
  });
60703
60730
  progress.succeed(`Synced ${pc46.cyan(w.slug)} to dashboard`);
@@ -72324,11 +72351,11 @@ async function run() {
72324
72351
  await agentPolicy({
72325
72352
  // baseline:allow-no-region — API-backed like agentList/agentKill, not direct AWS
72326
72353
  name: sub[3] || flags.name,
72327
- maxPerHour: flags["max-per-hour"],
72328
- maxPerDay: flags["max-per-day"],
72329
- allowRecipient: flags["allow-recipient"],
72330
- allowDomain: flags["allow-domain"],
72331
- clearAllowlist: flags["clear-allowlist"] === true,
72354
+ maxPerHour: flags.maxPerHour,
72355
+ maxPerDay: flags.maxPerDay,
72356
+ allowRecipient: flags.allowRecipient,
72357
+ allowDomain: flags.allowDomain,
72358
+ clearAllowlist: flags.clearAllowlist === true,
72332
72359
  token: flags.token,
72333
72360
  json: flags.json
72334
72361
  });