@codiac.io/codiac-cli 1.2.151 → 1.2.153-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.
Files changed (95) hide show
  1. package/README.md +115 -110
  2. package/lib/api-clients/common/api-user-creds.d.ts +7 -0
  3. package/lib/api-clients/common/api-user-creds.js +19 -0
  4. package/lib/api-clients/common/api-user-creds.js.map +1 -0
  5. package/lib/api-clients/common/config-loader.d.ts +6 -0
  6. package/lib/api-clients/common/config-loader.js +19 -0
  7. package/lib/api-clients/common/config-loader.js.map +1 -0
  8. package/lib/api-clients/common/security/auth-constants.d.ts +15 -0
  9. package/lib/api-clients/common/security/auth-constants.js +22 -0
  10. package/lib/api-clients/common/security/auth-constants.js.map +1 -0
  11. package/lib/api-clients/common/security/i-auth-client.d.ts +44 -0
  12. package/lib/api-clients/common/security/i-auth-client.js +3 -0
  13. package/lib/api-clients/common/security/i-auth-client.js.map +1 -0
  14. package/lib/api-clients/common/security/rest-client-base-with-auth.d.ts +84 -0
  15. package/lib/api-clients/common/security/rest-client-base-with-auth.js +361 -0
  16. package/lib/api-clients/common/security/rest-client-base-with-auth.js.map +1 -0
  17. package/lib/api-clients/common/security/token-holder.d.ts +13 -0
  18. package/lib/api-clients/common/security/token-holder.js +18 -0
  19. package/lib/api-clients/common/security/token-holder.js.map +1 -0
  20. package/lib/api-clients/common/utils.d.ts +23 -0
  21. package/lib/api-clients/common/utils.js +83 -0
  22. package/lib/api-clients/common/utils.js.map +1 -0
  23. package/lib/api-clients/contracts/index.d.ts +1 -0
  24. package/lib/api-clients/contracts/index.js +5 -0
  25. package/lib/api-clients/contracts/index.js.map +1 -0
  26. package/lib/api-clients/gen/client-config.d.ts +10 -0
  27. package/lib/api-clients/gen/client-config.js +29 -0
  28. package/lib/api-clients/gen/client-config.js.map +1 -0
  29. package/lib/api-clients/gen/client.d.ts +45 -0
  30. package/lib/api-clients/gen/client.js +331 -0
  31. package/lib/api-clients/gen/client.js.map +1 -0
  32. package/lib/api-clients/gen/contracts.d.ts +2529 -0
  33. package/lib/api-clients/gen/contracts.js +370 -0
  34. package/lib/api-clients/gen/contracts.js.map +1 -0
  35. package/lib/api-clients/gen/endpoints.d.ts +3 -0
  36. package/lib/api-clients/gen/endpoints.js +3150 -0
  37. package/lib/api-clients/gen/endpoints.js.map +1 -0
  38. package/lib/api-clients/index.d.ts +2 -0
  39. package/lib/api-clients/index.js +6 -0
  40. package/lib/api-clients/index.js.map +1 -0
  41. package/lib/apis/codiac-api/common/security/rest-client-base-with-auth.d.ts +84 -0
  42. package/lib/apis/codiac-api/common/security/rest-client-base-with-auth.js +361 -0
  43. package/lib/apis/codiac-api/common/security/rest-client-base-with-auth.js.map +1 -0
  44. package/lib/apis/codiac-api/gen/endpoints.d.ts +3 -0
  45. package/lib/apis/codiac-api/gen/endpoints.js +3150 -0
  46. package/lib/apis/codiac-api/gen/endpoints.js.map +1 -0
  47. package/lib/apis/over-gen/temp-mods.d.ts +33 -0
  48. package/lib/apis/over-gen/temp-mods.js +91 -0
  49. package/lib/apis/over-gen/temp-mods.js.map +1 -0
  50. package/lib/commands/csp/login.js +52 -43
  51. package/lib/commands/csp/login.js.map +1 -1
  52. package/lib/k8s-command-base.d.ts +25 -15
  53. package/lib/k8s-command-base.js +92 -20
  54. package/lib/k8s-command-base.js.map +1 -1
  55. package/lib/relay/data/aws-regions.d.ts +0 -6
  56. package/lib/relay/data/aws-regions.js +32 -32
  57. package/lib/relay/data/aws-regions.js.map +1 -1
  58. package/lib/relay/relay-container.js +1 -1
  59. package/lib/relay/wsclient/bus-listener.ervice.d.ts +71 -0
  60. package/lib/relay/wsclient/bus-listener.ervice.js +150 -0
  61. package/lib/relay/wsclient/bus-listener.ervice.js.map +1 -0
  62. package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.d.ts +0 -11
  63. package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.js +13 -14
  64. package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.js.map +1 -1
  65. package/lib/uilogic/cloud-resource-configurators/aws-node-types.d.ts +33 -1
  66. package/lib/uilogic/cloud-resource-configurators/aws-node-types.js +3712 -2
  67. package/lib/uilogic/cloud-resource-configurators/aws-node-types.js.map +1 -1
  68. package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.d.ts +2 -1
  69. package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.js.map +1 -1
  70. package/lib/uilogic/enterprise-contextualizer-machine-scope.d.ts +69 -0
  71. package/lib/uilogic/enterprise-contextualizer-machine-scope.js +596 -0
  72. package/lib/uilogic/enterprise-contextualizer-machine-scope.js.map +1 -0
  73. package/lib/uilogic/registry-configurator-factory.d.ts +12 -0
  74. package/lib/uilogic/registry-configurator-factory.js +68 -0
  75. package/lib/uilogic/registry-configurator-factory.js.map +1 -0
  76. package/lib/uilogic/registry-configurator.d.ts +17 -0
  77. package/lib/uilogic/registry-configurator.js +145 -0
  78. package/lib/uilogic/registry-configurator.js.map +1 -0
  79. package/lib/uilogic/registry-configurators/aws-registry-configurator.d.ts +15 -0
  80. package/lib/uilogic/registry-configurators/aws-registry-configurator.js +67 -0
  81. package/lib/uilogic/registry-configurators/aws-registry-configurator.js.map +1 -0
  82. package/lib/uilogic/registry-configurators/azure-registry-configurator.d.ts +25 -0
  83. package/lib/uilogic/registry-configurators/azure-registry-configurator.js +72 -0
  84. package/lib/uilogic/registry-configurators/azure-registry-configurator.js.map +1 -0
  85. package/lib/uilogic/registry-configurators/docker-hub-registry-configurator.d.ts +18 -0
  86. package/lib/uilogic/registry-configurators/docker-hub-registry-configurator.js +55 -0
  87. package/lib/uilogic/registry-configurators/docker-hub-registry-configurator.js.map +1 -0
  88. package/lib/uilogic/registry-configurators/helm-registry-configurator.d.ts +16 -0
  89. package/lib/uilogic/registry-configurators/helm-registry-configurator.js +44 -0
  90. package/lib/uilogic/registry-configurators/helm-registry-configurator.js.map +1 -0
  91. package/lib/uilogic/registry-configurators/unsupported-registry-configurator.d.ts +17 -0
  92. package/lib/uilogic/registry-configurators/unsupported-registry-configurator.js +60 -0
  93. package/lib/uilogic/registry-configurators/unsupported-registry-configurator.js.map +1 -0
  94. package/oclif.manifest.json +1 -1
  95. package/package.json +2 -2
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # codiac-cli
1
+ # Codiac-CLI
2
2
 
3
3
  oclif example Hello World CLI
4
4
 
@@ -9,14 +9,16 @@ oclif example Hello World CLI
9
9
  [![License](https://img.shields.io/npm/l/codiac-cli.svg)](https://github.com/oclif/hello-world/blob/main/package.json)
10
10
 
11
11
  <!-- toc -->
12
- * [codiac-cli](#codiac-cli-1)
13
- * [Usage](#usage)
14
- * [Commands](#commands)
15
- <!-- tocstop -->
12
+
13
+ - [codiac-cli](#codiac-cli-1)
14
+ - [Usage](#usage)
15
+ - [Commands](#commands)
16
+ <!-- tocstop -->
16
17
 
17
18
  # Usage
18
19
 
19
20
  <!-- usage -->
21
+
20
22
  ```sh-session
21
23
  $ npm install -g @codiac.io/codiac-cli
22
24
  $ codiac COMMAND
@@ -28,101 +30,103 @@ USAGE
28
30
  $ codiac COMMAND
29
31
  ...
30
32
  ```
33
+
31
34
  <!-- usagestop -->
32
35
 
33
36
  # Commands
34
37
 
35
38
  <!-- commands -->
36
- * [`codiac asset:create`](#codiac-assetcreate)
37
- * [`codiac asset:destroy`](#codiac-assetdestroy)
38
- * [`codiac asset:helm [SETTING]`](#codiac-assethelm-setting)
39
- * [`codiac asset:list`](#codiac-assetlist)
40
- * [`codiac asset:probe:create [CMD]`](#codiac-assetprobecreate-cmd)
41
- * [`codiac asset:recycle`](#codiac-assetrecycle)
42
- * [`codiac asset:view [CMD]`](#codiac-assetview-cmd)
43
- * [`codiac asset:volume:create [MOUNTPATH]`](#codiac-assetvolumecreate-mountpath)
44
- * [`codiac asset:volume:delete`](#codiac-assetvolumedelete)
45
- * [`codiac asset:volume:list`](#codiac-assetvolumelist)
46
- * [`codiac autocomplete [SHELL]`](#codiac-autocomplete-shell)
47
- * [`codiac branch [NAME]`](#codiac-branch-name)
48
- * [`codiac branch:current`](#codiac-branchcurrent)
49
- * [`codiac branch:list`](#codiac-branchlist)
50
- * [`codiac build`](#codiac-build)
51
- * [`codiac cabinet:create [CABINET]`](#codiac-cabinetcreate-cabinet)
52
- * [`codiac cabinet:list`](#codiac-cabinetlist)
53
- * [`codiac cabinet:obliterate [CABINET]`](#codiac-cabinetobliterate-cabinet)
54
- * [`codiac cli`](#codiac-cli)
55
- * [`codiac commit [MESSAGE]`](#codiac-commit-message)
56
- * [`codiac config:add [SETTING]`](#codiac-configadd-setting)
57
- * [`codiac config:delete [SETTING]`](#codiac-configdelete-setting)
58
- * [`codiac config:deploy`](#codiac-configdeploy)
59
- * [`codiac config:import [SETTING]`](#codiac-configimport-setting)
60
- * [`codiac config:view [SETTING]`](#codiac-configview-setting)
61
- * [`codiac dep [NAME]`](#codiac-dep-name)
62
- * [`codiac dep:create [URL]`](#codiac-depcreate-url)
63
- * [`codiac dep:install`](#codiac-depinstall)
64
- * [`codiac dep:list`](#codiac-deplist)
65
- * [`codiac dep:remove [NAME]`](#codiac-depremove-name)
66
- * [`codiac dep:source [NAME]`](#codiac-depsource-name)
67
- * [`codiac dep:syncup [DEPENDENCY]`](#codiac-depsyncup-dependency)
68
- * [`codiac dep:unsource [NAME]`](#codiac-depunsource-name)
69
- * [`codiac dep:upgrade [DEPENDENCY]`](#codiac-depupgrade-dependency)
70
- * [`codiac deploy`](#codiac-deploy)
71
- * [`codiac enterprise:create [CODE]`](#codiac-enterprisecreate-code)
72
- * [`codiac enterprise:list`](#codiac-enterpriselist)
73
- * [`codiac env:add [SETTING]`](#codiac-envadd-setting)
74
- * [`codiac environment:create [NAME]`](#codiac-environmentcreate-name)
75
- * [`codiac environment:list`](#codiac-environmentlist)
76
- * [`codiac filestore:capture`](#codiac-filestorecapture)
77
- * [`codiac help [COMMAND]`](#codiac-help-command)
78
- * [`codiac host:map [DOMAIN]`](#codiac-hostmap-domain)
79
- * [`codiac identity [TOKENNAME]`](#codiac-identity-tokenname)
80
- * [`codiac identity:delete [NAME]`](#codiac-identitydelete-name)
81
- * [`codiac identity:list`](#codiac-identitylist)
82
- * [`codiac imageRegistry:capture`](#codiac-imageregistrycapture)
83
- * [`codiac imageRegistry:forget`](#codiac-imageregistryforget)
84
- * [`codiac imageRegistry:pullSecret:set`](#codiac-imageregistrypullsecretset)
85
- * [`codiac imageRegistry:pullSecret:unset`](#codiac-imageregistrypullsecretunset)
86
- * [`codiac images:add [IMAGENAME]`](#codiac-imagesadd-imagename)
87
- * [`codiac images:list [HELLO]`](#codiac-imageslist-hello)
88
- * [`codiac images:patch IMAGENAME`](#codiac-imagespatch-imagename)
89
- * [`codiac images:remove IMAGENAME`](#codiac-imagesremove-imagename)
90
- * [`codiac images:version [NAME]`](#codiac-imagesversion-name)
91
- * [`codiac init DIRECTORY`](#codiac-init-directory)
92
- * [`codiac kit:create [SETTING]`](#codiac-kitcreate-setting)
93
- * [`codiac login`](#codiac-login)
94
- * [`codiac logout`](#codiac-logout)
95
- * [`codiac merge [BRANCH]`](#codiac-merge-branch)
96
- * [`codiac noc:cluster:create [NAME]`](#codiac-nocclustercreate-name)
97
- * [`codiac noc:cluster:deinit [NAME]`](#codiac-nocclusterdeinit-name)
98
- * [`codiac noc:cluster:destroy [NAME]`](#codiac-nocclusterdestroy-name)
99
- * [`codiac noc:cluster:init [NAME]`](#codiac-nocclusterinit-name)
100
- * [`codiac noc:cluster:list`](#codiac-nocclusterlist)
101
- * [`codiac noc:cluster:recreate [NAME]`](#codiac-nocclusterrecreate-name)
102
- * [`codiac pkg:add [DEFINITIONFILE]`](#codiac-pkgadd-definitionfile)
103
- * [`codiac pkg:list [HELLO]`](#codiac-pkglist-hello)
104
- * [`codiac pkg:patch PACKAGENAME`](#codiac-pkgpatch-packagename)
105
- * [`codiac pkg:remove [PACKAGENAME]`](#codiac-pkgremove-packagename)
106
- * [`codiac portal`](#codiac-portal)
107
- * [`codiac publish [NAME]`](#codiac-publish-name)
108
- * [`codiac pull [NAME]`](#codiac-pull-name)
109
- * [`codiac push [NAME]`](#codiac-push-name)
110
- * [`codiac run`](#codiac-run)
111
- * [`codiac secretStore:capture`](#codiac-secretstorecapture)
112
- * [`codiac secretStore:forget`](#codiac-secretstoreforget)
113
- * [`codiac stage [FILES]`](#codiac-stage-files)
114
- * [`codiac stash [FILE]`](#codiac-stash-file)
115
- * [`codiac status`](#codiac-status)
116
- * [`codiac stop`](#codiac-stop)
117
- * [`codiac switch [NAME]`](#codiac-switch-name)
118
- * [`codiac sync [NAME]`](#codiac-sync-name)
119
- * [`codiac tenant:create [NAME]`](#codiac-tenantcreate-name)
120
- * [`codiac tenant:switch [NAME]`](#codiac-tenantswitch-name)
121
- * [`codiac unstage [FILES]`](#codiac-unstage-files)
122
- * [`codiac update [CHANNEL]`](#codiac-update-channel)
123
- * [`codiac version`](#codiac-version)
124
- * [`codiac whereami [FILE]`](#codiac-whereami-file)
125
- * [`codiac whoami`](#codiac-whoami)
39
+
40
+ - [`codiac asset:create`](#codiac-assetcreate)
41
+ - [`codiac asset:destroy`](#codiac-assetdestroy)
42
+ - [`codiac asset:helm [SETTING]`](#codiac-assethelm-setting)
43
+ - [`codiac asset:list`](#codiac-assetlist)
44
+ - [`codiac asset:probe:create [CMD]`](#codiac-assetprobecreate-cmd)
45
+ - [`codiac asset:recycle`](#codiac-assetrecycle)
46
+ - [`codiac asset:view [CMD]`](#codiac-assetview-cmd)
47
+ - [`codiac asset:volume:create [MOUNTPATH]`](#codiac-assetvolumecreate-mountpath)
48
+ - [`codiac asset:volume:delete`](#codiac-assetvolumedelete)
49
+ - [`codiac asset:volume:list`](#codiac-assetvolumelist)
50
+ - [`codiac autocomplete [SHELL]`](#codiac-autocomplete-shell)
51
+ - [`codiac branch [NAME]`](#codiac-branch-name)
52
+ - [`codiac branch:current`](#codiac-branchcurrent)
53
+ - [`codiac branch:list`](#codiac-branchlist)
54
+ - [`codiac build`](#codiac-build)
55
+ - [`codiac cabinet:create [CABINET]`](#codiac-cabinetcreate-cabinet)
56
+ - [`codiac cabinet:list`](#codiac-cabinetlist)
57
+ - [`codiac cabinet:obliterate [CABINET]`](#codiac-cabinetobliterate-cabinet)
58
+ - [`codiac cli`](#codiac-cli)
59
+ - [`codiac commit [MESSAGE]`](#codiac-commit-message)
60
+ - [`codiac config:add [SETTING]`](#codiac-configadd-setting)
61
+ - [`codiac config:delete [SETTING]`](#codiac-configdelete-setting)
62
+ - [`codiac config:deploy`](#codiac-configdeploy)
63
+ - [`codiac config:import [SETTING]`](#codiac-configimport-setting)
64
+ - [`codiac config:view [SETTING]`](#codiac-configview-setting)
65
+ - [`codiac dep [NAME]`](#codiac-dep-name)
66
+ - [`codiac dep:create [URL]`](#codiac-depcreate-url)
67
+ - [`codiac dep:install`](#codiac-depinstall)
68
+ - [`codiac dep:list`](#codiac-deplist)
69
+ - [`codiac dep:remove [NAME]`](#codiac-depremove-name)
70
+ - [`codiac dep:source [NAME]`](#codiac-depsource-name)
71
+ - [`codiac dep:syncup [DEPENDENCY]`](#codiac-depsyncup-dependency)
72
+ - [`codiac dep:unsource [NAME]`](#codiac-depunsource-name)
73
+ - [`codiac dep:upgrade [DEPENDENCY]`](#codiac-depupgrade-dependency)
74
+ - [`codiac deploy`](#codiac-deploy)
75
+ - [`codiac enterprise:create [CODE]`](#codiac-enterprisecreate-code)
76
+ - [`codiac enterprise:list`](#codiac-enterpriselist)
77
+ - [`codiac env:add [SETTING]`](#codiac-envadd-setting)
78
+ - [`codiac environment:create [NAME]`](#codiac-environmentcreate-name)
79
+ - [`codiac environment:list`](#codiac-environmentlist)
80
+ - [`codiac filestore:capture`](#codiac-filestorecapture)
81
+ - [`codiac help [COMMAND]`](#codiac-help-command)
82
+ - [`codiac host:map [DOMAIN]`](#codiac-hostmap-domain)
83
+ - [`codiac identity [TOKENNAME]`](#codiac-identity-tokenname)
84
+ - [`codiac identity:delete [NAME]`](#codiac-identitydelete-name)
85
+ - [`codiac identity:list`](#codiac-identitylist)
86
+ - [`codiac imageRegistry:capture`](#codiac-imageregistrycapture)
87
+ - [`codiac imageRegistry:forget`](#codiac-imageregistryforget)
88
+ - [`codiac imageRegistry:pullSecret:set`](#codiac-imageregistrypullsecretset)
89
+ - [`codiac imageRegistry:pullSecret:unset`](#codiac-imageregistrypullsecretunset)
90
+ - [`codiac images:add [IMAGENAME]`](#codiac-imagesadd-imagename)
91
+ - [`codiac images:list [HELLO]`](#codiac-imageslist-hello)
92
+ - [`codiac images:patch IMAGENAME`](#codiac-imagespatch-imagename)
93
+ - [`codiac images:remove IMAGENAME`](#codiac-imagesremove-imagename)
94
+ - [`codiac images:version [NAME]`](#codiac-imagesversion-name)
95
+ - [`codiac init DIRECTORY`](#codiac-init-directory)
96
+ - [`codiac kit:create [SETTING]`](#codiac-kitcreate-setting)
97
+ - [`codiac login`](#codiac-login)
98
+ - [`codiac logout`](#codiac-logout)
99
+ - [`codiac merge [BRANCH]`](#codiac-merge-branch)
100
+ - [`codiac noc:cluster:create [NAME]`](#codiac-nocclustercreate-name)
101
+ - [`codiac noc:cluster:deinit [NAME]`](#codiac-nocclusterdeinit-name)
102
+ - [`codiac noc:cluster:destroy [NAME]`](#codiac-nocclusterdestroy-name)
103
+ - [`codiac noc:cluster:init [NAME]`](#codiac-nocclusterinit-name)
104
+ - [`codiac noc:cluster:list`](#codiac-nocclusterlist)
105
+ - [`codiac noc:cluster:recreate [NAME]`](#codiac-nocclusterrecreate-name)
106
+ - [`codiac pkg:add [DEFINITIONFILE]`](#codiac-pkgadd-definitionfile)
107
+ - [`codiac pkg:list [HELLO]`](#codiac-pkglist-hello)
108
+ - [`codiac pkg:patch PACKAGENAME`](#codiac-pkgpatch-packagename)
109
+ - [`codiac pkg:remove [PACKAGENAME]`](#codiac-pkgremove-packagename)
110
+ - [`codiac portal`](#codiac-portal)
111
+ - [`codiac publish [NAME]`](#codiac-publish-name)
112
+ - [`codiac pull [NAME]`](#codiac-pull-name)
113
+ - [`codiac push [NAME]`](#codiac-push-name)
114
+ - [`codiac run`](#codiac-run)
115
+ - [`codiac secretStore:capture`](#codiac-secretstorecapture)
116
+ - [`codiac secretStore:forget`](#codiac-secretstoreforget)
117
+ - [`codiac stage [FILES]`](#codiac-stage-files)
118
+ - [`codiac stash [FILE]`](#codiac-stash-file)
119
+ - [`codiac status`](#codiac-status)
120
+ - [`codiac stop`](#codiac-stop)
121
+ - [`codiac switch [NAME]`](#codiac-switch-name)
122
+ - [`codiac sync [NAME]`](#codiac-sync-name)
123
+ - [`codiac tenant:create [NAME]`](#codiac-tenantcreate-name)
124
+ - [`codiac tenant:switch [NAME]`](#codiac-tenantswitch-name)
125
+ - [`codiac unstage [FILES]`](#codiac-unstage-files)
126
+ - [`codiac update [CHANNEL]`](#codiac-update-channel)
127
+ - [`codiac version`](#codiac-version)
128
+ - [`codiac whereami [FILE]`](#codiac-whereami-file)
129
+ - [`codiac whoami`](#codiac-whoami)
126
130
 
127
131
  ## `codiac asset:create`
128
132
 
@@ -188,7 +192,7 @@ _See code: [src/commands/asset/create.ts](https://github.com/codiac/codiac-cli/b
188
192
 
189
193
  ## `codiac asset:destroy`
190
194
 
191
- UN-deploys a given asset from a given cabinet. Defaults to removing only the pod deployments and leaving the service in place; set the --scorch argument to remove the service.
195
+ UN-deploys a given asset from a given cabinet. Defaults to removing only the pod deployments and leaving the service in place; set the --scorch argument to remove the service.
192
196
 
193
197
  ```
194
198
  USAGE
@@ -411,9 +415,9 @@ EXAMPLES
411
415
  cod probe:create --predefined builtin-heartbeat-file-exists
412
416
  cod probe:create -p 15 --exec --execCommand "cat /app/data/last-heartbeat.json"
413
417
  cod probe:create -n acme -a myapi -u readiness -p 15 --exec --execCommand "cat /app/data/last-heartbeat.json"
414
- cod probe:create -n acme -a myapi -u readiness -p 15 --exec --execCommand cat --execCommand
418
+ cod probe:create -n acme -a myapi -u readiness -p 15 --exec --execCommand cat --execCommand
415
419
  /app/data/last-heartbeat.json
416
- cod probe:create -n acme -a myapi -u readiness -p 15 --http --httpScheme https --httpHost myapi.acme.com --httpPort
420
+ cod probe:create -n acme -a myapi -u readiness -p 15 --http --httpScheme https --httpHost myapi.acme.com --httpPort
417
421
  443 --httpPath /diag/heartbeat -h Accept=application/json -h user-agent=MyUserAgent
418
422
  ```
419
423
 
@@ -421,7 +425,7 @@ _See code: [src/commands/asset/probe/create.ts](https://github.com/codiac/codiac
421
425
 
422
426
  ## `codiac asset:recycle`
423
427
 
424
- Deploys a given asset to a given cabinet. Defaults to current version.
428
+ Deploys a given asset to a given cabinet. Defaults to current version.
425
429
 
426
430
  ```
427
431
  USAGE
@@ -846,7 +850,7 @@ _See code: [src/commands/build.ts](https://github.com/codiac/codiac-cli/blob/v1.
846
850
 
847
851
  ## `codiac cabinet:create [CABINET]`
848
852
 
849
- Initializes a cabinet for a given enterprise and environment. Overwrites any existing if forced, otherwise returns an error if the cabinet already exists.
853
+ Initializes a cabinet for a given enterprise and environment. Overwrites any existing if forced, otherwise returns an error if the cabinet already exists.
850
854
 
851
855
  ```
852
856
  USAGE
@@ -1115,7 +1119,7 @@ _See code: [src/commands/config/delete.ts](https://github.com/codiac/codiac-cli/
1115
1119
 
1116
1120
  ## `codiac config:deploy`
1117
1121
 
1118
- Deploys a given asset to a given cabinet. Defaults to current version.
1122
+ Deploys a given asset to a given cabinet. Defaults to current version.
1119
1123
 
1120
1124
  ```
1121
1125
  USAGE
@@ -1291,7 +1295,7 @@ _See code: [src/commands/dep.ts](https://github.com/codiac/codiac-cli/blob/v1.2.
1291
1295
 
1292
1296
  ## `codiac dep:create [URL]`
1293
1297
 
1294
- Sources a new dependency into the project from an existing repo url, initializes it with the package repository, and publishes the initial version if it is not already. If the package repository is already initialized, the latest package version is used.
1298
+ Sources a new dependency into the project from an existing repo url, initializes it with the package repository, and publishes the initial version if it is not already. If the package repository is already initialized, the latest package version is used.
1295
1299
 
1296
1300
  ```
1297
1301
  USAGE
@@ -1559,7 +1563,7 @@ _See code: [src/commands/dep/upgrade.ts](https://github.com/codiac/codiac-cli/bl
1559
1563
 
1560
1564
  ## `codiac deploy`
1561
1565
 
1562
- Deploys a given asset to a given cabinet. Defaults to current version.
1566
+ Deploys a given asset to a given cabinet. Defaults to current version.
1563
1567
 
1564
1568
  ```
1565
1569
  USAGE
@@ -1701,7 +1705,7 @@ _See code: [src/commands/env/add.ts](https://github.com/codiac/codiac-cli/blob/v
1701
1705
 
1702
1706
  ## `codiac environment:create [NAME]`
1703
1707
 
1704
- Initializes a cabinet for a given enterprise and environment. Overwrites any existing if forced, otherwise returns an error if the cabinet already exists.
1708
+ Initializes a cabinet for a given enterprise and environment. Overwrites any existing if forced, otherwise returns an error if the cabinet already exists.
1705
1709
 
1706
1710
  ```
1707
1711
  USAGE
@@ -1895,7 +1899,7 @@ _See code: [src/commands/host/map.ts](https://github.com/codiac/codiac-cli/blob/
1895
1899
 
1896
1900
  ## `codiac identity [TOKENNAME]`
1897
1901
 
1898
- Stores an identity token for the current user, for use with a component tool (such as npm). This command acts as an upsert.
1902
+ Stores an identity token for the current user, for use with a component tool (such as npm). This command acts as an upsert.
1899
1903
 
1900
1904
  ```
1901
1905
  USAGE
@@ -2074,7 +2078,7 @@ _See code: [src/commands/imageRegistry/capture.ts](https://github.com/codiac/cod
2074
2078
 
2075
2079
  ## `codiac imageRegistry:forget`
2076
2080
 
2077
- Removes the reference to the given container registry for the tenant. Does NOT delete the registry itself.
2081
+ Removes the reference to the given container registry for the tenant. Does NOT delete the registry itself.
2078
2082
 
2079
2083
  ```
2080
2084
  USAGE
@@ -2326,7 +2330,7 @@ _See code: [src/commands/images/list.ts](https://github.com/codiac/codiac-cli/bl
2326
2330
 
2327
2331
  ## `codiac images:patch IMAGENAME`
2328
2332
 
2329
- Applies the given values to an existing image export configuration. Both registryUrl and environment act as filters to limit the operation. That is, an upsert of registry targets is performed for the given image, based on the given registryUrl and/or environment.
2333
+ Applies the given values to an existing image export configuration. Both registryUrl and environment act as filters to limit the operation. That is, an upsert of registry targets is performed for the given image, based on the given registryUrl and/or environment.
2330
2334
 
2331
2335
  ```
2332
2336
  USAGE
@@ -3022,7 +3026,7 @@ _See code: [src/commands/pkg/list.ts](https://github.com/codiac/codiac-cli/blob/
3022
3026
 
3023
3027
  ## `codiac pkg:patch PACKAGENAME`
3024
3028
 
3025
- Applies the given values to an existing package export configuration. Both registryUrl and environment act as filters to limit the operation. That is, an upsert of registry targets is performed for the given package, based on the given registryUrl and/or environment.
3029
+ Applies the given values to an existing package export configuration. Both registryUrl and environment act as filters to limit the operation. That is, an upsert of registry targets is performed for the given package, based on the given registryUrl and/or environment.
3026
3030
 
3027
3031
  ```
3028
3032
  USAGE
@@ -3353,7 +3357,7 @@ _See code: [src/commands/secretStore/capture.ts](https://github.com/codiac/codia
3353
3357
 
3354
3358
  ## `codiac secretStore:forget`
3355
3359
 
3356
- Removes the reference to the given container registry for the tenant. Does NOT delete the registry itself.
3360
+ Removes the reference to the given container registry for the tenant. Does NOT delete the registry itself.
3357
3361
 
3358
3362
  ```
3359
3363
  USAGE
@@ -3718,7 +3722,7 @@ _See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/
3718
3722
 
3719
3723
  ## `codiac whereami [FILE]`
3720
3724
 
3721
- Renders the current cabinet context the image project is pointed to. ie: Tenant, Enterprise, Environment, Cabinet.
3725
+ Renders the current cabinet context the image project is pointed to. ie: Tenant, Enterprise, Environment, Cabinet.
3722
3726
 
3723
3727
  ```
3724
3728
  USAGE
@@ -3777,4 +3781,5 @@ ALIASES
3777
3781
  ```
3778
3782
 
3779
3783
  _See code: [src/commands/whoami.ts](https://github.com/codiac/codiac-cli/blob/v1.2.133/src/commands/whoami.ts)_
3784
+
3780
3785
  <!-- commandsstop -->
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ */
4
+ export declare class ApiUserCreds {
5
+ apiToken: string;
6
+ constructor(apiToken: string);
7
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiUserCreds = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const inversify_1 = require("inversify");
6
+ /**
7
+ *
8
+ */
9
+ let ApiUserCreds = class ApiUserCreds {
10
+ constructor(apiToken) {
11
+ this.apiToken = apiToken;
12
+ }
13
+ };
14
+ ApiUserCreds = tslib_1.__decorate([
15
+ (0, inversify_1.injectable)(),
16
+ tslib_1.__metadata("design:paramtypes", [String])
17
+ ], ApiUserCreds);
18
+ exports.ApiUserCreds = ApiUserCreds;
19
+ //# sourceMappingURL=api-user-creds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-user-creds.js","sourceRoot":"","sources":["../../../src/api-clients/common/api-user-creds.ts"],"names":[],"mappings":";;;;AAAA,yCAAuC;AAEvC;;GAEG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,YAAmB,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;IAEnC,CAAC;CACF,CAAA;AAJY,YAAY;IADxB,IAAA,sBAAU,GAAE;;GACA,YAAY,CAIxB;AAJY,oCAAY"}
@@ -0,0 +1,6 @@
1
+ export declare class ConfigLoader<TConfig> {
2
+ configFolderPath: string;
3
+ fileName: string;
4
+ constructor(configFolderPath: string, fileName: string);
5
+ load(): TConfig | undefined;
6
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigLoader = void 0;
4
+ const path = require("path");
5
+ const utils_1 = require("./utils");
6
+ // TODO: If this gets more useful or bulletproof, consider promoting this @codiac.io/codiac-common?
7
+ class ConfigLoader {
8
+ constructor(configFolderPath, fileName) {
9
+ this.configFolderPath = configFolderPath;
10
+ this.fileName = fileName;
11
+ }
12
+ load() {
13
+ let pathName = path.posix.join(this.configFolderPath, this.fileName);
14
+ let cfg = utils_1.utils.deserializeJsonFile(pathName);
15
+ return cfg;
16
+ }
17
+ }
18
+ exports.ConfigLoader = ConfigLoader;
19
+ //# sourceMappingURL=config-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-loader.js","sourceRoot":"","sources":["../../../src/api-clients/common/config-loader.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAC5B,mCAAgC;AAGhC,oGAAoG;AACpG,MAAa,YAAY;IACvB,YAAmB,gBAAwB,EAAS,QAAgB;QAAjD,qBAAgB,GAAhB,gBAAgB,CAAQ;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAEpE,CAAC;IAEM,IAAI;QACT,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrE,IAAI,GAAG,GAAG,aAAK,CAAC,mBAAmB,CAAU,QAAQ,CAAC,CAAC;QACvD,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAVD,oCAUC"}
@@ -0,0 +1,15 @@
1
+ /** THIS IS A REDUNDANT COPY of the one in: auth-sdk/authentication-plugin.ts. */
2
+ export declare class AuthConstants {
3
+ /** The url segments prepended to all the auth endpoint routes. */
4
+ readonly ROUTE_PREFIX = "auth";
5
+ /** The default route for the login endpoint (unprefixed). */
6
+ readonly ROUTE_SUBPATH_LOGIN = "login";
7
+ /** The default route for the tenant registration endpoint (unprefixed). */
8
+ readonly ROUTE_SUBPATH_TENANT_REGISTER = "tenants";
9
+ /** The default route for the switch tenant endpoint (unprefixed). */
10
+ readonly ROUTE_SUBPATH_SWITCH_TENANT = "switch";
11
+ /** The default route for the token refresh endpoint (unprefixed). */
12
+ readonly ROUTE_SUBPATH_TOKEN_REFRESH = "refresh";
13
+ /** The default route for the WhoAmI endpoint (unprefixed). */
14
+ readonly ROUTE_SUBPATH_TOKEN_WHOAMI = "whoami";
15
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthConstants = void 0;
4
+ /** THIS IS A REDUNDANT COPY of the one in: auth-sdk/authentication-plugin.ts. */
5
+ class AuthConstants {
6
+ constructor() {
7
+ /** The url segments prepended to all the auth endpoint routes. */
8
+ this.ROUTE_PREFIX = "auth";
9
+ /** The default route for the login endpoint (unprefixed). */
10
+ this.ROUTE_SUBPATH_LOGIN = "login";
11
+ /** The default route for the tenant registration endpoint (unprefixed). */
12
+ this.ROUTE_SUBPATH_TENANT_REGISTER = "tenants";
13
+ /** The default route for the switch tenant endpoint (unprefixed). */
14
+ this.ROUTE_SUBPATH_SWITCH_TENANT = "switch";
15
+ /** The default route for the token refresh endpoint (unprefixed). */
16
+ this.ROUTE_SUBPATH_TOKEN_REFRESH = "refresh";
17
+ /** The default route for the WhoAmI endpoint (unprefixed). */
18
+ this.ROUTE_SUBPATH_TOKEN_WHOAMI = "whoami";
19
+ }
20
+ }
21
+ exports.AuthConstants = AuthConstants;
22
+ //# sourceMappingURL=auth-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-constants.js","sourceRoot":"","sources":["../../../../src/api-clients/common/security/auth-constants.ts"],"names":[],"mappings":";;;AAAA,kFAAkF;AAClF,MAAa,aAAa;IAA1B;QAEE,kEAAkE;QAClD,iBAAY,GAAG,MAAM,CAAC;QACtC,8DAA8D;QAC9C,wBAAmB,GAAG,OAAO,CAAC;QAC9C,4EAA4E;QAC5D,kCAA6B,GAAG,SAAS,CAAC;QAC1D,sEAAsE;QACtD,gCAA2B,GAAG,QAAQ,CAAC;QACvD,sEAAsE;QACtD,gCAA2B,GAAG,SAAS,CAAC;QACxD,+DAA+D;QAC/C,+BAA0B,GAAG,QAAQ,CAAC;IACxD,CAAC;CAAA;AAdD,sCAcC"}
@@ -0,0 +1,44 @@
1
+ import * as contracts from "@codiac.io/codiac-common/contracts";
2
+ import { AuthTenant, TenantUser } from "@codiac.io/codiac-common/security";
3
+ import { TokenHolder } from "./token-holder";
4
+ export interface IAuthClient {
5
+ /** Logs in remotely with the given credentials.
6
+ * Returns a valid token in the headers of the response
7
+ * and the user info in the body of the response.
8
+ * @param login The human readable unique identifier for the user.
9
+ * @param password the secret held for this particular user.
10
+ * @param tenantCode (optional) Unique identifier of the tenant to activate with this authentication.
11
+ */
12
+ authenticate(login: string, password: string, tenantCode?: string): Promise<contracts.SingleResult<TokenHolder>>;
13
+ /** Provides the ability to extend an existing token.
14
+ * Returns failure for invalid or revoked tokens.
15
+ * Returns any errors encountered refreshing.
16
+ * @param currentToken The JWT token returned in a prior request.
17
+ * */
18
+ refreshToken(currentToken: string): Promise<contracts.SingleResult<TokenHolder>>;
19
+ /** Retrieves the full account info for the current user (minus any passwords),
20
+ * including all tenant profiles.
21
+ * Returns failure for invalid or revoked tokens.
22
+ * Returns any errors encountered refreshing.
23
+ * NOTE: keeps the returned auth token in scope for this client instance.
24
+ * @param currentToken The JWT token returned in a prior request. */
25
+ whoAmI(currentToken: string): Promise<contracts.SingleResult<TenantUser>>;
26
+ /** Provides the ability to extend an existing token.
27
+ * Returns failure for invalid or revoked tokens.
28
+ * @param currentToken The JWT token returned in a prior request.
29
+ * @param tenantCode Unique identifier of the tenant being switched to.
30
+ * Returns any errors encountered refreshing. */
31
+ switchTenant(currentToken: string, tenantCode: string): Promise<contracts.SingleResult<TokenHolder>>;
32
+ /** Declares a new organization in the toyhauler system.
33
+ * The given user account is made the administrator for that organization,
34
+ * and if the new user flag is given,
35
+ * the user account will get created.
36
+ * @param tenantName Human readable friendly title for the tenant. NOT used for system identification.
37
+ * @param newUser Flag to create a new user account with the given credentials.
38
+ * @param userName User to be the adminstrator for the new tenant.
39
+ * @param password Password for the given user (desired password if the newuser flag is set).
40
+ * @param tenantCode (optional) Desired unique identifier for the new tenant (if omitted one will be generated).
41
+ * @param currentToken The JWT token returned in a prior request.
42
+ * */
43
+ registerTenant(tenantName: string, newUser: boolean, userName: string, password: string, tenantCode?: string, currentToken?: string): Promise<contracts.SingleResult<AuthTenant>>;
44
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=i-auth-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-auth-client.js","sourceRoot":"","sources":["../../../../src/api-clients/common/security/i-auth-client.ts"],"names":[],"mappings":""}
@@ -0,0 +1,84 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ import * as contracts from "@codiac.io/codiac-common/contracts";
3
+ import { classDef, httpRestVerb, IBetterLogger } from "@codiac.io/codiac-common";
4
+ import { TenantUser, AuthTenant } from "@codiac.io/codiac-common/security";
5
+ import { RestClientBase } from "@codiac.io/api-client-base";
6
+ import { IAuthClient } from "./i-auth-client";
7
+ import { AuthConstants } from "./auth-constants";
8
+ import { TokenHolder } from "./token-holder";
9
+ /** Contains Codiac Auth methods. */
10
+ export declare abstract class RestClientBaseWithAuth extends RestClientBase implements IAuthClient {
11
+ /** Hardcoded to match the current setting on the server.
12
+ * TODO: Get this from a config that is copied from the server project to the client project on build.
13
+ */
14
+ static TOKEN_HEADER_PARAM: string;
15
+ /**
16
+ * @param apiRootUrl The base url of the api. That is, prepending it to any individual endpoint route will yield the fully qualified url for that endpoint.
17
+ * @param authToken Either a Principal or TenantUser token for the api this client is targeting. NOTE: Also gets hydrated on successful attempts of authenticate / switchTenant / refreshToken / registerTenant.
18
+ */
19
+ constructor(logger: IBetterLogger, apiRootUrl?: string, authToken?: string);
20
+ protected authConstants: AuthConstants;
21
+ /** Logs in remotely with the given credentials.
22
+ * Returns a valid token in the headers of the response
23
+ * and the user info in the body of the response.
24
+ * NOTE: If successful, keeps the returned auth token in scope for this client instance.
25
+ * @param login The human readable unique identifier for the user.
26
+ * @param password the secret held for this particular user.
27
+ * @param tenantCode (optional) Unique identifier of the tenant to activate with this authentication.
28
+ */
29
+ authenticate(login: string, password: string, tenantCode?: string): Promise<contracts.SingleResult<TokenHolder>>;
30
+ /** Traps the errors thrown by axios on non-200 statuses. */
31
+ protected executeAxiosRequest<TRequest, TResponse extends contracts.Result>(verb: httpRestVerb, responseType: classDef<TResponse>, url: string, request?: TRequest, options?: AxiosRequestConfig): Promise<{
32
+ data: TResponse;
33
+ headers?: any;
34
+ status: number;
35
+ statusText: string;
36
+ }>;
37
+ /** Replaces the user in the output with a TokenHolder so that they client consumer has access to the token.
38
+ * throws if the axios response does not contain a data property. */
39
+ private convertToTokenHolderResult;
40
+ /** Replaces the user in the output with a TokenHolder so that they client consumer has access to the token.
41
+ * throws if the axios response does not contain a data property.
42
+ * @deprecated Use `convertToTokenHolderResult()` instead.*/
43
+ private convertToTokenHolderResponse;
44
+ /** Determines whether the given token is expired.
45
+ * @param throwOnError throws any encountered errors, including token parsing errors.
46
+ */
47
+ isExpired(token: string, throwOnError?: boolean): boolean;
48
+ extractTokenExpiration(token: string): Date | undefined;
49
+ /** Provides the ability to extend an existing token.
50
+ * Returns failure for invalid or revoked tokens.
51
+ * Returns any errors encountered refreshing.
52
+ * NOTE: If successful, keeps the returned auth token in scope for this client instance.
53
+ * @param currentToken The JWT token returned in a prior request.
54
+ * */
55
+ refreshToken(currentToken: string): Promise<contracts.SingleResult<TokenHolder>>;
56
+ /** Retrieves the full account info for the current user (minus any passwords),
57
+ * including all tenant profiles.
58
+ * Returns failure for invalid or revoked tokens.
59
+ * Returns any errors encountered refreshing.
60
+ * NOTE: keeps the returned auth token in scope for this client instance.
61
+ * @param currentToken (optional if the client instance has already authenticated) The JWT token returned in a prior request.
62
+ */
63
+ whoAmI(currentToken?: string): Promise<contracts.SingleResult<TenantUser>>;
64
+ /** Provides the ability to extend an existing token.
65
+ * Returns failure for invalid or revoked tokens.
66
+ * NOTE: If successful, keeps the returned auth token in scope for this client instance.
67
+ * @param currentToken The JWT token returned in a prior request.
68
+ * @param tenantCode Unique identifier of the tenant being switched to.
69
+ * Returns any errors encountered refreshing. */
70
+ switchTenant(currentToken: string, tenantCode: string): Promise<contracts.SingleResult<TokenHolder>>;
71
+ /** Declares a new organization in the toyhauler system.
72
+ * The given user account is made the administrator for that organization,
73
+ * and if the new user flag is given,
74
+ * the user account will get created.
75
+ * NOTE: If successful, keeps the returned auth token in scope for this client instance.
76
+ * @param tenantName Human readable friendly title for the tenant. NOT used for system identification.
77
+ * @param newUser Flag to create a new user account with the given credentials.
78
+ * @param userName User to be the adminstrator for the new tenant.
79
+ * @param password Password for the given user (desired password if the newuser flag is set).
80
+ * @param tenantCode (optional) Desired unique identifier for the new tenant (if omitted one will be generated).
81
+ * @param currentToken The JWT token returned in a prior request.
82
+ * */
83
+ registerTenant(tenantName: string, newUser: boolean, userName: string, password: string, tenantCode?: string, currentToken?: string): Promise<contracts.SingleResult<AuthTenant>>;
84
+ }