@flowcore/cli 1.1.0 → 1.1.1
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 +7 -0
- package/README.md +6 -6
- package/dist/commands/stream.d.ts +1 -1
- package/dist/commands/stream.js +4 -3
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
## [1.1.1](https://github.com/flowcore-io/flowcore-cli/compare/v1.1.0...v1.1.1) (2024-01-09)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* made sure to process last events in queue on no-live ([b8daffd](https://github.com/flowcore-io/flowcore-cli/commit/b8daffd667e2b1102e24f5b867a589c9e1939375))
|
|
16
|
+
|
|
10
17
|
## [1.1.0](https://github.com/flowcore-io/flowcore-cli/compare/v1.0.2...v1.1.0) (2024-01-09)
|
|
11
18
|
|
|
12
19
|
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ $ npm install -g @flowcore/cli
|
|
|
17
17
|
$ flowcore COMMAND
|
|
18
18
|
running command...
|
|
19
19
|
$ flowcore (--version)
|
|
20
|
-
@flowcore/cli/1.1.
|
|
20
|
+
@flowcore/cli/1.1.1 linux-x64 node-v20.10.0
|
|
21
21
|
$ flowcore --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ flowcore COMMAND
|
|
@@ -103,7 +103,7 @@ EXAMPLES
|
|
|
103
103
|
$ flowcore config set -l https://auth.flowcore.io/realms/flowcore/.well-known/openid-configuration -c my-client-id -p
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
_See code: [src/commands/config/set.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.
|
|
106
|
+
_See code: [src/commands/config/set.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.1/src/commands/config/set.ts)_
|
|
107
107
|
|
|
108
108
|
## `flowcore config show`
|
|
109
109
|
|
|
@@ -123,7 +123,7 @@ EXAMPLES
|
|
|
123
123
|
$ flowcore config show
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
_See code: [src/commands/config/show.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.
|
|
126
|
+
_See code: [src/commands/config/show.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.1/src/commands/config/show.ts)_
|
|
127
127
|
|
|
128
128
|
## `flowcore help [COMMANDS]`
|
|
129
129
|
|
|
@@ -166,7 +166,7 @@ EXAMPLES
|
|
|
166
166
|
$ flowcore login --port 8080
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
_See code: [src/commands/login.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.
|
|
169
|
+
_See code: [src/commands/login.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.1/src/commands/login.ts)_
|
|
170
170
|
|
|
171
171
|
## `flowcore plugins`
|
|
172
172
|
|
|
@@ -470,7 +470,7 @@ EXAMPLES
|
|
|
470
470
|
$ flowcore stream https://staging.flowcore.io/flowcore/flowcore-platform/organization.0/event.organization.subscription.updated-requested.0.stream
|
|
471
471
|
```
|
|
472
472
|
|
|
473
|
-
_See code: [src/commands/stream.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.
|
|
473
|
+
_See code: [src/commands/stream.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.1/src/commands/stream.ts)_
|
|
474
474
|
|
|
475
475
|
## `flowcore version`
|
|
476
476
|
|
|
@@ -507,5 +507,5 @@ DESCRIPTION
|
|
|
507
507
|
Check what user you are logged in as
|
|
508
508
|
```
|
|
509
509
|
|
|
510
|
-
_See code: [src/commands/whoami.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.
|
|
510
|
+
_See code: [src/commands/whoami.ts](https://github.com/flowcore-io/flowcore-cli/blob/v1.1.1/src/commands/whoami.ts)_
|
|
511
511
|
<!-- commandsstop -->
|
package/dist/commands/stream.js
CHANGED
|
@@ -84,7 +84,7 @@ export default class Stream extends BaseCommand {
|
|
|
84
84
|
const observer = new Subject();
|
|
85
85
|
!this.flags.json && this.log(ux.colorize("blackBright", `Starting to stream events for ${dataCoreId} - ${aggregator} - ${eventType}, press ${ux.colorize("whiteBright", "ctrl+c")} to stop`));
|
|
86
86
|
// eslint-disable-next-line no-void
|
|
87
|
-
void this.
|
|
87
|
+
void this.streamEvents(dataCoreId, aggregator, eventType, firstTimeBucket, lastTimeBucket, graphqlClient, observer, flags.live);
|
|
88
88
|
await this.processEvents(observer, flags.destination, flags.output);
|
|
89
89
|
}
|
|
90
90
|
async processEvents(observer, destination, output) {
|
|
@@ -105,12 +105,13 @@ export default class Stream extends BaseCommand {
|
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
// eslint-disable-next-line no-unmodified-loop-condition
|
|
108
|
-
while (!done) {
|
|
108
|
+
while (!done || events.length > 0) {
|
|
109
109
|
const processingQueue = Queue.fromArray(events);
|
|
110
110
|
events = [];
|
|
111
111
|
while (!processingQueue.isEmpty()) {
|
|
112
112
|
const event = processingQueue.dequeue();
|
|
113
113
|
if (output === "log") {
|
|
114
|
+
ux.info(JSON.stringify(event));
|
|
114
115
|
this.flags.json ? this.log(JSON.stringify({
|
|
115
116
|
event,
|
|
116
117
|
type: "input",
|
|
@@ -172,7 +173,7 @@ export default class Stream extends BaseCommand {
|
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
|
-
async
|
|
176
|
+
async streamEvents(dataCoreId, aggregator, eventType, firstTimeBucket, lastTimeBucket, graphqlClient, observer, live) {
|
|
176
177
|
let startTimeBucket = dayjs(firstTimeBucket, TIME_BUCKET_HOUR_PATTERN);
|
|
177
178
|
const currentTime = dayjs.utc();
|
|
178
179
|
let liveMode = false;
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"prestart": "npm run build",
|
|
87
87
|
"update-schema": "rover graph introspect https://graph.api.staging.flowcore.io/graphql -o schema.gql"
|
|
88
88
|
},
|
|
89
|
-
"version": "1.1.
|
|
89
|
+
"version": "1.1.1",
|
|
90
90
|
"bugs": "https://github.com/flowcore-io/flowcore-cli/issues",
|
|
91
91
|
"keywords": [
|
|
92
92
|
"flowcore",
|