@flowcore/cli 4.17.1 → 4.18.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 +12 -0
- package/README.md +6 -6
- package/dist/commands/apply.js +17 -1
- package/dist/commands/delete.js +4 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
* added description to start that includes week ([58687a7](https://github.com/flowcore-io/flowcore-cli/commit/58687a7bbb66aaa5d6da26af88e555cbb1e72467))
|
|
12
12
|
|
|
13
|
+
## [4.18.0](https://github.com/flowcore-io/flowcore-cli/compare/v4.17.1...v4.18.0) (2025-11-03)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* add Usable MCP system prompt documentation and enhance document handling in apply and delete commands ([dcbcad2](https://github.com/flowcore-io/flowcore-cli/commit/dcbcad2fb02158babfb89bab6a6d0a6d96bd1aa6))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **apply:** streamline document merging logic for improved clarity and performance ([64a7ffc](https://github.com/flowcore-io/flowcore-cli/commit/64a7ffc6b9808a0a46d546df8405e2cc5ebfe11d))
|
|
24
|
+
|
|
13
25
|
## [4.17.1](https://github.com/flowcore-io/flowcore-cli/compare/v4.17.0...v4.17.1) (2025-08-19)
|
|
14
26
|
|
|
15
27
|
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ $ npm install -g @flowcore/cli
|
|
|
23
23
|
$ flowcore COMMAND
|
|
24
24
|
running command...
|
|
25
25
|
$ flowcore (--version)
|
|
26
|
-
@flowcore/cli/4.
|
|
26
|
+
@flowcore/cli/4.18.0 linux-x64 node-v22.19.0
|
|
27
27
|
$ flowcore --help [COMMAND]
|
|
28
28
|
USAGE
|
|
29
29
|
$ flowcore COMMAND
|
|
@@ -114,7 +114,7 @@ EXAMPLES
|
|
|
114
114
|
$ flowcore apply -f ./path/to/manifest.yml
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
_See code: [src/commands/apply.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.
|
|
117
|
+
_See code: [src/commands/apply.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.18.0/src/commands/apply.ts)_
|
|
118
118
|
|
|
119
119
|
## `flowcore auth delete key API_KEY_NAME`
|
|
120
120
|
|
|
@@ -567,7 +567,7 @@ EXAMPLES
|
|
|
567
567
|
cat ./path/to/manifest.yml | flowcore delete -f -
|
|
568
568
|
```
|
|
569
569
|
|
|
570
|
-
_See code: [src/commands/delete.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.
|
|
570
|
+
_See code: [src/commands/delete.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.18.0/src/commands/delete.ts)_
|
|
571
571
|
|
|
572
572
|
## `flowcore delete policy NAME`
|
|
573
573
|
|
|
@@ -634,7 +634,7 @@ EXAMPLES
|
|
|
634
634
|
$ flowcore diff -f ./path/to/manifest.yml
|
|
635
635
|
```
|
|
636
636
|
|
|
637
|
-
_See code: [src/commands/diff.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.
|
|
637
|
+
_See code: [src/commands/diff.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.18.0/src/commands/diff.ts)_
|
|
638
638
|
|
|
639
639
|
## `flowcore edit policy NAME`
|
|
640
640
|
|
|
@@ -878,7 +878,7 @@ EXAMPLES
|
|
|
878
878
|
$ flowcore info
|
|
879
879
|
```
|
|
880
880
|
|
|
881
|
-
_See code: [src/commands/info.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.
|
|
881
|
+
_See code: [src/commands/info.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.18.0/src/commands/info.ts)_
|
|
882
882
|
|
|
883
883
|
## `flowcore login`
|
|
884
884
|
|
|
@@ -1626,7 +1626,7 @@ EXAMPLES
|
|
|
1626
1626
|
$ flowcore update
|
|
1627
1627
|
```
|
|
1628
1628
|
|
|
1629
|
-
_See code: [src/commands/update.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.
|
|
1629
|
+
_See code: [src/commands/update.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.18.0/src/commands/update.ts)_
|
|
1630
1630
|
|
|
1631
1631
|
## `flowcore version`
|
|
1632
1632
|
|
package/dist/commands/apply.js
CHANGED
|
@@ -44,10 +44,26 @@ export default class Apply extends BaseCommand {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
-
documents
|
|
47
|
+
// Load all documents from each file
|
|
48
|
+
const allDocuments = flags.file.flatMap((file) => {
|
|
48
49
|
const content = fs.readFileSync(file, "utf8");
|
|
49
50
|
return yaml.loadAll(content);
|
|
50
51
|
});
|
|
52
|
+
// Group documents by kind + name, then merge documents with same identifier
|
|
53
|
+
const documentMap = new Map();
|
|
54
|
+
for (const doc of allDocuments) {
|
|
55
|
+
const key = `${doc.kind}:${doc.metadata?.name || ''}`;
|
|
56
|
+
if (documentMap.has(key)) {
|
|
57
|
+
// Merge with existing document
|
|
58
|
+
const existing = documentMap.get(key);
|
|
59
|
+
documentMap.set(key, { ...existing, ...doc });
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
// First occurrence of this kind + name
|
|
63
|
+
documentMap.set(key, doc);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
documents = [...documentMap.values()];
|
|
51
67
|
}
|
|
52
68
|
documents.map((doc) => baseResourceDto.parse(doc));
|
|
53
69
|
const orderedDocuments = await apiRegistry.applyOrder(documents);
|
package/dist/commands/delete.js
CHANGED
|
@@ -59,7 +59,10 @@ export default class Delete extends BaseCommand {
|
|
|
59
59
|
throw promptError;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
// Order documents in reverse of apply order for proper deletion (delete dependents first)
|
|
63
|
+
const orderedDocuments = await apiRegistry.applyOrder(documents);
|
|
64
|
+
const reverseOrderedDocuments = orderedDocuments.reverse();
|
|
65
|
+
await apiRegistry.delete(reverseOrderedDocuments, flags.yes);
|
|
63
66
|
this.logger.info('Resources deleted successfully');
|
|
64
67
|
}
|
|
65
68
|
catch (error) {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"prestart": "npm run build",
|
|
120
120
|
"update-schema": "rover graph introspect https://graph.api.staging.flowcore.io/graphql -o schema.gql"
|
|
121
121
|
},
|
|
122
|
-
"version": "4.
|
|
122
|
+
"version": "4.18.0",
|
|
123
123
|
"bugs": "https://github.com/flowcore-io/flowcore-cli/issues",
|
|
124
124
|
"keywords": [
|
|
125
125
|
"flowcore",
|