@flowcore/cli 2.2.2 → 2.4.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 +14 -0
- package/README.md +60 -7
- package/dist/commands/apply.d.ts +10 -0
- package/dist/commands/apply.js +28 -0
- package/oclif.manifest.json +41 -1
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,20 @@
|
|
|
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.4.0](https://github.com/flowcore-io/flowcore-cli/compare/v2.3.0...v2.4.0) (2024-02-20)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* update flowcore CLI version to 2.3.0 and add new command 'flowcore scenario apply' ([869ec7f](https://github.com/flowcore-io/flowcore-cli/commit/869ec7f848e8a731a9fc08877e1d272d07a59294))
|
|
19
|
+
|
|
20
|
+
## [2.3.0](https://github.com/flowcore-io/flowcore-cli/compare/v2.2.2...v2.3.0) (2024-02-19)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* update `flowcore apply` command to support applying a resource manifest against the Flowcore Platform for multiple files ([74696c2](https://github.com/flowcore-io/flowcore-cli/commit/74696c2fd7da448bff7374656d1657ff3e063305))
|
|
26
|
+
|
|
13
27
|
## [2.2.2](https://github.com/flowcore-io/flowcore-cli/compare/v2.2.1...v2.2.2) (2024-02-16)
|
|
14
28
|
|
|
15
29
|
|
package/README.md
CHANGED
|
@@ -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.
|
|
21
|
+
@flowcore/cli/2.4.0 linux-x64 node-v20.11.0
|
|
22
22
|
$ flowcore --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ flowcore COMMAND
|
|
@@ -27,6 +27,7 @@ USAGE
|
|
|
27
27
|
<!-- usagestop -->
|
|
28
28
|
# Commands
|
|
29
29
|
<!-- commands -->
|
|
30
|
+
* [`flowcore apply`](#flowcore-apply)
|
|
30
31
|
* [`flowcore autocomplete [SHELL]`](#flowcore-autocomplete-shell)
|
|
31
32
|
* [`flowcore config set`](#flowcore-config-set)
|
|
32
33
|
* [`flowcore config show`](#flowcore-config-show)
|
|
@@ -43,10 +44,32 @@ USAGE
|
|
|
43
44
|
* [`flowcore plugins:uninstall PLUGIN...`](#flowcore-pluginsuninstall-plugin-1)
|
|
44
45
|
* [`flowcore plugins:uninstall PLUGIN...`](#flowcore-pluginsuninstall-plugin-2)
|
|
45
46
|
* [`flowcore plugins update`](#flowcore-plugins-update)
|
|
47
|
+
* [`flowcore scenario apply`](#flowcore-scenario-apply)
|
|
46
48
|
* [`flowcore stream STREAM`](#flowcore-stream-stream)
|
|
47
49
|
* [`flowcore version`](#flowcore-version)
|
|
48
50
|
* [`flowcore whoami`](#flowcore-whoami)
|
|
49
51
|
|
|
52
|
+
## `flowcore apply`
|
|
53
|
+
|
|
54
|
+
Apply a resource manifest against the Flowcore Platform
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
USAGE
|
|
58
|
+
$ flowcore apply -f <value> [--profile <value>]
|
|
59
|
+
|
|
60
|
+
FLAGS
|
|
61
|
+
-f, --file=<value>... (required) file to apply
|
|
62
|
+
--profile=<value> Specify the configuration profile to use
|
|
63
|
+
|
|
64
|
+
DESCRIPTION
|
|
65
|
+
Apply a resource manifest against the Flowcore Platform
|
|
66
|
+
|
|
67
|
+
EXAMPLES
|
|
68
|
+
$ flowcore apply -f ./path/to/manifest.yml
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
_See code: [src/commands/apply.ts](https://github.com/flowcore-io/flowcore-cli/blob/v2.4.0/src/commands/apply.ts)_
|
|
72
|
+
|
|
50
73
|
## `flowcore autocomplete [SHELL]`
|
|
51
74
|
|
|
52
75
|
Display autocomplete installation instructions.
|
|
@@ -134,13 +157,13 @@ Apply a manifest configuration for a Data Core to the Flowcore Platform
|
|
|
134
157
|
|
|
135
158
|
```
|
|
136
159
|
USAGE
|
|
137
|
-
$ flowcore data-core apply -f <value>
|
|
160
|
+
$ flowcore data-core apply -f <value> [--profile <value>] [-n <value>] [-t <value>] [-y]
|
|
138
161
|
|
|
139
162
|
FLAGS
|
|
140
|
-
-f, --file=<value
|
|
163
|
+
-f, --file=<value>... (required) file to apply
|
|
141
164
|
-n, --name=<value> name of the data core to apply
|
|
142
|
-
-t, --tenant=<value>
|
|
143
|
-
|
|
165
|
+
-t, --tenant=<value> tenant to apply the data core to, this is the org for your organization, it can be seen in the
|
|
166
|
+
url when accessing your organization
|
|
144
167
|
-y, --yes skip confirmation
|
|
145
168
|
--profile=<value> Specify the configuration profile to use
|
|
146
169
|
|
|
@@ -155,7 +178,7 @@ EXAMPLES
|
|
|
155
178
|
$ cat <<EOF | flowcore data-core apply -f -
|
|
156
179
|
```
|
|
157
180
|
|
|
158
|
-
_See code: [@flowcore/cli-plugin-data-core](https://github.com/flowcore/flowcore-cli-data-core/blob/v1.
|
|
181
|
+
_See code: [@flowcore/cli-plugin-data-core](https://github.com/flowcore/flowcore-cli-data-core/blob/v1.2.0/src/commands/data-core/apply.ts)_
|
|
159
182
|
|
|
160
183
|
## `flowcore help [COMMANDS]`
|
|
161
184
|
|
|
@@ -479,6 +502,36 @@ DESCRIPTION
|
|
|
479
502
|
|
|
480
503
|
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.2.2/src/commands/plugins/update.ts)_
|
|
481
504
|
|
|
505
|
+
## `flowcore scenario apply`
|
|
506
|
+
|
|
507
|
+
Apply a manifest configuration for a Scenario to the Flowcore Platform
|
|
508
|
+
|
|
509
|
+
```
|
|
510
|
+
USAGE
|
|
511
|
+
$ flowcore scenario apply -f <value> [--profile <value>] [-d] [-n <value>] [-t <value>] [-y]
|
|
512
|
+
|
|
513
|
+
FLAGS
|
|
514
|
+
-d, --[no-]deploy deploy the scenario after applying
|
|
515
|
+
-f, --file=<value>... (required) file to apply
|
|
516
|
+
-n, --name=<value> name of the scenario to apply
|
|
517
|
+
-t, --tenant=<value> tenant to apply the scenario to, this is the org for your organization, it can be seen in the
|
|
518
|
+
url when accessing your organization
|
|
519
|
+
-y, --yes skip confirmation
|
|
520
|
+
--profile=<value> Specify the configuration profile to use
|
|
521
|
+
|
|
522
|
+
DESCRIPTION
|
|
523
|
+
Apply a manifest configuration for a Scenario to the Flowcore Platform
|
|
524
|
+
|
|
525
|
+
EXAMPLES
|
|
526
|
+
$ flowcore scenario apply -t flowcore -f example.yaml
|
|
527
|
+
|
|
528
|
+
$ flowcore scenario apply -t flowcore -n scenario-name -f example.yaml
|
|
529
|
+
|
|
530
|
+
$ cat <<EOF | flowcore scenario apply -f -
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
_See code: [@flowcore/cli-plugin-scenario](https://github.com/flowcore/flowcore-cli-plugin-scenario/blob/v1.0.0/src/commands/scenario/apply.ts)_
|
|
534
|
+
|
|
482
535
|
## `flowcore stream STREAM`
|
|
483
536
|
|
|
484
537
|
Stream events from a datacore running on the Flowcore Platform
|
|
@@ -515,7 +568,7 @@ EXAMPLES
|
|
|
515
568
|
$ flowcore stream https://flowcore.io/<org>/<data core>/<flow type>/[<event type1>,<event type2>,<event type3>].stream -o log -s 3m
|
|
516
569
|
```
|
|
517
570
|
|
|
518
|
-
_See code: [src/commands/stream.ts](https://github.com/flowcore-io/flowcore-cli/blob/v2.
|
|
571
|
+
_See code: [src/commands/stream.ts](https://github.com/flowcore-io/flowcore-cli/blob/v2.4.0/src/commands/stream.ts)_
|
|
519
572
|
|
|
520
573
|
## `flowcore version`
|
|
521
574
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from "@flowcore/cli-plugin-config";
|
|
2
|
+
export default class Apply extends BaseCommand<typeof Apply> {
|
|
3
|
+
static args: {};
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
file: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[], import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseCommand } from "@flowcore/cli-plugin-config";
|
|
2
|
+
import { Flags } from '@oclif/core';
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
import isSameOrBefore from "dayjs/plugin/isSameOrBefore.js";
|
|
5
|
+
import utc from "dayjs/plugin/utc.js";
|
|
6
|
+
dayjs.extend(utc);
|
|
7
|
+
dayjs.extend(isSameOrBefore);
|
|
8
|
+
export default class Apply extends BaseCommand {
|
|
9
|
+
static args = {};
|
|
10
|
+
static description = 'Apply a resource manifest against the Flowcore Platform';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> <%= command.id %> -f ./path/to/manifest.yml',
|
|
13
|
+
];
|
|
14
|
+
static flags = {
|
|
15
|
+
file: Flags.string({ char: 'f', description: 'file to apply', multiple: true, required: true }),
|
|
16
|
+
};
|
|
17
|
+
async run() {
|
|
18
|
+
const { flags } = await this.parse(Apply);
|
|
19
|
+
const resources = [
|
|
20
|
+
"data-core",
|
|
21
|
+
"scenario",
|
|
22
|
+
];
|
|
23
|
+
for (const resource of resources) {
|
|
24
|
+
// eslint-disable-next-line no-await-in-loop
|
|
25
|
+
await this.config.runCommand(`${resource}:apply`, flags.file.map((file) => `--file=${file}`));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
+
"apply": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "Apply a resource manifest against the Flowcore Platform",
|
|
7
|
+
"examples": [
|
|
8
|
+
"<%= config.bin %> <%= command.id %> -f ./path/to/manifest.yml"
|
|
9
|
+
],
|
|
10
|
+
"flags": {
|
|
11
|
+
"profile": {
|
|
12
|
+
"description": "Specify the configuration profile to use",
|
|
13
|
+
"name": "profile",
|
|
14
|
+
"hasDynamicHelp": false,
|
|
15
|
+
"multiple": false,
|
|
16
|
+
"type": "option"
|
|
17
|
+
},
|
|
18
|
+
"file": {
|
|
19
|
+
"char": "f",
|
|
20
|
+
"description": "file to apply",
|
|
21
|
+
"name": "file",
|
|
22
|
+
"required": true,
|
|
23
|
+
"hasDynamicHelp": false,
|
|
24
|
+
"multiple": true,
|
|
25
|
+
"type": "option"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"hasDynamicHelp": false,
|
|
29
|
+
"hiddenAliases": [],
|
|
30
|
+
"id": "apply",
|
|
31
|
+
"pluginAlias": "@flowcore/cli",
|
|
32
|
+
"pluginName": "@flowcore/cli",
|
|
33
|
+
"pluginType": "core",
|
|
34
|
+
"strict": true,
|
|
35
|
+
"enableJsonFlag": false,
|
|
36
|
+
"isESM": true,
|
|
37
|
+
"relativePath": [
|
|
38
|
+
"dist",
|
|
39
|
+
"commands",
|
|
40
|
+
"apply.js"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
3
43
|
"stream": {
|
|
4
44
|
"aliases": [],
|
|
5
45
|
"args": {
|
|
@@ -101,5 +141,5 @@
|
|
|
101
141
|
]
|
|
102
142
|
}
|
|
103
143
|
},
|
|
104
|
-
"version": "2.
|
|
144
|
+
"version": "2.4.0"
|
|
105
145
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@datastructures-js/queue": "^4.2.3",
|
|
8
8
|
"@flowcore/cli-plugin-config": "^1.0.5",
|
|
9
|
-
"@flowcore/cli-plugin-data-core": "^1.
|
|
9
|
+
"@flowcore/cli-plugin-data-core": "^1.2.0",
|
|
10
|
+
"@flowcore/cli-plugin-scenario": "^1.0.0",
|
|
10
11
|
"@flowcore/time-bucket": "^1.1.0",
|
|
11
12
|
"@oclif/core": "^3",
|
|
12
13
|
"@oclif/plugin-autocomplete": "^3.0.2",
|
|
@@ -69,7 +70,8 @@
|
|
|
69
70
|
"@oclif/plugin-autocomplete",
|
|
70
71
|
"@oclif/plugin-not-found",
|
|
71
72
|
"@flowcore/cli-plugin-config",
|
|
72
|
-
"@flowcore/cli-plugin-data-core"
|
|
73
|
+
"@flowcore/cli-plugin-data-core",
|
|
74
|
+
"@flowcore/cli-plugin-scenario"
|
|
73
75
|
],
|
|
74
76
|
"topicSeparator": " "
|
|
75
77
|
},
|
|
@@ -87,7 +89,7 @@
|
|
|
87
89
|
"prestart": "npm run build",
|
|
88
90
|
"update-schema": "rover graph introspect https://graph.api.staging.flowcore.io/graphql -o schema.gql"
|
|
89
91
|
},
|
|
90
|
-
"version": "2.
|
|
92
|
+
"version": "2.4.0",
|
|
91
93
|
"bugs": "https://github.com/flowcore-io/flowcore-cli/issues",
|
|
92
94
|
"keywords": [
|
|
93
95
|
"flowcore",
|