@brew.new/cli 0.5.0 → 0.6.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/bin.js CHANGED
@@ -215,7 +215,7 @@ function shellQuote(token) {
215
215
 
216
216
  // src/version.ts
217
217
  var CLI_NAME = "brew-cli";
218
- var CLI_VERSION = "0.5.0" ;
218
+ var CLI_VERSION = "0.6.0" ;
219
219
  var CONFIG_KEYS = ["apiKey", "brandId", "apiUrl"];
220
220
  function isConfigKey(value) {
221
221
  return CONFIG_KEYS.includes(value);
@@ -3582,8 +3582,56 @@ var contractsInferCommand = defineCommand({
3582
3582
  }
3583
3583
  });
3584
3584
 
3585
+ // src/commands/data/run.ts
3586
+ var dataRunCommand = defineCommand({
3587
+ path: ["data", "run"],
3588
+ summary: "Run a `db \u2026` command over the brand's data",
3589
+ sdkMethod: "data.run",
3590
+ route: { method: "POST", path: "/v1/data" },
3591
+ commandClass: "read",
3592
+ args: [
3593
+ {
3594
+ name: "command",
3595
+ summary: "The db command line, e.g. 'db find audiences --fields name'",
3596
+ isRequired: true
3597
+ }
3598
+ ],
3599
+ flags: [],
3600
+ examples: [
3601
+ "brew-cli data run 'db ls'",
3602
+ "brew-cli data run 'db find contacts --since 30d --fields email --limit 20'",
3603
+ "brew-cli data run 'db agg analyticsEvents --since 7d --group-by eventType --bucket day'"
3604
+ ],
3605
+ run: async ({ ctx, args }) => {
3606
+ const result = await ctx.client().data.run({
3607
+ command: args.command ?? ""
3608
+ });
3609
+ return {
3610
+ data: result,
3611
+ human: result.output,
3612
+ exitCode: result.exitCode === 0 ? 0 : 1
3613
+ };
3614
+ }
3615
+ });
3616
+
3585
3617
  // src/skip-list.ts
3586
3618
  var SDK_SKIP_LIST = [
3619
+ {
3620
+ sdkPath: "automations.triggers.getContract",
3621
+ reason: "covered by `automations triggers contract get` (raw route, bound pre-SDK-v9; SDK-method migration tracked separately)"
3622
+ },
3623
+ {
3624
+ sdkPath: "automations.triggers.putContract",
3625
+ reason: "covered by `automations triggers contract put` (raw route, bound pre-SDK-v9)"
3626
+ },
3627
+ {
3628
+ sdkPath: "automations.triggers.validatePayload",
3629
+ reason: "covered by `automations triggers contract validate` (raw route, bound pre-SDK-v9)"
3630
+ },
3631
+ {
3632
+ sdkPath: "payloadContracts.infer",
3633
+ reason: "covered by `contracts infer` (raw route, bound pre-SDK-v9)"
3634
+ },
3587
3635
  {
3588
3636
  sdkPath: "contacts.searchAll",
3589
3637
  reason: "auto-pager covered by `contacts search --all`"
@@ -5545,6 +5593,7 @@ var ALL_COMMANDS = [
5545
5593
  automationsTriggersContractPutCommand,
5546
5594
  automationsTriggersContractValidateCommand,
5547
5595
  contractsInferCommand,
5596
+ dataRunCommand,
5548
5597
  automationsTriggersCreateCommand,
5549
5598
  automationsTriggersUpdateCommand,
5550
5599
  automationsTriggersDeleteCommand,