@dataworks-technology/cli 1.0.2 → 1.1.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/README.md CHANGED
@@ -36,7 +36,7 @@ The `dw` binary turns the public GraphQL contract published by `@dataworks-techn
36
36
  ## Prerequisites
37
37
 
38
38
  - [Node.js](https://nodejs.org/) 22 or newer to run the published CLI
39
- - A Dataworks account and Cognito client ID for the target environment
39
+ - A Dataworks account
40
40
  - [Bun](https://bun.sh/) for repository development
41
41
 
42
42
  ---
@@ -53,13 +53,16 @@ The `dw` binary turns the public GraphQL contract published by `@dataworks-techn
53
53
  2. **Authenticate:**
54
54
 
55
55
  ```sh
56
- export DW_UAT_CLIENT_ID=<uat-cognito-client-id>
57
56
  dw auth login --environment uat
58
57
  dw auth status --json
59
58
  ```
60
59
 
61
60
  The CLI opens Dataworks Managed Login in your browser and never receives your password. Sessions are stored in the operating-system credential store, never in the Dataworks config file. If a browser cannot be opened automatically, pass `--no-browser` and visit the displayed URL on the same computer. Headless jobs can provide a protected `DW_SESSION_JSON` secret instead.
62
61
 
62
+ The public UAT and Live Cognito client IDs are built in. Override them with
63
+ `--client-id`, `DW_UAT_CLIENT_ID`, `DW_LIVE_CLIENT_ID`, or `DW_CLIENT_ID` when
64
+ testing a different app client.
65
+
63
66
  3. **Select a tenant.** Run the command without an ID to choose interactively, or
64
67
  pass an ID for noninteractive use. The selection is saved to your local profile.
65
68
 
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/lib/environment.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;AAEvE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,oBAAoB,CAE1E;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,oBAAoB,EACjC,gBAAgB,CAAC,EAAE,MAAM,GACxB,iBAAiB,CAmBnB;AAED,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,oBAAoB,GAChC,oBAAoB,CAWtB"}
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/lib/environment.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,MAAM,CAAC;AAOlD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;AAEvE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,oBAAoB,CAE1E;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,oBAAoB,EACjC,gBAAgB,CAAC,EAAE,MAAM,GACxB,iBAAiB,CAWnB;AAED,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,oBAAoB,GAChC,oBAAoB,CAWtB"}
@@ -1,4 +1,7 @@
1
- import { CliError } from "./errors.js";
1
+ const defaultClientIds = {
2
+ uat: "4hldq2bchmkumaf2jibm719jq2",
3
+ live: "7oug1a58uuof6vg56tg0hbdf58",
4
+ };
2
5
  export function isEnvironment(value) {
3
6
  return value === "uat" || value === "live";
4
7
  }
@@ -6,10 +9,7 @@ export function resolveEnvironment(environment, clientIdOverride) {
6
9
  const clientId = clientIdOverride?.trim() ||
7
10
  process.env[`DW_${environment.toUpperCase()}_CLIENT_ID`]?.trim() ||
8
11
  process.env.DW_CLIENT_ID?.trim() ||
9
- "";
10
- if (!clientId) {
11
- throw new CliError(`No Cognito client ID is configured for ${environment}. Set DW_${environment.toUpperCase()}_CLIENT_ID or DW_CLIENT_ID.`, "CLIENT_ID_REQUIRED", 2);
12
- }
12
+ defaultClientIds[environment];
13
13
  return {
14
14
  ...resolveEndpoints(environment),
15
15
  clientId,
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/lib/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAiBvC,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAO,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,WAAiC,EACjC,gBAAyB;IAEzB,MAAM,QAAQ,GACZ,gBAAgB,EAAE,IAAI,EAAE;QACxB,OAAO,CAAC,GAAG,CAAC,MAAM,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,EAAE,IAAI,EAAE;QAChE,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE;QAChC,EAAE,CAAC;IAEL,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,QAAQ,CAChB,0CAA0C,WAAW,YAAY,WAAW,CAAC,WAAW,EAAE,6BAA6B,EACvH,oBAAoB,EACpB,CAAC,CACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,GAAG,gBAAgB,CAAC,WAAW,CAAC;QAChC,QAAQ;KACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,WAAiC;IAEjC,MAAM,MAAM,GAAG,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;IAC/D,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE,8CAA8C;QAC/D,WAAW,EAAE,0BAA0B,WAAW,mCAAmC;QACrF,SAAS,EAAE,mBAAmB,MAAM,kBAAkB;QACtD,QAAQ,EAAE,mBAAmB,MAAM,wBAAwB;QAC3D,WAAW,EAAE,oBAAoB,MAAM,kBAAkB;QACzD,UAAU,EAAE,kBAAkB,MAAM,yBAAyB;KAC9D,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/lib/environment.ts"],"names":[],"mappings":"AAEA,MAAM,gBAAgB,GAAyC;IAC7D,GAAG,EAAE,4BAA4B;IACjC,IAAI,EAAE,4BAA4B;CACnC,CAAC;AAeF,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAO,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,WAAiC,EACjC,gBAAyB;IAEzB,MAAM,QAAQ,GACZ,gBAAgB,EAAE,IAAI,EAAE;QACxB,OAAO,CAAC,GAAG,CAAC,MAAM,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,EAAE,IAAI,EAAE;QAChE,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE;QAChC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAEhC,OAAO;QACL,GAAG,gBAAgB,CAAC,WAAW,CAAC;QAChC,QAAQ;KACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,WAAiC;IAEjC,MAAM,MAAM,GAAG,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;IAC/D,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE,8CAA8C;QAC/D,WAAW,EAAE,0BAA0B,WAAW,mCAAmC;QACrF,SAAS,EAAE,mBAAmB,MAAM,kBAAkB;QACtD,QAAQ,EAAE,mBAAmB,MAAM,wBAAwB;QAC3D,WAAW,EAAE,oBAAoB,MAAM,kBAAkB;QACzD,UAAU,EAAE,kBAAkB,MAAM,yBAAyB;KAC9D,CAAC;AACJ,CAAC"}
@@ -10214,10 +10214,10 @@
10214
10214
  "capture.js"
10215
10215
  ]
10216
10216
  },
10217
- "data:visual:create": {
10217
+ "data:theme:create": {
10218
10218
  "aliases": [],
10219
10219
  "args": {},
10220
- "description": "Run the createVisual GraphQL mutation",
10220
+ "description": "Run the createTheme GraphQL mutation",
10221
10221
  "flags": {
10222
10222
  "input": {
10223
10223
  "description": "Input JSON, @file, or - for stdin",
@@ -10272,25 +10272,11 @@
10272
10272
  "hasDynamicHelp": false,
10273
10273
  "multiple": false,
10274
10274
  "type": "option"
10275
- },
10276
- "theme-public-id": {
10277
- "description": "GraphQL themePublicId",
10278
- "name": "theme-public-id",
10279
- "hasDynamicHelp": false,
10280
- "multiple": false,
10281
- "type": "option"
10282
- },
10283
- "type": {
10284
- "description": "GraphQL type",
10285
- "name": "type",
10286
- "hasDynamicHelp": false,
10287
- "multiple": false,
10288
- "type": "option"
10289
10275
  }
10290
10276
  },
10291
10277
  "hasDynamicHelp": false,
10292
10278
  "hiddenAliases": [],
10293
- "id": "data:visual:create",
10279
+ "id": "data:theme:create",
10294
10280
  "pluginAlias": "@dataworks-technology/cli",
10295
10281
  "pluginName": "@dataworks-technology/cli",
10296
10282
  "pluginType": "core",
@@ -10300,14 +10286,14 @@
10300
10286
  "dist",
10301
10287
  "commands",
10302
10288
  "data",
10303
- "visual",
10289
+ "theme",
10304
10290
  "create.js"
10305
10291
  ]
10306
10292
  },
10307
- "data:visual:delete": {
10293
+ "data:theme:delete": {
10308
10294
  "aliases": [],
10309
10295
  "args": {},
10310
- "description": "Run the deleteVisual GraphQL mutation",
10296
+ "description": "Run the deleteTheme GraphQL mutation",
10311
10297
  "flags": {
10312
10298
  "input": {
10313
10299
  "description": "Input JSON, @file, or - for stdin",
@@ -10366,7 +10352,7 @@
10366
10352
  },
10367
10353
  "hasDynamicHelp": false,
10368
10354
  "hiddenAliases": [],
10369
- "id": "data:visual:delete",
10355
+ "id": "data:theme:delete",
10370
10356
  "pluginAlias": "@dataworks-technology/cli",
10371
10357
  "pluginName": "@dataworks-technology/cli",
10372
10358
  "pluginType": "core",
@@ -10376,14 +10362,14 @@
10376
10362
  "dist",
10377
10363
  "commands",
10378
10364
  "data",
10379
- "visual",
10365
+ "theme",
10380
10366
  "delete.js"
10381
10367
  ]
10382
10368
  },
10383
- "data:visual:get": {
10369
+ "data:theme:get": {
10384
10370
  "aliases": [],
10385
10371
  "args": {},
10386
- "description": "Run the getVisual GraphQL query",
10372
+ "description": "Run the getTheme GraphQL query",
10387
10373
  "flags": {
10388
10374
  "input": {
10389
10375
  "description": "Input JSON, @file, or - for stdin",
@@ -10435,7 +10421,7 @@
10435
10421
  },
10436
10422
  "hasDynamicHelp": false,
10437
10423
  "hiddenAliases": [],
10438
- "id": "data:visual:get",
10424
+ "id": "data:theme:get",
10439
10425
  "pluginAlias": "@dataworks-technology/cli",
10440
10426
  "pluginName": "@dataworks-technology/cli",
10441
10427
  "pluginType": "core",
@@ -10445,14 +10431,14 @@
10445
10431
  "dist",
10446
10432
  "commands",
10447
10433
  "data",
10448
- "visual",
10434
+ "theme",
10449
10435
  "get.js"
10450
10436
  ]
10451
10437
  },
10452
- "data:visual:list": {
10438
+ "data:theme:list": {
10453
10439
  "aliases": [],
10454
10440
  "args": {},
10455
- "description": "Run the listVisuals GraphQL query",
10441
+ "description": "Run the listThemes GraphQL query",
10456
10442
  "flags": {
10457
10443
  "input": {
10458
10444
  "description": "Input JSON, @file, or - for stdin",
@@ -10525,7 +10511,7 @@
10525
10511
  },
10526
10512
  "hasDynamicHelp": false,
10527
10513
  "hiddenAliases": [],
10528
- "id": "data:visual:list",
10514
+ "id": "data:theme:list",
10529
10515
  "pluginAlias": "@dataworks-technology/cli",
10530
10516
  "pluginName": "@dataworks-technology/cli",
10531
10517
  "pluginType": "core",
@@ -10535,14 +10521,14 @@
10535
10521
  "dist",
10536
10522
  "commands",
10537
10523
  "data",
10538
- "visual",
10524
+ "theme",
10539
10525
  "list.js"
10540
10526
  ]
10541
10527
  },
10542
- "data:visual:update": {
10528
+ "data:theme:update": {
10543
10529
  "aliases": [],
10544
10530
  "args": {},
10545
- "description": "Run the updateVisual GraphQL mutation",
10531
+ "description": "Run the updateTheme GraphQL mutation",
10546
10532
  "flags": {
10547
10533
  "input": {
10548
10534
  "description": "Input JSON, @file, or - for stdin",
@@ -10619,20 +10605,6 @@
10619
10605
  "multiple": false,
10620
10606
  "type": "option"
10621
10607
  },
10622
- "theme-public-id": {
10623
- "description": "GraphQL themePublicId",
10624
- "name": "theme-public-id",
10625
- "hasDynamicHelp": false,
10626
- "multiple": false,
10627
- "type": "option"
10628
- },
10629
- "type": {
10630
- "description": "GraphQL type",
10631
- "name": "type",
10632
- "hasDynamicHelp": false,
10633
- "multiple": false,
10634
- "type": "option"
10635
- },
10636
10608
  "updated-at": {
10637
10609
  "description": "GraphQL updatedAt",
10638
10610
  "name": "updated-at",
@@ -10643,7 +10615,7 @@
10643
10615
  },
10644
10616
  "hasDynamicHelp": false,
10645
10617
  "hiddenAliases": [],
10646
- "id": "data:visual:update",
10618
+ "id": "data:theme:update",
10647
10619
  "pluginAlias": "@dataworks-technology/cli",
10648
10620
  "pluginName": "@dataworks-technology/cli",
10649
10621
  "pluginType": "core",
@@ -10653,14 +10625,14 @@
10653
10625
  "dist",
10654
10626
  "commands",
10655
10627
  "data",
10656
- "visual",
10628
+ "theme",
10657
10629
  "update.js"
10658
10630
  ]
10659
10631
  },
10660
- "data:visual:watch-create": {
10632
+ "data:theme:watch-create": {
10661
10633
  "aliases": [],
10662
10634
  "args": {},
10663
- "description": "Run the onCreateVisual GraphQL subscription",
10635
+ "description": "Run the onCreateTheme GraphQL subscription",
10664
10636
  "flags": {
10665
10637
  "input": {
10666
10638
  "description": "Input JSON, @file, or - for stdin",
@@ -10709,18 +10681,11 @@
10709
10681
  "hasDynamicHelp": false,
10710
10682
  "multiple": false,
10711
10683
  "type": "option"
10712
- },
10713
- "type": {
10714
- "description": "GraphQL type",
10715
- "name": "type",
10716
- "hasDynamicHelp": false,
10717
- "multiple": false,
10718
- "type": "option"
10719
10684
  }
10720
10685
  },
10721
10686
  "hasDynamicHelp": false,
10722
10687
  "hiddenAliases": [],
10723
- "id": "data:visual:watch-create",
10688
+ "id": "data:theme:watch-create",
10724
10689
  "pluginAlias": "@dataworks-technology/cli",
10725
10690
  "pluginName": "@dataworks-technology/cli",
10726
10691
  "pluginType": "core",
@@ -10730,14 +10695,14 @@
10730
10695
  "dist",
10731
10696
  "commands",
10732
10697
  "data",
10733
- "visual",
10698
+ "theme",
10734
10699
  "watch-create.js"
10735
10700
  ]
10736
10701
  },
10737
- "data:visual:watch-delete": {
10702
+ "data:theme:watch-delete": {
10738
10703
  "aliases": [],
10739
10704
  "args": {},
10740
- "description": "Run the onDeleteVisual GraphQL subscription",
10705
+ "description": "Run the onDeleteTheme GraphQL subscription",
10741
10706
  "flags": {
10742
10707
  "input": {
10743
10708
  "description": "Input JSON, @file, or - for stdin",
@@ -10786,18 +10751,11 @@
10786
10751
  "hasDynamicHelp": false,
10787
10752
  "multiple": false,
10788
10753
  "type": "option"
10789
- },
10790
- "type": {
10791
- "description": "GraphQL type",
10792
- "name": "type",
10793
- "hasDynamicHelp": false,
10794
- "multiple": false,
10795
- "type": "option"
10796
10754
  }
10797
10755
  },
10798
10756
  "hasDynamicHelp": false,
10799
10757
  "hiddenAliases": [],
10800
- "id": "data:visual:watch-delete",
10758
+ "id": "data:theme:watch-delete",
10801
10759
  "pluginAlias": "@dataworks-technology/cli",
10802
10760
  "pluginName": "@dataworks-technology/cli",
10803
10761
  "pluginType": "core",
@@ -10807,14 +10765,14 @@
10807
10765
  "dist",
10808
10766
  "commands",
10809
10767
  "data",
10810
- "visual",
10768
+ "theme",
10811
10769
  "watch-delete.js"
10812
10770
  ]
10813
10771
  },
10814
- "data:visual:watch-update": {
10772
+ "data:theme:watch-update": {
10815
10773
  "aliases": [],
10816
10774
  "args": {},
10817
- "description": "Run the onUpdateVisual GraphQL subscription",
10775
+ "description": "Run the onUpdateTheme GraphQL subscription",
10818
10776
  "flags": {
10819
10777
  "input": {
10820
10778
  "description": "Input JSON, @file, or - for stdin",
@@ -10863,18 +10821,11 @@
10863
10821
  "hasDynamicHelp": false,
10864
10822
  "multiple": false,
10865
10823
  "type": "option"
10866
- },
10867
- "type": {
10868
- "description": "GraphQL type",
10869
- "name": "type",
10870
- "hasDynamicHelp": false,
10871
- "multiple": false,
10872
- "type": "option"
10873
10824
  }
10874
10825
  },
10875
10826
  "hasDynamicHelp": false,
10876
10827
  "hiddenAliases": [],
10877
- "id": "data:visual:watch-update",
10828
+ "id": "data:theme:watch-update",
10878
10829
  "pluginAlias": "@dataworks-technology/cli",
10879
10830
  "pluginName": "@dataworks-technology/cli",
10880
10831
  "pluginType": "core",
@@ -10884,14 +10835,14 @@
10884
10835
  "dist",
10885
10836
  "commands",
10886
10837
  "data",
10887
- "visual",
10838
+ "theme",
10888
10839
  "watch-update.js"
10889
10840
  ]
10890
10841
  },
10891
- "data:theme:create": {
10842
+ "data:visual:create": {
10892
10843
  "aliases": [],
10893
10844
  "args": {},
10894
- "description": "Run the createTheme GraphQL mutation",
10845
+ "description": "Run the createVisual GraphQL mutation",
10895
10846
  "flags": {
10896
10847
  "input": {
10897
10848
  "description": "Input JSON, @file, or - for stdin",
@@ -10946,11 +10897,25 @@
10946
10897
  "hasDynamicHelp": false,
10947
10898
  "multiple": false,
10948
10899
  "type": "option"
10900
+ },
10901
+ "theme-public-id": {
10902
+ "description": "GraphQL themePublicId",
10903
+ "name": "theme-public-id",
10904
+ "hasDynamicHelp": false,
10905
+ "multiple": false,
10906
+ "type": "option"
10907
+ },
10908
+ "type": {
10909
+ "description": "GraphQL type",
10910
+ "name": "type",
10911
+ "hasDynamicHelp": false,
10912
+ "multiple": false,
10913
+ "type": "option"
10949
10914
  }
10950
10915
  },
10951
10916
  "hasDynamicHelp": false,
10952
10917
  "hiddenAliases": [],
10953
- "id": "data:theme:create",
10918
+ "id": "data:visual:create",
10954
10919
  "pluginAlias": "@dataworks-technology/cli",
10955
10920
  "pluginName": "@dataworks-technology/cli",
10956
10921
  "pluginType": "core",
@@ -10960,14 +10925,14 @@
10960
10925
  "dist",
10961
10926
  "commands",
10962
10927
  "data",
10963
- "theme",
10928
+ "visual",
10964
10929
  "create.js"
10965
10930
  ]
10966
10931
  },
10967
- "data:theme:delete": {
10932
+ "data:visual:delete": {
10968
10933
  "aliases": [],
10969
10934
  "args": {},
10970
- "description": "Run the deleteTheme GraphQL mutation",
10935
+ "description": "Run the deleteVisual GraphQL mutation",
10971
10936
  "flags": {
10972
10937
  "input": {
10973
10938
  "description": "Input JSON, @file, or - for stdin",
@@ -11026,7 +10991,7 @@
11026
10991
  },
11027
10992
  "hasDynamicHelp": false,
11028
10993
  "hiddenAliases": [],
11029
- "id": "data:theme:delete",
10994
+ "id": "data:visual:delete",
11030
10995
  "pluginAlias": "@dataworks-technology/cli",
11031
10996
  "pluginName": "@dataworks-technology/cli",
11032
10997
  "pluginType": "core",
@@ -11036,14 +11001,14 @@
11036
11001
  "dist",
11037
11002
  "commands",
11038
11003
  "data",
11039
- "theme",
11004
+ "visual",
11040
11005
  "delete.js"
11041
11006
  ]
11042
11007
  },
11043
- "data:theme:get": {
11008
+ "data:visual:get": {
11044
11009
  "aliases": [],
11045
11010
  "args": {},
11046
- "description": "Run the getTheme GraphQL query",
11011
+ "description": "Run the getVisual GraphQL query",
11047
11012
  "flags": {
11048
11013
  "input": {
11049
11014
  "description": "Input JSON, @file, or - for stdin",
@@ -11095,7 +11060,7 @@
11095
11060
  },
11096
11061
  "hasDynamicHelp": false,
11097
11062
  "hiddenAliases": [],
11098
- "id": "data:theme:get",
11063
+ "id": "data:visual:get",
11099
11064
  "pluginAlias": "@dataworks-technology/cli",
11100
11065
  "pluginName": "@dataworks-technology/cli",
11101
11066
  "pluginType": "core",
@@ -11105,14 +11070,14 @@
11105
11070
  "dist",
11106
11071
  "commands",
11107
11072
  "data",
11108
- "theme",
11073
+ "visual",
11109
11074
  "get.js"
11110
11075
  ]
11111
11076
  },
11112
- "data:theme:list": {
11077
+ "data:visual:list": {
11113
11078
  "aliases": [],
11114
11079
  "args": {},
11115
- "description": "Run the listThemes GraphQL query",
11080
+ "description": "Run the listVisuals GraphQL query",
11116
11081
  "flags": {
11117
11082
  "input": {
11118
11083
  "description": "Input JSON, @file, or - for stdin",
@@ -11185,7 +11150,7 @@
11185
11150
  },
11186
11151
  "hasDynamicHelp": false,
11187
11152
  "hiddenAliases": [],
11188
- "id": "data:theme:list",
11153
+ "id": "data:visual:list",
11189
11154
  "pluginAlias": "@dataworks-technology/cli",
11190
11155
  "pluginName": "@dataworks-technology/cli",
11191
11156
  "pluginType": "core",
@@ -11195,14 +11160,14 @@
11195
11160
  "dist",
11196
11161
  "commands",
11197
11162
  "data",
11198
- "theme",
11163
+ "visual",
11199
11164
  "list.js"
11200
11165
  ]
11201
11166
  },
11202
- "data:theme:update": {
11167
+ "data:visual:update": {
11203
11168
  "aliases": [],
11204
11169
  "args": {},
11205
- "description": "Run the updateTheme GraphQL mutation",
11170
+ "description": "Run the updateVisual GraphQL mutation",
11206
11171
  "flags": {
11207
11172
  "input": {
11208
11173
  "description": "Input JSON, @file, or - for stdin",
@@ -11279,6 +11244,20 @@
11279
11244
  "multiple": false,
11280
11245
  "type": "option"
11281
11246
  },
11247
+ "theme-public-id": {
11248
+ "description": "GraphQL themePublicId",
11249
+ "name": "theme-public-id",
11250
+ "hasDynamicHelp": false,
11251
+ "multiple": false,
11252
+ "type": "option"
11253
+ },
11254
+ "type": {
11255
+ "description": "GraphQL type",
11256
+ "name": "type",
11257
+ "hasDynamicHelp": false,
11258
+ "multiple": false,
11259
+ "type": "option"
11260
+ },
11282
11261
  "updated-at": {
11283
11262
  "description": "GraphQL updatedAt",
11284
11263
  "name": "updated-at",
@@ -11289,7 +11268,7 @@
11289
11268
  },
11290
11269
  "hasDynamicHelp": false,
11291
11270
  "hiddenAliases": [],
11292
- "id": "data:theme:update",
11271
+ "id": "data:visual:update",
11293
11272
  "pluginAlias": "@dataworks-technology/cli",
11294
11273
  "pluginName": "@dataworks-technology/cli",
11295
11274
  "pluginType": "core",
@@ -11299,14 +11278,14 @@
11299
11278
  "dist",
11300
11279
  "commands",
11301
11280
  "data",
11302
- "theme",
11281
+ "visual",
11303
11282
  "update.js"
11304
11283
  ]
11305
11284
  },
11306
- "data:theme:watch-create": {
11285
+ "data:visual:watch-create": {
11307
11286
  "aliases": [],
11308
11287
  "args": {},
11309
- "description": "Run the onCreateTheme GraphQL subscription",
11288
+ "description": "Run the onCreateVisual GraphQL subscription",
11310
11289
  "flags": {
11311
11290
  "input": {
11312
11291
  "description": "Input JSON, @file, or - for stdin",
@@ -11355,11 +11334,18 @@
11355
11334
  "hasDynamicHelp": false,
11356
11335
  "multiple": false,
11357
11336
  "type": "option"
11337
+ },
11338
+ "type": {
11339
+ "description": "GraphQL type",
11340
+ "name": "type",
11341
+ "hasDynamicHelp": false,
11342
+ "multiple": false,
11343
+ "type": "option"
11358
11344
  }
11359
11345
  },
11360
11346
  "hasDynamicHelp": false,
11361
11347
  "hiddenAliases": [],
11362
- "id": "data:theme:watch-create",
11348
+ "id": "data:visual:watch-create",
11363
11349
  "pluginAlias": "@dataworks-technology/cli",
11364
11350
  "pluginName": "@dataworks-technology/cli",
11365
11351
  "pluginType": "core",
@@ -11369,14 +11355,14 @@
11369
11355
  "dist",
11370
11356
  "commands",
11371
11357
  "data",
11372
- "theme",
11358
+ "visual",
11373
11359
  "watch-create.js"
11374
11360
  ]
11375
11361
  },
11376
- "data:theme:watch-delete": {
11362
+ "data:visual:watch-delete": {
11377
11363
  "aliases": [],
11378
11364
  "args": {},
11379
- "description": "Run the onDeleteTheme GraphQL subscription",
11365
+ "description": "Run the onDeleteVisual GraphQL subscription",
11380
11366
  "flags": {
11381
11367
  "input": {
11382
11368
  "description": "Input JSON, @file, or - for stdin",
@@ -11425,11 +11411,18 @@
11425
11411
  "hasDynamicHelp": false,
11426
11412
  "multiple": false,
11427
11413
  "type": "option"
11414
+ },
11415
+ "type": {
11416
+ "description": "GraphQL type",
11417
+ "name": "type",
11418
+ "hasDynamicHelp": false,
11419
+ "multiple": false,
11420
+ "type": "option"
11428
11421
  }
11429
11422
  },
11430
11423
  "hasDynamicHelp": false,
11431
11424
  "hiddenAliases": [],
11432
- "id": "data:theme:watch-delete",
11425
+ "id": "data:visual:watch-delete",
11433
11426
  "pluginAlias": "@dataworks-technology/cli",
11434
11427
  "pluginName": "@dataworks-technology/cli",
11435
11428
  "pluginType": "core",
@@ -11439,14 +11432,14 @@
11439
11432
  "dist",
11440
11433
  "commands",
11441
11434
  "data",
11442
- "theme",
11435
+ "visual",
11443
11436
  "watch-delete.js"
11444
11437
  ]
11445
11438
  },
11446
- "data:theme:watch-update": {
11439
+ "data:visual:watch-update": {
11447
11440
  "aliases": [],
11448
11441
  "args": {},
11449
- "description": "Run the onUpdateTheme GraphQL subscription",
11442
+ "description": "Run the onUpdateVisual GraphQL subscription",
11450
11443
  "flags": {
11451
11444
  "input": {
11452
11445
  "description": "Input JSON, @file, or - for stdin",
@@ -11495,11 +11488,18 @@
11495
11488
  "hasDynamicHelp": false,
11496
11489
  "multiple": false,
11497
11490
  "type": "option"
11491
+ },
11492
+ "type": {
11493
+ "description": "GraphQL type",
11494
+ "name": "type",
11495
+ "hasDynamicHelp": false,
11496
+ "multiple": false,
11497
+ "type": "option"
11498
11498
  }
11499
11499
  },
11500
11500
  "hasDynamicHelp": false,
11501
11501
  "hiddenAliases": [],
11502
- "id": "data:theme:watch-update",
11502
+ "id": "data:visual:watch-update",
11503
11503
  "pluginAlias": "@dataworks-technology/cli",
11504
11504
  "pluginName": "@dataworks-technology/cli",
11505
11505
  "pluginType": "core",
@@ -11509,10 +11509,10 @@
11509
11509
  "dist",
11510
11510
  "commands",
11511
11511
  "data",
11512
- "theme",
11512
+ "visual",
11513
11513
  "watch-update.js"
11514
11514
  ]
11515
11515
  }
11516
11516
  },
11517
- "version": "1.0.2"
11517
+ "version": "1.1.0"
11518
11518
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataworks-technology/cli",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "The official command-line interface for the Dataworks Data Engine",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,17 +1,46 @@
1
1
  ---
2
2
  name: dataworks-cli
3
- description: Use the Dataworks `dw` CLI safely for public Data Engine queries, mutations, ingest, error reporting, and subscriptions.
3
+ description: Route every request to inspect, query, create, update, delete, ingest, monitor, subscribe to, or otherwise act on Dataworks through the `dw` CLI. Use whenever a user asks for any action involving Dataworks data, tenants, authentication, the Data Engine API, events, adaptors, datasets, or related resources.
4
4
  ---
5
5
 
6
6
  # Dataworks CLI
7
7
 
8
- Use `dw commands --json` to discover the installed command contract and
9
- `dw <command> --help` before constructing a call. Prefer generated `dw data ...`
10
- commands over raw GraphQL.
8
+ Use `dw` as the operational interface for every Dataworks action. Do not call a
9
+ Dataworks HTTP or GraphQL endpoint directly, or use an SDK instead, when the CLI
10
+ can perform the action.
11
11
 
12
- Authenticate with `dw auth login --environment uat|live`. Never print, log, or
13
- write `DW_PASSWORD`, `DW_SESSION_JSON`, tokens, or API keys. Use `--json` for
14
- finite machine-readable results; parse subscriptions as NDJSON.
12
+ ## Route the request
13
+
14
+ 1. Run `dw --version` to verify the CLI is available. If it is missing, ask to
15
+ install it with `npm install --global @dataworks-technology/cli`.
16
+ 2. Run `dw commands --json` to discover the installed command contract.
17
+ 3. Run `dw <command> --help` before constructing the exact call.
18
+ 4. Prefer the narrowest matching command:
19
+ - Data Engine entities: `dw data ...`
20
+ - Authentication and session state: `dw auth ...`
21
+ - Tenant discovery and persistence: `dw tenant select ...`
22
+ - Metric ingestion: `dw ingest`
23
+ - Realtime events: `dw events subscribe`
24
+ - Datasource errors: `dw report-error`
25
+ - Raw GraphQL: `dw graphql ...`, only when no generated command exists
26
+ 5. If no CLI command supports the request, report the missing capability and
27
+ ask before using any non-CLI alternative.
28
+
29
+ ## Authenticate and select a tenant
30
+
31
+ Authenticate with `dw auth login --environment uat|live` and inspect the session
32
+ with `dw auth status --json`. Never print, log, or write `DW_PASSWORD`,
33
+ `DW_SESSION_JSON`, tokens, or API keys.
34
+
35
+ Use `dw tenant select --json` to list authorized tenants, `dw tenant select` for
36
+ interactive selection, or `dw tenant select <id>` for a direct selection. The
37
+ selected tenant persists for subsequent commands. Use `--tenant` only for an
38
+ explicit one-command override.
39
+
40
+ ## Execute safely
41
+
42
+ Use `--json` for finite machine-readable results. Treat subscription output as
43
+ NDJSON and process it incrementally.
15
44
 
16
45
  Before any mutation:
17
46
 
@@ -21,6 +50,8 @@ Before any mutation:
21
50
  3. Add `--yes` only after approval. Never infer approval from the presence of
22
51
  credentials.
23
52
 
24
- Use `--tenant` only when the user explicitly requests an authorized tenant
25
- override. For bulk ingest, default to strict validation; use `--best-effort`
26
- only when dropping invalid metrics is acceptable and report all dropped items.
53
+ For bulk ingest, default to strict validation. Use `--best-effort` only when
54
+ dropping invalid metrics is acceptable, and report every dropped item.
55
+
56
+ Report the command used, the selected environment and tenant when relevant, and
57
+ the result without exposing credentials or unredacted sensitive values.