@rockcarver/frodo-lib 0.15.1 → 0.15.2
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 +9 -1
- package/cjs/ops/JourneyOps.js +7 -6
- package/cjs/ops/JourneyOps.js.map +1 -1
- package/cjs/ops/utils/ExportImportUtils.js +32 -0
- package/cjs/ops/utils/ExportImportUtils.js.map +1 -1
- package/esm/ops/JourneyOps.mjs +8 -7
- package/esm/ops/utils/ExportImportUtils.mjs +24 -0
- package/package.json +1 -1
- package/types/ops/JourneyOps.d.ts.map +1 -1
- package/types/ops/utils/ExportImportUtils.d.ts +8 -0
- package/types/ops/utils/ExportImportUtils.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.15.2] - 2022-10-17
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- fileByIdTreeExportResolver now supports resolving journey files from subdirectories.
|
|
15
|
+
|
|
10
16
|
## [0.15.1] - 2022-10-16
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -647,7 +653,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
647
653
|
- Fixed problem with adding connection profiles
|
|
648
654
|
- Miscellaneous bug fixes
|
|
649
655
|
|
|
650
|
-
[Unreleased]: https://github.com/rockcarver/frodo-lib/compare/v0.15.
|
|
656
|
+
[Unreleased]: https://github.com/rockcarver/frodo-lib/compare/v0.15.2...HEAD
|
|
657
|
+
|
|
658
|
+
[0.15.2]: https://github.com/rockcarver/frodo-lib/compare/v0.15.1...v0.15.2
|
|
651
659
|
|
|
652
660
|
[0.15.1]: https://github.com/rockcarver/frodo-lib/compare/v0.15.0...v0.15.1
|
|
653
661
|
|
package/cjs/ops/JourneyOps.js
CHANGED
|
@@ -1435,13 +1435,14 @@ var fileByIdTreeExportResolver = /*#__PURE__*/function () {
|
|
|
1435
1435
|
var _ref2 = _asyncToGenerator(function* (treeId) {
|
|
1436
1436
|
(0, _Console.debug)("fileByIdTreeExportResolver(".concat(treeId, ")"));
|
|
1437
1437
|
var treeExport = createSingleTreeExportTemplate();
|
|
1438
|
-
var
|
|
1439
|
-
(0, _Console.debug)("fileByIdTreeExportResolver: resolving '".concat(treeId, "' to ").concat(file));
|
|
1438
|
+
var files = (0, _ExportImportUtils.findFilesByName)((0, _ExportImportUtils.getTypedFilename)("".concat(treeId), 'journey'));
|
|
1440
1439
|
|
|
1441
1440
|
try {
|
|
1442
1441
|
var _jsonData$tree;
|
|
1443
1442
|
|
|
1444
|
-
var
|
|
1443
|
+
var file = files.pop();
|
|
1444
|
+
var jsonData = JSON.parse(_fs.default.readFileSync(file, 'utf8'));
|
|
1445
|
+
(0, _Console.debug)("fileByIdTreeExportResolver: resolved '".concat(treeId, "' to ").concat(file)); // did we resolve the tree we were asked to resolved?
|
|
1445
1446
|
|
|
1446
1447
|
if (((_jsonData$tree = jsonData.tree) === null || _jsonData$tree === void 0 ? void 0 : _jsonData$tree._id) === treeId) {
|
|
1447
1448
|
treeExport = jsonData;
|
|
@@ -1449,7 +1450,8 @@ var fileByIdTreeExportResolver = /*#__PURE__*/function () {
|
|
|
1449
1450
|
else if (jsonData.trees && jsonData.trees[treeId]) {
|
|
1450
1451
|
treeExport = jsonData.trees[treeId];
|
|
1451
1452
|
}
|
|
1452
|
-
} catch (error) {
|
|
1453
|
+
} catch (error) {
|
|
1454
|
+
(0, _Console.debug)("fileByIdTreeExportResolver: unable to resolve '".concat(treeId, "' to a file."));
|
|
1453
1455
|
}
|
|
1454
1456
|
|
|
1455
1457
|
return treeExport;
|
|
@@ -1500,8 +1502,7 @@ function createFileParamTreeExportResolver(file) {
|
|
|
1500
1502
|
};
|
|
1501
1503
|
}();
|
|
1502
1504
|
|
|
1503
|
-
(0, _Console.debug)(
|
|
1504
|
-
(0, _Console.debug)(fileParamTreeExportResolver);
|
|
1505
|
+
(0, _Console.debug)("fileParamTreeExportResolver: file=".concat(file));
|
|
1505
1506
|
return fileParamTreeExportResolver;
|
|
1506
1507
|
}
|
|
1507
1508
|
/**
|