proca 0.1.2 → 0.2.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
@@ -18,7 +18,7 @@ $ npm install -g proca
18
18
  $ proca COMMAND
19
19
  running command...
20
20
  $ proca (--version)
21
- proca/0.1.2 linux-x64 node-v20.12.2
21
+ proca/0.2.0 linux-x64 node-v20.12.2
22
22
  $ proca --help [COMMAND]
23
23
  USAGE
24
24
  $ proca COMMAND
@@ -50,11 +50,87 @@ USAGE
50
50
 
51
51
  # Commands
52
52
  <!-- commands -->
53
+ * [`proca action list [TITLE]`](#proca-action-list-title)
54
+ * [`proca campaign delete`](#proca-campaign-delete)
53
55
  * [`proca campaign get`](#proca-campaign-get)
54
56
  * [`proca campaign list [TITLE]`](#proca-campaign-list-title)
55
57
  * [`proca config add [ENVIRONMENT]`](#proca-config-add-environment)
58
+ * [`proca config get`](#proca-config-get)
56
59
  * [`proca config setup [ENVIRONMENT]`](#proca-config-setup-environment)
60
+ * [`proca config user`](#proca-config-user)
61
+ * [`proca help [COMMAND]`](#proca-help-command)
62
+ * [`proca org add`](#proca-org-add)
57
63
  * [`proca org get`](#proca-org-get)
64
+ * [`proca org join`](#proca-org-join)
65
+ * [`proca plugins`](#proca-plugins)
66
+ * [`proca plugins add PLUGIN`](#proca-plugins-add-plugin)
67
+ * [`proca plugins:inspect PLUGIN...`](#proca-pluginsinspect-plugin)
68
+ * [`proca plugins install PLUGIN`](#proca-plugins-install-plugin)
69
+ * [`proca plugins link PATH`](#proca-plugins-link-path)
70
+ * [`proca plugins remove [PLUGIN]`](#proca-plugins-remove-plugin)
71
+ * [`proca plugins reset`](#proca-plugins-reset)
72
+ * [`proca plugins uninstall [PLUGIN]`](#proca-plugins-uninstall-plugin)
73
+ * [`proca plugins unlink [PLUGIN]`](#proca-plugins-unlink-plugin)
74
+ * [`proca plugins update`](#proca-plugins-update)
75
+ * [`proca user get`](#proca-user-get)
76
+ * [`proca user leave`](#proca-user-leave)
77
+ * [`proca user list`](#proca-user-list)
78
+ * [`proca widget list`](#proca-widget-list)
79
+
80
+ ## `proca action list [TITLE]`
81
+
82
+ ```
83
+ USAGE
84
+ $ proca action list [TITLE] -o <organisation name> [--simplify [--json | --csv |
85
+ --table]] [-c <campaign title>] [--limit <value>] [--optin] [--testing] [--doi] [--utm]
86
+
87
+ ARGUMENTS
88
+ TITLE name of the campaign, % for wildchar
89
+
90
+ FLAGS
91
+ -c, --campaign=<campaign title> name of the campaign, % for wildchar
92
+ -o, --org=<organisation name> (required) campaigns of the organisation (coordinator or partner)
93
+ --doi only export the double optin actions
94
+ --limit=<value> max number of actions
95
+ --optin only export the optin actions
96
+ --testing also export the test actions
97
+ --[no-]utm display the utm tracking parameters
98
+
99
+ OUTPUT FLAGS
100
+ --csv Format output as csv
101
+ --json Format output as json
102
+ --simplify flatten and filter to output only the most important attributes
103
+ --table Format output as table [default]
104
+
105
+ EXAMPLES
106
+ $ proca action list %pizza%
107
+ ```
108
+
109
+ ## `proca campaign delete`
110
+
111
+ delete a campaign
112
+
113
+ ```
114
+ USAGE
115
+ $ proca campaign delete [--simplify [--json | --csv | --table]] [-i <organisation name>]
116
+ [-n <campaign name>]
117
+
118
+ FLAGS
119
+ -i, --id=<organisation name> id of the campaign
120
+ -n, --name=<campaign name> name of the campaign
121
+
122
+ OUTPUT FLAGS
123
+ --csv Format output as csv
124
+ --json Format output as json
125
+ --simplify flatten and filter to output only the most important attributes
126
+ --table Format output as table [default]
127
+
128
+ DESCRIPTION
129
+ delete a campaign
130
+
131
+ EXAMPLES
132
+ $ proca campaign delete -i 42
133
+ ```
58
134
 
59
135
  ## `proca campaign get`
60
136
 
@@ -92,7 +168,7 @@ list all the campaigns
92
168
  ```
93
169
  USAGE
94
170
  $ proca campaign list [TITLE] [--simplify [--json | --csv | --table]] [-o <organisation
95
- name> | -t <campaign title>] [--stats]
171
+ name>] [-t <campaign title>] [--stats]
96
172
 
97
173
  ARGUMENTS
98
174
  TITLE name of the campaign, % for wildchar
@@ -153,6 +229,24 @@ EXAMPLES
153
229
  $ proca config add --user=xavier@example.org --token=API-12345789
154
230
  ```
155
231
 
232
+ ## `proca config get`
233
+
234
+ get the server config
235
+
236
+ ```
237
+ USAGE
238
+ $ proca config get [--simplify [--json | --csv | --table]]
239
+
240
+ OUTPUT FLAGS
241
+ --csv Format output as csv
242
+ --json Format output as json
243
+ --simplify flatten and filter to output only the most important attributes
244
+ --table Format output as table [default]
245
+
246
+ DESCRIPTION
247
+ get the server config
248
+ ```
249
+
156
250
  ## `proca config setup [ENVIRONMENT]`
157
251
 
158
252
  create setting to access the server authentication
@@ -191,6 +285,68 @@ EXAMPLES
191
285
  $ proca config setup --user=xavier@example.org --token=API-12345789
192
286
  ```
193
287
 
288
+ ## `proca config user`
289
+
290
+ fetch the information about the current user (based on the token)
291
+
292
+ ```
293
+ USAGE
294
+ $ proca config user [--simplify [--json | --csv | --table]]
295
+
296
+ OUTPUT FLAGS
297
+ --csv Format output as csv
298
+ --json Format output as json
299
+ --simplify flatten and filter to output only the most important attributes
300
+ --table Format output as table [default]
301
+
302
+ DESCRIPTION
303
+ fetch the information about the current user (based on the token)
304
+
305
+ EXAMPLES
306
+ $ proca config user
307
+ ```
308
+
309
+ ## `proca help [COMMAND]`
310
+
311
+ Display help for proca.
312
+
313
+ ```
314
+ USAGE
315
+ $ proca help [COMMAND...] [-n]
316
+
317
+ ARGUMENTS
318
+ COMMAND... Command to show help for.
319
+
320
+ FLAGS
321
+ -n, --nested-commands Include all nested commands in the output.
322
+
323
+ DESCRIPTION
324
+ Display help for proca.
325
+ ```
326
+
327
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.14/src/commands/help.ts)_
328
+
329
+ ## `proca org add`
330
+
331
+ ```
332
+ USAGE
333
+ $ proca org add [--simplify [--json | --csv | --table]] [--twitter <screen name>]
334
+ [-n <org name>]
335
+
336
+ FLAGS
337
+ -n, --name=<org name> name of the org
338
+ --twitter=<screen name> twitter account
339
+
340
+ OUTPUT FLAGS
341
+ --csv Format output as csv
342
+ --json Format output as json
343
+ --simplify flatten and filter to output only the most important attributes
344
+ --table Format output as table [default]
345
+
346
+ EXAMPLES
347
+ $ proca org add --twitter <twitter of the organisation>
348
+ ```
349
+
194
350
  ## `proca org get`
195
351
 
196
352
  view a org
@@ -220,4 +376,426 @@ DESCRIPTION
220
376
  EXAMPLES
221
377
  $ proca org get <name of the ngo>
222
378
  ```
379
+
380
+ ## `proca org join`
381
+
382
+ let a user join an organisation with a role
383
+
384
+ ```
385
+ USAGE
386
+ $ proca org join [--simplify [--json | --csv | --table]] [--user <value>] [--role
387
+ owner|campaigner|coordinator|translator] [-o <org name>]
388
+
389
+ FLAGS
390
+ -o, --org=<org name> name of the org
391
+ --role=<option> permission level in that org
392
+ <options: owner|campaigner|coordinator|translator>
393
+ --user=<value> user email
394
+
395
+ OUTPUT FLAGS
396
+ --csv Format output as csv
397
+ --json Format output as json
398
+ --simplify flatten and filter to output only the most important attributes
399
+ --table Format output as table [default]
400
+
401
+ DESCRIPTION
402
+ let a user join an organisation with a role
403
+
404
+ EXAMPLES
405
+ $ proca org join
406
+ ```
407
+
408
+ ## `proca plugins`
409
+
410
+ List installed plugins.
411
+
412
+ ```
413
+ USAGE
414
+ $ proca plugins [--json] [--core]
415
+
416
+ FLAGS
417
+ --core Show core plugins.
418
+
419
+ GLOBAL FLAGS
420
+ --json Format output as json.
421
+
422
+ DESCRIPTION
423
+ List installed plugins.
424
+
425
+ EXAMPLES
426
+ $ proca plugins
427
+ ```
428
+
429
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/index.ts)_
430
+
431
+ ## `proca plugins add PLUGIN`
432
+
433
+ Installs a plugin into proca.
434
+
435
+ ```
436
+ USAGE
437
+ $ proca plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
438
+
439
+ ARGUMENTS
440
+ PLUGIN... Plugin to install.
441
+
442
+ FLAGS
443
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
444
+ -h, --help Show CLI help.
445
+ -s, --silent Silences npm output.
446
+ -v, --verbose Show verbose npm output.
447
+
448
+ GLOBAL FLAGS
449
+ --json Format output as json.
450
+
451
+ DESCRIPTION
452
+ Installs a plugin into proca.
453
+
454
+ Uses npm to install plugins.
455
+
456
+ Installation of a user-installed plugin will override a core plugin.
457
+
458
+ Use the PROCA_NPM_LOG_LEVEL environment variable to set the npm loglevel.
459
+ Use the PROCA_NPM_REGISTRY environment variable to set the npm registry.
460
+
461
+ ALIASES
462
+ $ proca plugins add
463
+
464
+ EXAMPLES
465
+ Install a plugin from npm registry.
466
+
467
+ $ proca plugins add myplugin
468
+
469
+ Install a plugin from a github url.
470
+
471
+ $ proca plugins add https://github.com/someuser/someplugin
472
+
473
+ Install a plugin from a github slug.
474
+
475
+ $ proca plugins add someuser/someplugin
476
+ ```
477
+
478
+ ## `proca plugins:inspect PLUGIN...`
479
+
480
+ Displays installation properties of a plugin.
481
+
482
+ ```
483
+ USAGE
484
+ $ proca plugins inspect PLUGIN...
485
+
486
+ ARGUMENTS
487
+ PLUGIN... [default: .] Plugin to inspect.
488
+
489
+ FLAGS
490
+ -h, --help Show CLI help.
491
+ -v, --verbose
492
+
493
+ GLOBAL FLAGS
494
+ --json Format output as json.
495
+
496
+ DESCRIPTION
497
+ Displays installation properties of a plugin.
498
+
499
+ EXAMPLES
500
+ $ proca plugins inspect myplugin
501
+ ```
502
+
503
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/inspect.ts)_
504
+
505
+ ## `proca plugins install PLUGIN`
506
+
507
+ Installs a plugin into proca.
508
+
509
+ ```
510
+ USAGE
511
+ $ proca plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
512
+
513
+ ARGUMENTS
514
+ PLUGIN... Plugin to install.
515
+
516
+ FLAGS
517
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
518
+ -h, --help Show CLI help.
519
+ -s, --silent Silences npm output.
520
+ -v, --verbose Show verbose npm output.
521
+
522
+ GLOBAL FLAGS
523
+ --json Format output as json.
524
+
525
+ DESCRIPTION
526
+ Installs a plugin into proca.
527
+
528
+ Uses npm to install plugins.
529
+
530
+ Installation of a user-installed plugin will override a core plugin.
531
+
532
+ Use the PROCA_NPM_LOG_LEVEL environment variable to set the npm loglevel.
533
+ Use the PROCA_NPM_REGISTRY environment variable to set the npm registry.
534
+
535
+ ALIASES
536
+ $ proca plugins add
537
+
538
+ EXAMPLES
539
+ Install a plugin from npm registry.
540
+
541
+ $ proca plugins install myplugin
542
+
543
+ Install a plugin from a github url.
544
+
545
+ $ proca plugins install https://github.com/someuser/someplugin
546
+
547
+ Install a plugin from a github slug.
548
+
549
+ $ proca plugins install someuser/someplugin
550
+ ```
551
+
552
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/install.ts)_
553
+
554
+ ## `proca plugins link PATH`
555
+
556
+ Links a plugin into the CLI for development.
557
+
558
+ ```
559
+ USAGE
560
+ $ proca plugins link PATH [-h] [--install] [-v]
561
+
562
+ ARGUMENTS
563
+ PATH [default: .] path to plugin
564
+
565
+ FLAGS
566
+ -h, --help Show CLI help.
567
+ -v, --verbose
568
+ --[no-]install Install dependencies after linking the plugin.
569
+
570
+ DESCRIPTION
571
+ Links a plugin into the CLI for development.
572
+
573
+ Installation of a linked plugin will override a user-installed or core plugin.
574
+
575
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
576
+ command will override the user-installed or core plugin implementation. This is useful for development work.
577
+
578
+
579
+ EXAMPLES
580
+ $ proca plugins link myplugin
581
+ ```
582
+
583
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/link.ts)_
584
+
585
+ ## `proca plugins remove [PLUGIN]`
586
+
587
+ Removes a plugin from the CLI.
588
+
589
+ ```
590
+ USAGE
591
+ $ proca plugins remove [PLUGIN...] [-h] [-v]
592
+
593
+ ARGUMENTS
594
+ PLUGIN... plugin to uninstall
595
+
596
+ FLAGS
597
+ -h, --help Show CLI help.
598
+ -v, --verbose
599
+
600
+ DESCRIPTION
601
+ Removes a plugin from the CLI.
602
+
603
+ ALIASES
604
+ $ proca plugins unlink
605
+ $ proca plugins remove
606
+
607
+ EXAMPLES
608
+ $ proca plugins remove myplugin
609
+ ```
610
+
611
+ ## `proca plugins reset`
612
+
613
+ Remove all user-installed and linked plugins.
614
+
615
+ ```
616
+ USAGE
617
+ $ proca plugins reset [--hard] [--reinstall]
618
+
619
+ FLAGS
620
+ --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
621
+ --reinstall Reinstall all plugins after uninstalling.
622
+ ```
623
+
624
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/reset.ts)_
625
+
626
+ ## `proca plugins uninstall [PLUGIN]`
627
+
628
+ Removes a plugin from the CLI.
629
+
630
+ ```
631
+ USAGE
632
+ $ proca plugins uninstall [PLUGIN...] [-h] [-v]
633
+
634
+ ARGUMENTS
635
+ PLUGIN... plugin to uninstall
636
+
637
+ FLAGS
638
+ -h, --help Show CLI help.
639
+ -v, --verbose
640
+
641
+ DESCRIPTION
642
+ Removes a plugin from the CLI.
643
+
644
+ ALIASES
645
+ $ proca plugins unlink
646
+ $ proca plugins remove
647
+
648
+ EXAMPLES
649
+ $ proca plugins uninstall myplugin
650
+ ```
651
+
652
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/uninstall.ts)_
653
+
654
+ ## `proca plugins unlink [PLUGIN]`
655
+
656
+ Removes a plugin from the CLI.
657
+
658
+ ```
659
+ USAGE
660
+ $ proca plugins unlink [PLUGIN...] [-h] [-v]
661
+
662
+ ARGUMENTS
663
+ PLUGIN... plugin to uninstall
664
+
665
+ FLAGS
666
+ -h, --help Show CLI help.
667
+ -v, --verbose
668
+
669
+ DESCRIPTION
670
+ Removes a plugin from the CLI.
671
+
672
+ ALIASES
673
+ $ proca plugins unlink
674
+ $ proca plugins remove
675
+
676
+ EXAMPLES
677
+ $ proca plugins unlink myplugin
678
+ ```
679
+
680
+ ## `proca plugins update`
681
+
682
+ Update installed plugins.
683
+
684
+ ```
685
+ USAGE
686
+ $ proca plugins update [-h] [-v]
687
+
688
+ FLAGS
689
+ -h, --help Show CLI help.
690
+ -v, --verbose
691
+
692
+ DESCRIPTION
693
+ Update installed plugins.
694
+ ```
695
+
696
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/update.ts)_
697
+
698
+ ## `proca user get`
699
+
700
+ fetch the information about a user
701
+
702
+ ```
703
+ USAGE
704
+ $ proca user get [--simplify [--json | --csv | --table]] [--email <value>] [-o <org
705
+ name>] [-i <value>]
706
+
707
+ FLAGS
708
+ -i, --id=<value> id of the user
709
+ -o, --org=<org name> name of the org
710
+ --email=<value> user email
711
+
712
+ OUTPUT FLAGS
713
+ --csv Format output as csv
714
+ --json Format output as json
715
+ --simplify flatten and filter to output only the most important attributes
716
+ --table Format output as table [default]
717
+
718
+ DESCRIPTION
719
+ fetch the information about a user
720
+
721
+ EXAMPLES
722
+ $ proca user get
723
+ ```
724
+
725
+ ## `proca user leave`
726
+
727
+ leave a org
728
+
729
+ ```
730
+ USAGE
731
+ $ proca user leave --email <user email> -o <org name> [--simplify [--json | --csv |
732
+ --table]]
733
+
734
+ FLAGS
735
+ -o, --org=<org name> (required) name of the org
736
+ --email=<user email> (required) email
737
+
738
+ OUTPUT FLAGS
739
+ --csv Format output as csv
740
+ --json Format output as json
741
+ --simplify flatten and filter to output only the most important attributes
742
+ --table Format output as table [default]
743
+
744
+ DESCRIPTION
745
+ leave a org
746
+
747
+ EXAMPLES
748
+ $ proca user leave -i 42
749
+ ```
750
+
751
+ ## `proca user list`
752
+
753
+ list all the users
754
+
755
+ ```
756
+ USAGE
757
+ $ proca user list -o <value> [--simplify [--json | --csv | --table]]
758
+
759
+ FLAGS
760
+ -o, --org=<value> (required) organisation
761
+
762
+ OUTPUT FLAGS
763
+ --csv Format output as csv
764
+ --json Format output as json
765
+ --simplify flatten and filter to output only the most important attributes
766
+ --table Format output as table [default]
767
+
768
+ DESCRIPTION
769
+ list all the users
770
+
771
+ EXAMPLES
772
+ $ proca user list %pizza%
773
+ ```
774
+
775
+ ## `proca widget list`
776
+
777
+ list all the widgets of an org or campaign
778
+
779
+ ```
780
+ USAGE
781
+ $ proca widget list [--simplify [--json | --csv | --table]] [-o <organisation name>]
782
+ [-c <campaign name>] [--config]
783
+
784
+ FLAGS
785
+ -c, --campaign=<campaign name> widgets of the campaign (coordinator or partner)
786
+ -o, --org=<organisation name> widgets of the organisation (coordinator or partner)
787
+ --[no-]config get the config
788
+
789
+ OUTPUT FLAGS
790
+ --csv Format output as csv
791
+ --json Format output as json
792
+ --simplify flatten and filter to output only the most important attributes
793
+ --table Format output as table [default]
794
+
795
+ DESCRIPTION
796
+ list all the widgets of an org or campaign
797
+
798
+ EXAMPLES
799
+ $ proca widget list -o <organisation>
800
+ ```
223
801
  <!-- commandsstop -->
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "proca",
3
3
  "description": "Access the proca api",
4
- "version": "0.1.2",
5
- "author": "=Xavier",
4
+ "version": "0.2.0",
5
+ "author": "Xavier",
6
6
  "bin": {
7
7
  "proca": "./proca-cli"
8
8
  },
@@ -24,6 +24,7 @@
24
24
  "@graphql-codegen/typescript-operations": "^4.2.3",
25
25
  "@graphql-codegen/typescript-urql": "^4.0.0",
26
26
  "@oclif/plugin-autocomplete": "^3.2.5",
27
+ "@oclif/plugin-commands": "^4.1.3",
27
28
  "@oclif/plugin-not-found": "^3.2.22",
28
29
  "lefthook": "^1.7.18",
29
30
  "oclif": "^4"
@@ -31,29 +32,58 @@
31
32
  "engines": {
32
33
  "node": ">=18.0.0"
33
34
  },
34
- "files": ["/proca-cli", "/src", "/theme.json"],
35
+ "files": [
36
+ "/proca-cli",
37
+ "/src",
38
+ "/theme.json"
39
+ ],
35
40
  "homepage": "https://github.com/fixthestatusquo/git@github.com:fixthestatusquo/proca-cli.git",
36
- "keywords": ["oclif"],
41
+ "keywords": [
42
+ "cli",
43
+ "petition",
44
+ "proca",
45
+ "campaigning",
46
+ "digital-engagement",
47
+ "social-change",
48
+ "nonprofit",
49
+ "civic-tech",
50
+ "mobilisation",
51
+ "advocacy",
52
+ "activism",
53
+ "email-campaign",
54
+ "grassroots",
55
+ "gdpr"
56
+ ],
37
57
  "imports": {
38
58
  "#src/*": "./src/*"
39
59
  },
40
60
  "license": "aGPL3",
41
- "main": "src/index.js",
61
+ "main": "./proca-cli",
42
62
  "oclif": {
43
63
  "repository": "github:fixthestatusquo/proca-cli",
44
64
  "bin": "proca",
45
65
  "theme": "theme.json",
46
66
  "topicSeparator": " ",
47
67
  "commands": "./src/commands",
68
+ "_hooks": {
69
+ "init": "./src/hooks/init.mjs"
70
+ },
48
71
  "topics": {
49
72
  "widget": {
50
- "description": "Manage widgets"
73
+ "description": "widgets (actionPages in the API)"
51
74
  },
52
75
  "campaign": {
53
- "description": "Handle campaigns"
76
+ "description": "campaigns"
77
+ },
78
+ "user": {
79
+ "description": "campaigners and other users"
54
80
  }
55
81
  },
56
- "plugins": []
82
+ "plugins": [
83
+ "@oclif/plugin-plugins",
84
+ "@oclif/plugin-help",
85
+ "@oclif/plugin-commands"
86
+ ]
57
87
  },
58
88
  "repository": "git@github.com:fixthestatusquo/proca-cli.git",
59
89
  "scripts": {