@flowcore/cli 2.1.0 → 2.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/CHANGELOG.md CHANGED
@@ -10,6 +10,25 @@
10
10
 
11
11
  * added description to start that includes week ([58687a7](https://github.com/flowcore-io/flowcore-cli/commit/58687a7bbb66aaa5d6da26af88e555cbb1e72467))
12
12
 
13
+ ## [2.2.0](https://github.com/flowcore-io/flowcore-cli/compare/v2.1.1...v2.2.0) (2024-02-16)
14
+
15
+
16
+ ### Features
17
+
18
+ * added flowcore data-core plugin ([32dbc6a](https://github.com/flowcore-io/flowcore-cli/commit/32dbc6a60bc6d1c3e38da03b4d115ff634b00477))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * updated readme badge ([bd87eeb](https://github.com/flowcore-io/flowcore-cli/commit/bd87eeb7090a08f36e5c8b7b7da4bd0cc059f052))
24
+
25
+ ## [2.1.1](https://github.com/flowcore-io/flowcore-cli/compare/v2.1.0...v2.1.1) (2024-02-15)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * removed whoami from cli and moved to config plugin, bumped config plugin version ([784ace4](https://github.com/flowcore-io/flowcore-cli/commit/784ace4cfe386f2ead98ccc8bed5d2ec25b01767))
31
+
13
32
  ## [2.1.0](https://github.com/flowcore-io/flowcore-cli/compare/v2.0.1...v2.1.0) (2024-02-15)
14
33
 
15
34
 
package/README.md CHANGED
@@ -3,7 +3,7 @@ Flowcore CLI
3
3
 
4
4
  Flowcore CLI is a command line interface for interacting with the Flowcore Platform.
5
5
 
6
- [![Version](https://img.shields.io/npm/v/@flowcore/cli-plugin-config)](https://npmjs.org/package/@flowcore/cli-plugin-config)
6
+ [![Version](https://img.shields.io/npm/v/@flowcore/cli)](https://npmjs.org/package/@flowcore/cli)
7
7
  [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
8
8
  [![Build and Release](https://github.com/flowcore-io/flowcore-cli/actions/workflows/build.yml/badge.svg)](https://github.com/flowcore-io/flowcore-cli/actions/workflows/build.yml)
9
9
 
@@ -18,7 +18,7 @@ $ npm install -g @flowcore/cli
18
18
  $ flowcore COMMAND
19
19
  running command...
20
20
  $ flowcore (--version)
21
- @flowcore/cli/2.1.0 linux-x64 node-v20.11.0
21
+ @flowcore/cli/2.2.0 linux-x64 node-v20.11.0
22
22
  $ flowcore --help [COMMAND]
23
23
  USAGE
24
24
  $ flowcore COMMAND
@@ -30,6 +30,7 @@ USAGE
30
30
  * [`flowcore autocomplete [SHELL]`](#flowcore-autocomplete-shell)
31
31
  * [`flowcore config set`](#flowcore-config-set)
32
32
  * [`flowcore config show`](#flowcore-config-show)
33
+ * [`flowcore data-core apply`](#flowcore-data-core-apply)
33
34
  * [`flowcore help [COMMANDS]`](#flowcore-help-commands)
34
35
  * [`flowcore login`](#flowcore-login)
35
36
  * [`flowcore plugins`](#flowcore-plugins)
@@ -105,7 +106,7 @@ EXAMPLES
105
106
  $ flowcore config set -l https://auth.flowcore.io/realms/flowcore/.well-known/openid-configuration -c my-client-id -p
106
107
  ```
107
108
 
108
- _See code: [@flowcore/cli-plugin-config](https://github.com/flowcore/flowcore-cli-plugin-config/blob/v1.0.4/src/commands/config/set.ts)_
109
+ _See code: [@flowcore/cli-plugin-config](https://github.com/flowcore/flowcore-cli-plugin-config/blob/v1.0.5/src/commands/config/set.ts)_
109
110
 
110
111
  ## `flowcore config show`
111
112
 
@@ -125,7 +126,36 @@ EXAMPLES
125
126
  $ flowcore config show
126
127
  ```
127
128
 
128
- _See code: [@flowcore/cli-plugin-config](https://github.com/flowcore/flowcore-cli-plugin-config/blob/v1.0.4/src/commands/config/show.ts)_
129
+ _See code: [@flowcore/cli-plugin-config](https://github.com/flowcore/flowcore-cli-plugin-config/blob/v1.0.5/src/commands/config/show.ts)_
130
+
131
+ ## `flowcore data-core apply`
132
+
133
+ Apply a manifest configuration for a Data Core to the Flowcore Platform
134
+
135
+ ```
136
+ USAGE
137
+ $ flowcore data-core apply -f <value> -t <value> [--profile <value>] [-n <value>] [-y]
138
+
139
+ FLAGS
140
+ -f, --file=<value> (required) file to apply
141
+ -n, --name=<value> name of the data core to apply
142
+ -t, --tenant=<value> (required) tenant to apply the data core to, this is the org for your organization, it can be
143
+ seen in the url when accessing your organization
144
+ -y, --yes skip confirmation
145
+ --profile=<value> Specify the configuration profile to use
146
+
147
+ DESCRIPTION
148
+ Apply a manifest configuration for a Data Core to the Flowcore Platform
149
+
150
+ EXAMPLES
151
+ $ flowcore data-core apply -t flowcore -f example.yaml
152
+
153
+ $ flowcore data-core apply -t flowcore -n data-core-name -f example.yaml
154
+
155
+ $ cat <<EOF | flowcore data-core apply -f -
156
+ ```
157
+
158
+ _See code: [@flowcore/cli-plugin-data-core](https://github.com/flowcore/flowcore-cli-data-core/blob/v1.0.0/src/commands/data-core/apply.ts)_
129
159
 
130
160
  ## `flowcore help [COMMANDS]`
131
161
 
@@ -168,7 +198,7 @@ EXAMPLES
168
198
  $ flowcore login --port 8080
169
199
  ```
170
200
 
171
- _See code: [@flowcore/cli-plugin-config](https://github.com/flowcore/flowcore-cli-plugin-config/blob/v1.0.4/src/commands/login.ts)_
201
+ _See code: [@flowcore/cli-plugin-config](https://github.com/flowcore/flowcore-cli-plugin-config/blob/v1.0.5/src/commands/login.ts)_
172
202
 
173
203
  ## `flowcore plugins`
174
204
 
@@ -485,7 +515,7 @@ EXAMPLES
485
515
  $ flowcore stream https://flowcore.io/<org>/<data core>/<flow type>/[<event type1>,<event type2>,<event type3>].stream -o log -s 3m
486
516
  ```
487
517
 
488
- _See code: [src/commands/stream.ts](https://github.com/flowcore-io/flowcore-cli/blob/v2.1.0/src/commands/stream.ts)_
518
+ _See code: [src/commands/stream.ts](https://github.com/flowcore-io/flowcore-cli/blob/v2.2.0/src/commands/stream.ts)_
489
519
 
490
520
  ## `flowcore version`
491
521
 
@@ -522,5 +552,5 @@ DESCRIPTION
522
552
  Check what user you are logged in as
523
553
  ```
524
554
 
525
- _See code: [src/commands/whoami.ts](https://github.com/flowcore-io/flowcore-cli/blob/v2.1.0/src/commands/whoami.ts)_
555
+ _See code: [@flowcore/cli-plugin-config](https://github.com/flowcore/flowcore-cli-plugin-config/blob/v1.0.5/src/commands/whoami.ts)_
526
556
  <!-- commandsstop -->
@@ -99,35 +99,7 @@
99
99
  "commands",
100
100
  "stream.js"
101
101
  ]
102
- },
103
- "whoami": {
104
- "aliases": [],
105
- "args": {},
106
- "description": "Check what user you are logged in as",
107
- "flags": {
108
- "profile": {
109
- "description": "Specify the configuration profile to use",
110
- "name": "profile",
111
- "hasDynamicHelp": false,
112
- "multiple": false,
113
- "type": "option"
114
- }
115
- },
116
- "hasDynamicHelp": false,
117
- "hiddenAliases": [],
118
- "id": "whoami",
119
- "pluginAlias": "@flowcore/cli",
120
- "pluginName": "@flowcore/cli",
121
- "pluginType": "core",
122
- "strict": true,
123
- "enableJsonFlag": false,
124
- "isESM": true,
125
- "relativePath": [
126
- "dist",
127
- "commands",
128
- "whoami.js"
129
- ]
130
102
  }
131
103
  },
132
- "version": "2.1.0"
104
+ "version": "2.2.0"
133
105
  }
package/package.json CHANGED
@@ -5,7 +5,8 @@
5
5
  },
6
6
  "dependencies": {
7
7
  "@datastructures-js/queue": "^4.2.3",
8
- "@flowcore/cli-plugin-config": "^1.0.4",
8
+ "@flowcore/cli-plugin-config": "^1.0.5",
9
+ "@flowcore/cli-plugin-data-core": "^1.0.0",
9
10
  "@flowcore/time-bucket": "^1.1.0",
10
11
  "@oclif/core": "^3",
11
12
  "@oclif/plugin-autocomplete": "^3.0.2",
@@ -67,7 +68,8 @@
67
68
  "@oclif/plugin-plugins",
68
69
  "@oclif/plugin-autocomplete",
69
70
  "@oclif/plugin-not-found",
70
- "@flowcore/cli-plugin-config"
71
+ "@flowcore/cli-plugin-config",
72
+ "@flowcore/cli-plugin-data-core"
71
73
  ],
72
74
  "topicSeparator": " "
73
75
  },
@@ -85,7 +87,7 @@
85
87
  "prestart": "npm run build",
86
88
  "update-schema": "rover graph introspect https://graph.api.staging.flowcore.io/graphql -o schema.gql"
87
89
  },
88
- "version": "2.1.0",
90
+ "version": "2.2.0",
89
91
  "bugs": "https://github.com/flowcore-io/flowcore-cli/issues",
90
92
  "keywords": [
91
93
  "flowcore",
@@ -1,5 +0,0 @@
1
- import { BaseCommand } from "@flowcore/cli-plugin-config";
2
- export default class Whoami extends BaseCommand<typeof Whoami> {
3
- static description: string;
4
- run(): Promise<void>;
5
- }
@@ -1,24 +0,0 @@
1
- import { BaseCommand, LOGIN_CODES, ValidateLogin } from "@flowcore/cli-plugin-config";
2
- export default class Whoami extends BaseCommand {
3
- static description = 'Check what user you are logged in as';
4
- async run() {
5
- const config = this.cliConfiguration.getConfig();
6
- const { auth, login } = config;
7
- if (!login.url) {
8
- this.error("No login url configured");
9
- }
10
- if (!auth) {
11
- this.error("Not logged in");
12
- }
13
- const validator = new ValidateLogin(login.url);
14
- const result = await validator.validate(config, this.cliConfiguration);
15
- if (result.status === LOGIN_CODES.LOGIN_SUCCESS) {
16
- this.log(`Logged in as ${result.name} (${result.flowcore_user_id})`);
17
- return;
18
- }
19
- if (result.status === LOGIN_CODES.LOGIN_EXPIRED) {
20
- this.error("Login expired, please login again");
21
- }
22
- this.error("Not logged in");
23
- }
24
- }