@rockcarver/frodo-lib 0.12.7 → 0.13.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 +21 -1
- package/cjs/ops/JourneyOps.js +58 -3
- package/cjs/ops/JourneyOps.js.map +1 -1
- package/cjs/ops/JourneyOps.test.js.map +1 -1
- package/cjs/ops/NodeOps.js +1 -1
- package/cjs/ops/NodeOps.js.map +1 -1
- package/cjs/test/mocks/TreeApi/getTree/Disabled.json +26 -0
- package/esm/ops/JourneyOps.mjs +37 -0
- package/esm/ops/JourneyOps.test.mjs +58 -0
- package/esm/ops/NodeOps.mjs +1 -1
- package/esm/test/mocks/TreeApi/getTree/Disabled.json +26 -0
- package/package.json +1 -1
- package/types/ops/JourneyOps.d.ts +13 -0
- package/types/ops/JourneyOps.d.ts.map +1 -1
- package/types/ops/NodeOps.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.13.1] - 2022-10-04
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- \#113: Frodo now properly enables and disables journeys.
|
|
15
|
+
|
|
16
|
+
## [0.13.0] - 2022-10-04
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- \#110: Added `enableJourney` and `disableJourney` funtions to `JourneyOps.ts` in support of new `frodo-cli` commands `frodo journey enable` and `frodo journey disable`
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- \#109: Autonomous Access nodes are now properly classified as `premium` and `cloud`.
|
|
25
|
+
|
|
10
26
|
## [0.12.7] - 2022-10-02
|
|
11
27
|
|
|
12
28
|
### Changed
|
|
@@ -573,7 +589,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
573
589
|
- Fixed problem with adding connection profiles
|
|
574
590
|
- Miscellaneous bug fixes
|
|
575
591
|
|
|
576
|
-
[Unreleased]: https://github.com/rockcarver/frodo-lib/compare/v0.
|
|
592
|
+
[Unreleased]: https://github.com/rockcarver/frodo-lib/compare/v0.13.1...HEAD
|
|
593
|
+
|
|
594
|
+
[0.13.1]: https://github.com/rockcarver/frodo-lib/compare/v0.13.0...v0.13.1
|
|
595
|
+
|
|
596
|
+
[0.13.0]: https://github.com/rockcarver/frodo-lib/compare/v0.12.7...v0.13.0
|
|
577
597
|
|
|
578
598
|
[0.12.7]: https://github.com/rockcarver/frodo-lib/compare/v0.12.6...v0.12.7
|
|
579
599
|
|
package/cjs/ops/JourneyOps.js
CHANGED
|
@@ -8,6 +8,8 @@ exports.createMultiTreeExportTemplate = createMultiTreeExportTemplate;
|
|
|
8
8
|
exports.createSingleTreeExportTemplate = createSingleTreeExportTemplate;
|
|
9
9
|
exports.deleteJourney = deleteJourney;
|
|
10
10
|
exports.deleteJourneys = deleteJourneys;
|
|
11
|
+
exports.disableJourney = disableJourney;
|
|
12
|
+
exports.enableJourney = enableJourney;
|
|
11
13
|
exports.exportJourney = exportJourney;
|
|
12
14
|
exports.exportJourneyToFile = exportJourneyToFile;
|
|
13
15
|
exports.exportJourneysToFile = exportJourneysToFile;
|
|
@@ -1178,7 +1180,7 @@ function _importJourneyFromFile() {
|
|
|
1178
1180
|
}
|
|
1179
1181
|
});
|
|
1180
1182
|
|
|
1181
|
-
return function (
|
|
1183
|
+
return function (_x36, _x37) {
|
|
1182
1184
|
return _ref4.apply(this, arguments);
|
|
1183
1185
|
};
|
|
1184
1186
|
}());
|
|
@@ -1258,7 +1260,7 @@ function _importFirstJourneyFromFile() {
|
|
|
1258
1260
|
|
|
1259
1261
|
});
|
|
1260
1262
|
|
|
1261
|
-
return function (
|
|
1263
|
+
return function (_x38, _x39) {
|
|
1262
1264
|
return _ref5.apply(this, arguments);
|
|
1263
1265
|
};
|
|
1264
1266
|
}());
|
|
@@ -1710,6 +1712,7 @@ function isCloudOnlyJourney(journey) {
|
|
|
1710
1712
|
* - standard: can run on any instance of a ForgeRock platform
|
|
1711
1713
|
* - cloud: utilize nodes, which are exclusively available in the ForgeRock Identity Cloud
|
|
1712
1714
|
* - premium: utilizes nodes, which come at a premium
|
|
1715
|
+
* - custom: utilizes nodes not included in the ForgeRock platform release
|
|
1713
1716
|
* @param {SingleTreeExportInterface} journey journey export data
|
|
1714
1717
|
* @returns {JourneyClassification[]} an array of one or multiple classifications
|
|
1715
1718
|
*/
|
|
@@ -1933,7 +1936,7 @@ function _deleteJourney() {
|
|
|
1933
1936
|
return status;
|
|
1934
1937
|
});
|
|
1935
1938
|
|
|
1936
|
-
return function (
|
|
1939
|
+
return function (_x40) {
|
|
1937
1940
|
return _ref6.apply(this, arguments);
|
|
1938
1941
|
};
|
|
1939
1942
|
}()).catch(error => {
|
|
@@ -1950,6 +1953,12 @@ function _deleteJourney() {
|
|
|
1950
1953
|
function deleteJourneys(_x33) {
|
|
1951
1954
|
return _deleteJourneys.apply(this, arguments);
|
|
1952
1955
|
}
|
|
1956
|
+
/**
|
|
1957
|
+
* Enable a journey
|
|
1958
|
+
* @param journeyId journey id/name
|
|
1959
|
+
* @returns {Promise<boolean>} true if the operation was successful, false otherwise
|
|
1960
|
+
*/
|
|
1961
|
+
|
|
1953
1962
|
|
|
1954
1963
|
function _deleteJourneys() {
|
|
1955
1964
|
_deleteJourneys = _asyncToGenerator(function* (options) {
|
|
@@ -1992,4 +2001,50 @@ function _deleteJourneys() {
|
|
|
1992
2001
|
});
|
|
1993
2002
|
return _deleteJourneys.apply(this, arguments);
|
|
1994
2003
|
}
|
|
2004
|
+
|
|
2005
|
+
function enableJourney(_x34) {
|
|
2006
|
+
return _enableJourney.apply(this, arguments);
|
|
2007
|
+
}
|
|
2008
|
+
/**
|
|
2009
|
+
* Disable a journey
|
|
2010
|
+
* @param journeyId journey id/name
|
|
2011
|
+
* @returns {Promise<boolean>} true if the operation was successful, false otherwise
|
|
2012
|
+
*/
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
function _enableJourney() {
|
|
2016
|
+
_enableJourney = _asyncToGenerator(function* (journeyId) {
|
|
2017
|
+
try {
|
|
2018
|
+
var treeObject = yield (0, _TreeApi.getTree)(journeyId);
|
|
2019
|
+
treeObject['enabled'] = true;
|
|
2020
|
+
delete treeObject._rev;
|
|
2021
|
+
var newTreeObject = yield (0, _TreeApi.putTree)(journeyId, treeObject);
|
|
2022
|
+
return newTreeObject['enabled'] === true;
|
|
2023
|
+
} catch (error) {
|
|
2024
|
+
(0, _Console.printMessage)(error.response.data, 'error');
|
|
2025
|
+
return false;
|
|
2026
|
+
}
|
|
2027
|
+
});
|
|
2028
|
+
return _enableJourney.apply(this, arguments);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
function disableJourney(_x35) {
|
|
2032
|
+
return _disableJourney.apply(this, arguments);
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
function _disableJourney() {
|
|
2036
|
+
_disableJourney = _asyncToGenerator(function* (journeyId) {
|
|
2037
|
+
try {
|
|
2038
|
+
var treeObject = yield (0, _TreeApi.getTree)(journeyId);
|
|
2039
|
+
treeObject['enabled'] = false;
|
|
2040
|
+
delete treeObject._rev;
|
|
2041
|
+
var newTreeObject = yield (0, _TreeApi.putTree)(journeyId, treeObject);
|
|
2042
|
+
return newTreeObject['enabled'] === false;
|
|
2043
|
+
} catch (error) {
|
|
2044
|
+
(0, _Console.printMessage)(error.response.data, 'error');
|
|
2045
|
+
return false;
|
|
2046
|
+
}
|
|
2047
|
+
});
|
|
2048
|
+
return _disableJourney.apply(this, arguments);
|
|
2049
|
+
}
|
|
1995
2050
|
//# sourceMappingURL=JourneyOps.js.map
|